qdk_chemistry.data.unitary_representation.containers.quantum_walk module
QDK/Chemistry quantum walk operator container module.
- class qdk_chemistry.data.unitary_representation.containers.quantum_walk.LCUWalkContainer(block_encoding, power=1, scale=1.0)[source]
Bases:
QuantumWalkContainerQuantum walk operator wrapping an LCU block encoding.
Represents:
\[W^k = \left[(2|0\rangle\langle 0| - I) \cdot \text{PREPARE}^\dagger \cdot \text{SELECT} \cdot \text{PREPARE}\right]^k\]This container stores a reference to the underlying
LCUContainerand exposes all block-encoding data through it.- Parameters:
block_encoding (BlockEncodingContainer)
power (int)
scale (float)
- __init__(block_encoding, power=1, scale=1.0)[source]
Initialize an LCUWalkContainer.
- Parameters:
block_encoding (BlockEncodingContainer) – The block encoding container to wrap with a reflection.
power (int) – Number of times to apply the walk operator (for \(W^k\) in QPE).
scale (float) – The 1-norm used for eigenvalue-phase conversion.
- Return type:
None
- property block_encoding: BlockEncodingContainer[source]
Get the underlying block encoding container.
- Returns:
The LCU block encoding that this walk operator wraps.
- property power: int[source]
Number of times to apply the walk operator.
- Returns:
The power value.
- Return type:
- property num_qubits: int[source]
Total number of qubits (same as the block encoding).
- Returns:
The combined qubit count.
- Return type:
- property type: str[source]
Get the type of the unitary container.
- Returns:
The type string
"lcu_walk".- Return type:
- to_hdf5(group)[source]
Save the LCUWalkContainer to an HDF5 group.
- Return type:
- Parameters:
group (h5py.Group) – HDF5 group to write container data to.
- classmethod from_json(json_data)[source]
Create an LCUWalkContainer from a JSON dictionary.
- class qdk_chemistry.data.unitary_representation.containers.quantum_walk.QuantumWalkContainer[source]
Bases:
UnitaryContainerAbstract base class for quantum walk operator containers.
A quantum walk operator is defined as:
\[W = (2|0\rangle\langle 0| - I) \cdot B[H]\]where \(B[H]\) is a block encoding of the Hamiltonian. The eigenvalues of \(W\) are \(e^{\pm i \arccos(E_k / \lambda)}\), enabling eigenvalue extraction via quantum phase estimation.