qdk_chemistry.algorithms.controlled_circuit_mapper.controlled_psp_mapper module

QDK/Chemistry PREPARE-SELECT-PREPARE controlled circuit mapper.

class qdk_chemistry.algorithms.controlled_circuit_mapper.controlled_psp_mapper.ControlledPSPMapper[source]

Bases: ControlledCircuitMapper

Controlled circuit mapper using the PREPARE-SELECT-PREPARE pattern.

Composes a controlled block encoding from:

  1. PREPARE — amplitude-loading into the ancilla register, resolved via the prepare setting. Defaults to DensePureStatePreparation.

  2. SELECT — Pauli SELECT oracle applied on the system register, constructed directly from the block-encoding container’s SELECT data.

The two callables are stitched together by the Q# PrepSelPrep operation:

\[B[H] = \mathrm{PREPARE}^\dagger \cdot \mathrm{SELECT} \cdot \mathrm{PREPARE}\]

When the input is an LCUWalkContainer, the block encoding is additionally wrapped with the reflection operator to form a quantum walk:

\[W = (2|0\rangle\langle 0| - I) \cdot B[H]\]
__init__()[source]

Initialize the ControlledPSPMapper.

name()[source]

Return the algorithm name.

Return type:

str

Returns:

The name "prepare_select_prepare".

Return type:

str

type_name()[source]

Return the algorithm type name.

Return type:

str

Returns:

The type name "controlled_circuit_mapper".

Return type:

str

class qdk_chemistry.algorithms.controlled_circuit_mapper.controlled_psp_mapper.ControlledPSPMapperSettings[source]

Bases: ControlledCircuitMapperSettings

Settings for the ControlledPSPMapper.

prepare

Algorithm reference for the PREPARE oracle state preparation. Defaults to DensePureStatePreparation.

__init__()[source]

Initialize the settings for ControlledPSPMapper.