qc2.algorithms.qiskit.iqpe ========================== .. py:module:: qc2.algorithms.qiskit.iqpe .. autoapi-nested-parse:: Module defining the QPE algorithm for qiskit Classes ------- .. autoapisummary:: qc2.algorithms.qiskit.iqpe.QC2IterativePhaseEstimation qc2.algorithms.qiskit.iqpe.IQPE Module Contents --------------- .. py:class:: QC2IterativePhaseEstimation(num_iterations: int, sampler: qiskit.primitives.BaseSampler | None = None) Bases: :py:obj:`qiskit_algorithms.IterativePhaseEstimation` Run the Iterative quantum phase estimation (QPE) algorithm. Rewrote here to control the qubit ordering and harmonize with pennlyane implementation .. py:method:: construct_circuit(unitary: qiskit.QuantumCircuit, state_preparation: qiskit.QuantumCircuit, k: int, omega: float = 0.0, measurement: bool = False) -> qiskit.QuantumCircuit Construct the kth iteration Quantum Phase Estimation circuit. For details of parameters, see Fig. 2 in https://arxiv.org/pdf/quant-ph/0610214.pdf. :param unitary: The circuit representing the unitary operator whose eigenvalue (via phase) will be measured. :param 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. :param k: the iteration idx. :param omega: the feedback angle. :param measurement: Boolean flag to indicate if measurement should be included in the circuit. :returns: the quantum circuit per iteration :rtype: QuantumCircuit .. py:class:: IQPE(qc2data=None, num_iterations=None, active_space=None, mapper=None, sampler=None, reference_state=None, verbose=0) Bases: :py:obj:`qc2.algorithms.qiskit.pebase.PEBase` .. py:attribute:: num_iterations :value: 3 .. py:attribute:: solver