---
title: phase_estimation (v1.3)
description: API reference for qiskit.circuit.library.phase_estimation in qiskit v1.3
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/1.3/qiskit.circuit.library.phase_estimation
---

# phase\_estimation

*class* `qiskit.circuit.library.phase_estimation(num_evaluation_qubits, unitary, name='QPE')`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.3/qiskit/circuit/library/phase_estimation.py#L108-L177)

Bases:

Phase Estimation circuit.

In the Quantum Phase Estimation (QPE) algorithm \[1, 2, 3], the Phase Estimation circuit is used to estimate the phase $\phi$ of an eigenvalue $e^{2\pi i\phi}$ of a unitary operator $U$, provided with the corresponding eigenstate $|\psi\rangle$. That is

$$
U|\psi\rangle = e^{2\pi i\phi} |\psi\rangle
$$

This estimation (and thereby this circuit) is a central routine to several well-known algorithms, such as Shor’s algorithm or Quantum Amplitude Estimation.

**Parameters**

- **num\_evaluation\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – The number of evaluation qubits.
- **unitary** ([*QuantumCircuit*](/docs/api/qiskit/1.3/qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")) – The unitary operation $U$ which will be repeated and controlled.
- **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – The name of the circuit.

**Return type**

[*QuantumCircuit*](/docs/api/qiskit/1.3/qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")

**Reference Circuit:**

```python
from qiskit.circuit import QuantumCircuit
from qiskit.circuit.library import phase_estimation
unitary = QuantumCircuit(2)
unitary.x(0)
unitary.y(1)
circuit = phase_estimation(3, unitary)
circuit.draw('mpl')
```

![Circuit diagram output by the previous code.](https://eu-de.quantum.cloud.ibm.com/docs/images/api/qiskit/1.3/qiskit-circuit-library-phase_estimation-1.avif)

**References:**

**\[1]: Kitaev, A. Y. (1995). Quantum measurements and the Abelian Stabilizer Problem. 1–22.**

[quant-ph/9511026](http://arxiv.org/abs/quant-ph/9511026)

**\[2]: Michael A. Nielsen and Isaac L. Chuang. 2011.**

Quantum Computation and Quantum Information: 10th Anniversary Edition (10th ed.). Cambridge University Press, New York, NY, USA.

**\[3]: Qiskit**

[textbook](https://github.com/Qiskit/textbook/blob/main/notebooks/ch-algorithms/quantum-phase-estimation.ipynb)
