qdk_chemistry.plugins.qiskit.standard_phase_estimation module
Standard (QFT-based) phase estimation implementation via qiskit.
This module implements the standard quantum phase estimation algorithm using the qiskit synthesis of the inverse Quantum Fourier Transform (QFT), which measures all phase bits in parallel using multiple ancilla qubits.
References
Nielsen, M. A., & Chuang, I. L. (2010). [NC10]
- class qdk_chemistry.plugins.qiskit.standard_phase_estimation.QiskitStandardPhaseEstimation(num_bits=-1, evolution_time=0.0, qft_do_swaps=True, shots=3)[source]
Bases:
PhaseEstimationStandard QFT-based (non-iterative) phase estimation.
- __init__(num_bits=-1, evolution_time=0.0, qft_do_swaps=True, shots=3)[source]
Initialize the Qiskit standard phase estimation routine.
- Parameters:
num_bits (int) – The number of phase bits to estimate. Default to -1; user needs to set a valid value.
evolution_time (float) – Time parameter
tused in the time-evolution unitaryU = exp(-i H t), defaults to 0.0; user needs to set a valid value.qft_do_swaps (bool) – Whether to include the final swap layer in the inverse QFT. Defaults to
Trueso that the measured bit string is ordered from most-significant to least-significant bit.shots (int) – The number of shots to execute the circuit.
- create_circuit(state_preparation, qubit_hamiltonian, *, evolution_builder, circuit_mapper)[source]
Build the standard QPE circuit.
- Return type:
- Parameters:
state_preparation (Circuit) – The circuit that prepares the initial state.
qubit_hamiltonian (QubitHamiltonian) – The qubit Hamiltonian for which to estimate the phase.
evolution_builder (TimeEvolutionBuilder) – The time evolution builder to use.
circuit_mapper (ControlledEvolutionCircuitMapper) – The controlled evolution circuit mapper to use.
- Returns:
The constructed QPE quantum circuit.
- get_circuit()[source]
Get the QPE circuit generated during algorithm execution.
- Return type:
- Returns:
The quantum circuit used in the last execution.
- Raises:
ValueError – If no QPE circuit is available.
- class qdk_chemistry.plugins.qiskit.standard_phase_estimation.QiskitStandardPhaseEstimationSettings[source]
Bases:
PhaseEstimationSettingsSettings for the Qiskit Standard Phase Estimation algorithm.