77 lines
3.8 KiB
Plaintext
77 lines
3.8 KiB
Plaintext
---
|
||
title: IterativePhaseEstimation
|
||
description: API reference for qiskit.algorithms.IterativePhaseEstimation
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.algorithms.IterativePhaseEstimation
|
||
---
|
||
|
||
# IterativePhaseEstimation
|
||
|
||
<Class id="qiskit.algorithms.IterativePhaseEstimation" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.21/qiskit/algorithms/phase_estimators/ipe.py" signature="IterativePhaseEstimation(num_iterations, quantum_instance=None)" modifiers="class">
|
||
Bases: `qiskit.algorithms.phase_estimators.phase_estimator.PhaseEstimator`
|
||
|
||
Run the Iterative quantum phase estimation (QPE) algorithm.
|
||
|
||
Given a unitary circuit and a circuit preparing an eigenstate, return the phase of the eigenvalue as a number in $[0,1)$ using the iterative phase estimation algorithm.
|
||
|
||
**\[1]: Dobsicek et al. (2006), Arbitrary accuracy iterative phase estimation algorithm as a two**
|
||
|
||
qubit benchmark, [arxiv/quant-ph/0610214](https://arxiv.org/abs/quant-ph/0610214)
|
||
|
||
**Parameters**
|
||
|
||
* **num\_iterations** (`int`) – The number of iterations (rounds) of the phase estimation to run.
|
||
* **quantum\_instance** (`Union`\[[`Backend`](qiskit.providers.Backend "qiskit.providers.backend.Backend"), [`QuantumInstance`](qiskit.utils.QuantumInstance "qiskit.utils.quantum_instance.QuantumInstance"), `None`]) – The quantum instance on which the circuit will be run.
|
||
|
||
**Raises**
|
||
|
||
**ValueError** – if num\_iterations is not greater than zero.
|
||
|
||
## Methods
|
||
|
||
### construct\_circuit
|
||
|
||
<Function id="qiskit.algorithms.IterativePhaseEstimation.construct_circuit" signature="IterativePhaseEstimation.construct_circuit(unitary, state_preparation, k, omega=0, measurement=False)">
|
||
Construct the kth iteration Quantum Phase Estimation circuit.
|
||
|
||
For details of parameters, see Fig. 2 in [https://arxiv.org/pdf/quant-ph/0610214.pdf](https://arxiv.org/pdf/quant-ph/0610214.pdf).
|
||
|
||
**Parameters**
|
||
|
||
* **unitary** ([`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")) – The circuit representing the unitary operator whose eigenvalue (via phase) will be measured.
|
||
* **state\_preparation** ([`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")) – The circuit that prepares the state whose eigenphase will be measured. If this parameter is omitted, no preparation circuit will be run and input state will be the all-zero state in the computational basis.
|
||
* **k** (`int`) – the iteration idx.
|
||
* **omega** (`float`) – the feedback angle.
|
||
* **measurement** (`bool`) – Boolean flag to indicate if measurement should be included in the circuit.
|
||
|
||
**Returns**
|
||
|
||
the quantum circuit per iteration
|
||
|
||
**Return type**
|
||
|
||
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
|
||
</Function>
|
||
|
||
### estimate
|
||
|
||
<Function id="qiskit.algorithms.IterativePhaseEstimation.estimate" signature="IterativePhaseEstimation.estimate(unitary, state_preparation)">
|
||
Estimate the eigenphase of the input unitary and initial-state pair.
|
||
|
||
**Parameters**
|
||
|
||
* **unitary** ([`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")) – The circuit representing the unitary operator whose eigenvalue (via phase) will be measured.
|
||
* **state\_preparation** ([`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")) – The circuit that prepares the state whose eigenphase will be measured. If this parameter is omitted, no preparation circuit will be run and input state will be the all-zero state in the computational basis.
|
||
|
||
**Return type**
|
||
|
||
`IterativePhaseEstimationResult`
|
||
|
||
**Returns**
|
||
|
||
Estimated phase in an IterativePhaseEstimationResult object.
|
||
</Function>
|
||
</Class>
|
||
|