qc2.algorithms.qiskit.iqpe
Module defining the QPE algorithm for qiskit
Classes
Run the Iterative quantum phase estimation (QPE) algorithm. |
|
Module Contents
- class qc2.algorithms.qiskit.iqpe.QC2IterativePhaseEstimation(num_iterations: int, sampler: qiskit.primitives.BaseSampler | None = None)[source]
Bases:
qiskit_algorithms.IterativePhaseEstimationRun the Iterative quantum phase estimation (QPE) algorithm.
Rewrote here to control the qubit ordering and harmonize with pennlyane implementation
- construct_circuit(unitary: qiskit.QuantumCircuit, state_preparation: qiskit.QuantumCircuit, k: int, omega: float = 0.0, measurement: bool = False) qiskit.QuantumCircuit[source]
Construct the kth iteration Quantum Phase Estimation circuit.
For details of parameters, see Fig. 2 in https://arxiv.org/pdf/quant-ph/0610214.pdf.
- Parameters:
unitary – The circuit representing the unitary operator whose eigenvalue (via phase) will be measured.
state_preparation – 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 – the iteration idx.
omega – the feedback angle.
measurement – Boolean flag to indicate if measurement should be included in the circuit.
- Returns:
the quantum circuit per iteration
- Return type:
QuantumCircuit