qdk_chemistry.plugins.qiskit.phase_estimation_circuit_builder module

Qiskit-based phase estimation circuit builder.

This module provides the Qiskit-specific implementation of the standard QPE circuit builder, extending the base StandardQpeCircuitBuilder with Qiskit QuantumCircuit support.

class qdk_chemistry.plugins.qiskit.phase_estimation_circuit_builder.QiskitIterativeQpeCircuitBuilder(num_bits=-1, phase_correction=0.0, num_iteration=-1, controlled_circuit_mapper=None, unitary_builder=None)[source]

Bases: IterativeQpeCircuitBuilder

Qiskit-based iterative phase estimation circuit builder.

Extends IterativeQpeCircuitBuilder to add support for Qiskit QuantumCircuit objects.

Parameters:
__init__(num_bits=-1, phase_correction=0.0, num_iteration=-1, controlled_circuit_mapper=None, unitary_builder=None)[source]

Initialize QiskitIterativeQpeCircuitBuilder 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.

  • phase_correction (float) – The accumulated phase feedback from prior iterations. Default to 0.0.

  • num_iteration (int) – The specific iteration to build. Default to -1 (build all iterations).

  • controlled_circuit_mapper (AlgorithmRef | None) – AlgorithmRef | None = None,

  • unitary_builder (AlgorithmRef | None) – AlgorithmRef | None = None,

name()[source]

Return the name of the builder algorithm.

Return type:

str

class qdk_chemistry.plugins.qiskit.phase_estimation_circuit_builder.QiskitStandardQpeCircuitBuilder(num_bits=-1, qft_do_swaps=True, controlled_circuit_mapper=None, unitary_builder=None)[source]

Bases: StandardQpeCircuitBuilder

Qiskit-based standard (QFT-based) phase estimation circuit builder.

Extends StandardQpeCircuitBuilder to add support for Qiskit QuantumCircuit objects. Constructs the full QPE circuit (state prep, controlled unitaries, inverse QFT, measurements) without executing it.

Parameters:
__init__(num_bits=-1, qft_do_swaps=True, controlled_circuit_mapper=None, unitary_builder=None)[source]

Initialize QiskitStandardQpeCircuitBuilder 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.

  • qft_do_swaps (bool) – Whether to apply swap gates in the QFT. Defaults to True.

  • controlled_circuit_mapper (AlgorithmRef | None) – Optional algorithm reference for the controlled circuit mapper.

  • unitary_builder (AlgorithmRef | None) – Optional algorithm reference for the unitary builder.

build_circuit(state_preparation, qubit_hamiltonian)[source]

Build the standard QPE circuit using Qiskit.

Return type:

Circuit

Parameters:
  • state_preparation (Circuit) – The circuit that prepares the initial state.

  • qubit_hamiltonian (QubitOperator) – The qubit operator for which to estimate the phase.

Returns:

The constructed QPE quantum circuit.

name()[source]

Return the name of the builder algorithm.

Return type:

str