---
title: PolynomialPauliRotations (latest version)
description: API reference for qiskit.circuit.library.PolynomialPauliRotations in the latest version of qiskit
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.circuit.library.PolynomialPauliRotations
---

# PolynomialPauliRotations

*class* `qiskit.circuit.library.PolynomialPauliRotations(num_state_qubits=None, coeffs=None, basis='Y', name='poly')`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/circuit/library/arithmetic/polynomial_pauli_rotations.py#L134-L280)

Bases: [`FunctionalPauliRotations`](/docs/api/qiskit/qiskit.circuit.library.FunctionalPauliRotations "qiskit.circuit.library.arithmetic.functional_pauli_rotations.FunctionalPauliRotations")

A circuit implementing polynomial Pauli rotations.

For a polynomial $p$, a basis state $|i\rangle$ of the state register, and a target qubit initialized in $|0\rangle$, this operator applies a Pauli rotation to the target qubit by the angle $p(i)$. For the default `basis="Y"`, this acts as:

$$
|0\rangle |i\rangle \mapsto
\cos\left(\frac{p(i)}{2}\right) |0\rangle |i\rangle
+ \sin\left(\frac{p(i)}{2}\right) |1\rangle |i\rangle
$$

For `basis="X"`, the action on the target qubit is:

$$
|0\rangle |i\rangle \mapsto
\cos\left(\frac{p(i)}{2}\right) |0\rangle |i\rangle
- i\sin\left(\frac{p(i)}{2}\right) |1\rangle |i\rangle
$$

For `basis="Z"`, the action on the target qubit is:

$$
|0\rangle |i\rangle \mapsto e^{-i p(i) / 2} |0\rangle |i\rangle
$$

Let $n$ be the number of qubits representing the state, $d$ the degree of $p$ and $q_i$ the qubits, where $q_0$ is the least significant qubit. Then for

$$
x = \sum_{i=0}^{n-1} 2^i q_i,
$$

we can write

$$
p(x) = \sum_{j=0}^{j=d} c_j x^j
$$

where $c$ are the input coefficients, `coeffs`.

**Parameters**

- **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – The number of qubits representing the state.
- **coeffs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*float*](https://docs.python.org/3/library/functions.html#float)*] | None*) – The coefficients of the polynomial. `coeffs[i]` is the coefficient of $x^i$. Defaults to linear: `[0, 1]`.
- **basis** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The type of Pauli rotation (`"X"`, `"Y"`, `"Z"`).
- **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the circuit.

## Attributes

### coeffs

The coefficients of the polynomial.

`coeffs[i]` is the coefficient of the i-th power of the function input $x$, that means that the rotation angles are based on the coefficients value, following the formula

$$
c_j x^j ,  j=0, ..., d
$$

where $d$ is the degree of the polynomial $p(x)$ and $c$ are the coefficients `coeffs`.

**Returns**

The coefficients of the polynomial.

### degree

Return the degree of the polynomial, equals to the number of coefficients minus 1.

**Returns**

The degree of the polynomial. If the coefficients have not been set, return 0.

### name

Type: `str`

A human-readable name for the circuit.

**Example**

```python
from qiskit import QuantumCircuit

qc = QuantumCircuit(2, 2, name="my_circuit")
print(qc.name)
```

```text
my_circuit
```
