guppyalgos.algorithms.phase_estimation

Initialization for the QPE module.

Functions

hadamard_test(ancilla, unitary_regs, ...)

Apply the Hadamard test for a controlled unitary.

iqpe(phase_reg, unitary_regs, ...)

Algorithmic primitive for canonical quantum phase estimation.

qpe(phase_reg, unitary_regs, power_oracle)

Algorithmic primitive for canonical quantum phase estimation.

qubitized_power_oracle(control, regs, power, ...)

Apply a controlled qubitization walk repeatedly as requested by QPE.

Classes

QubitizationRegs()

Registers acted on by a qubitized walk operator during phase estimation.

class guppyalgos.algorithms.phase_estimation.QubitizationRegs

Registers acted on by a qubitized walk operator during phase estimation.

prep: array[qubit, TypeVar(n_prep_q, bound= nat)]
target: TypeVar(TargetRegs)
guppyalgos.algorithms.phase_estimation.hadamard_test(ancilla, unitary_regs, controlled_unitary)

Apply the Hadamard test for a controlled unitary.

The caller supplies the control qubit, the system register, and a controlled unitary acting on that register. The ancilla is prepared in |+> and returned through a final Hadamard so the usual Hadamard-test readout can be measured by the caller.

Parameters:
  • ancilla – Control qubit used for the Hadamard test.

  • unitary_regs – The target unitary register, which may be an array or a structured register wrapper.

  • controlled_unitary – Controlled oracle acting on (ancilla, unitary_regs).

guppyalgos.algorithms.phase_estimation.iqpe(phase_reg, unitary_regs, inverse_power_oracle)

Algorithmic primitive for canonical quantum phase estimation.

Parameters:
  • phase_reg – The phase register on which the phase is written.

  • unitary_regs – Registers acted on by the powered controlled unitary. It is the responsibility of the powered unitary to interpret this set of registers correctly.

  • inverse_power_oracle – Controlled oracle for the inverse unitary powers.

Returns:

The binary power phase kickback encoded ancilla register in superposition with the unitary registers.

guppyalgos.algorithms.phase_estimation.qpe(phase_reg, unitary_regs, power_oracle)

Algorithmic primitive for canonical quantum phase estimation.

Parameters:
  • phase_reg – The phase register on which the phase is written.

  • unitary_regs – Registers acted on by the powered controlled unitary. It is the responsibility of the powered unitary to interpret this set of registers correctly.

  • power_oracle – Controlled oracle that applies the requested unitary power.

Returns:

The binary power phase kickback encoded ancilla register in superposition with the unitary registers.

guppyalgos.algorithms.phase_estimation.qubitized_power_oracle(control, regs, power, cntrl_walk)

Apply a controlled qubitization walk repeatedly as requested by QPE.

Modules

canonical_phase_estimation

Phase estimation.