qc2.algorithms.qiskit.qpe
Module defining the QPE algorithm for qiskit
Classes
Run the Quantum Phase Estimation (QPE) algorithm. |
|
Module Contents
- class qc2.algorithms.qiskit.qpe.QC2PhaseEstimation(num_evaluation_qubits: int, sampler: qiskit.primitives.BaseSampler | None = None)[source]
Bases:
qiskit_algorithms.PhaseEstimationRun the 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 | None = None, name: str = 'QPE') qiskit.QuantumCircuit[source]
Return the circuit to be executed to estimate phases.
This circuit includes as sub-circuits the core phase estimation circuit, with the addition of the state-preparation circuit and possibly measurement instructions.
- estimate_from_pe_circuit(pe_circuit: qiskit.QuantumCircuit) qiskit_algorithms.PhaseEstimationResult[source]
Run the phase estimation algorithm on a phase estimation circuit
- Parameters:
pe_circuit – The phase estimation circuit.
- Returns:
A phase estimation result.
- Raises:
AlgorithmError – Primitive job failed.