---
title: PolynomialPauliRotations (v2.1)
description: API reference for qiskit.circuit.library.PolynomialPauliRotations in qiskit v2.1
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/2.1/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.1/qiskit/circuit/library/arithmetic/polynomial_pauli_rotations.py#L134-L264)

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

A circuit implementing polynomial Pauli rotations.

For a polynomial $p(x)$, a basis state $|i\rangle$ and a target qubit $|0\rangle$ this operator acts as:

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

Let n be the number of qubits representing the state, d the degree of p(x) 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`.

Prepare an approximation to a state with amplitudes specified by a polynomial.

**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 the i-th power of x. 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
```
