qdk_chemistry.algorithms.controlled_circuit_mapper package
QDK/Chemistry controlled circuit mapper module.
- class qdk_chemistry.algorithms.controlled_circuit_mapper.ControlledCircuitMapperFactory
Bases:
AlgorithmFactoryFactory class for creating ControlledCircuitMapper instances.
- algorithm_type_name()
Return controlled_circuit_mapper as the algorithm type name.
- Return type:
- class qdk_chemistry.algorithms.controlled_circuit_mapper.ControlledCircuitMapperSettings
Bases:
SettingsSettings for the ControlledCircuitMapper.
- control_indices
The control qubit indices. Defaults to
[0].
- target_indices
The target qubit indices. An empty list means auto-fill based on the unitary’s qubit count and control indices.
- __init__()
Initialize the settings for ControlledCircuitMapper.
- class qdk_chemistry.algorithms.controlled_circuit_mapper.ControlledPSPMapper
Bases:
ControlledCircuitMapperControlled circuit mapper using the PREPARE-SELECT-PREPARE pattern.
Composes a controlled block encoding from:
PREPARE — amplitude-loading into the ancilla register, resolved via the
preparesetting. Defaults toDensePureStatePreparation.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#
PrepSelPrepoperation:\[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__()
Initialize the ControlledPSPMapper.
- name()
Return the algorithm name.
- class qdk_chemistry.algorithms.controlled_circuit_mapper.ControlledPSPMapperSettings
Bases:
ControlledCircuitMapperSettingsSettings for the ControlledPSPMapper.
- prepare
Algorithm reference for the PREPARE oracle state preparation. Defaults to
DensePureStatePreparation.
- __init__()
Initialize the settings for ControlledPSPMapper.
- class qdk_chemistry.algorithms.controlled_circuit_mapper.ControlledPauliSequenceMapper
Bases:
ControlledCircuitMapperControlled evolution circuit mapper using Pauli product formula term sequences.
Given a time-evolution operator expressed as a Pauli product formula \(U(t) \approx \left[ U_{\mathrm{step}}(t / r) \right]^{r}\), this mapper constructs a controlled version of \(U(t)\) using the following pattern:
Each Pauli operator \(P_j\) is basis-rotated into the \(Z\) basis.
Qubits involved in \(P_j\) are entangled into a sequence using CNOT gates.
- A controlled \(R_z\) rotation implements
\(e^{-i\,\theta_j\,P_j} \;\rightarrow\; \text{CRZ}(2 \theta_j)\).
The basis rotations and entangling operations are uncomputed.
Notes
Currently supports only single-control-qubit scenarios.
Requires a
PauliProductFormulaContainerfor the time evolution unitary.
- __init__()
Initialize the PauliSequenceMapper.
Submodules
- qdk_chemistry.algorithms.controlled_circuit_mapper.base module
- qdk_chemistry.algorithms.controlled_circuit_mapper.controlled_pauli_sequence_mapper module
- qdk_chemistry.algorithms.controlled_circuit_mapper.controlled_psp_mapper module