qdk_chemistry.algorithms.phase_estimation.iterative_phase_estimation module

Iterative phase estimation implementation.

This module implements the Kitaev-style iterative quantum phase estimation (IQPE) algorithm, which measures phase bits sequentially from most-significant to least-significant using a single ancilla qubit and adaptive feedback corrections.

References

Kitaev, A. (1995). arXiv:quant-ph/9511026. [Kit95]

class qdk_chemistry.algorithms.phase_estimation.iterative_phase_estimation.IterativePhaseEstimation(num_bits=-1, evolution_time=0.0, shots_per_bit=3)[source]

Bases: PhaseEstimation

Iterative Phase Estimation algorithm implementation.

Parameters:
  • num_bits (int)

  • evolution_time (float)

  • shots_per_bit (int)

__init__(num_bits=-1, evolution_time=0.0, shots_per_bit=3)[source]

Initialize IterativePhaseEstimation with the given settings.

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 t used in the time-evolution unitary U = exp(-i H t), defaults to 0.0; user needs to set a valid value.

  • shots_per_bit (int) – The number of shots to execute per measuring a bit in the iterative phase estimation.

create_iteration_circuit(state_preparation, qubit_hamiltonian, *, evolution_builder, circuit_mapper, iteration, total_iterations, phase_correction=0.0)[source]

Construct a single IQPE iteration circuit.

Return type:

Circuit

Parameters:
  • state_preparation (Circuit) – Trial-state preparation circuit that prepares the initial state on the system qubits.

  • 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.

  • iteration (int) – Current iteration index (0-based), where 0 corresponds to the most-significant bit.

  • total_iterations (int) – Total number of phase bits to measure across all iterations.

  • phase_correction (float) – Feedback phase angle to apply before controlled evolution, defaults to 0.0.

Returns:

A quantum circuit implementing one IQPE iteration.

get_circuits()[source]

Get the list of iteration circuits generated during algorithm execution.

Return type:

list[Circuit]

Returns:

List of quantum circuits for each IQPE iteration.

Raises:

ValueError – If no iteration circuits are available.

name()[source]

Return the name of the phase estimation algorithm.

Return type:

str

class qdk_chemistry.algorithms.phase_estimation.iterative_phase_estimation.IterativePhaseEstimationSettings[source]

Bases: PhaseEstimationSettings

Settings for the Iterative Phase Estimation algorithm.

__init__()[source]

Initialize the settings for Iterative Phase Estimation.

Parameters:

shots_per_bit – The number of shots to execute per measuring a bit in the iterative phase estimation.