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

# qiskit.circuit.library.phase\_estimation

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

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

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/2.0/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/2.0/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/2.0/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)
