workbench_algorithms.subroutines.block_encoding
Main Qubricks for block encoding implementations.
LCU
Bases: Qubrick
Implements a general block encoding using Linear Combination of Unitaries (LCU).
Constructs the block encoding as \(\text{PREP}-\text{SELECT}-\text{PREP}^\dagger\)
using provided Qubrick implementations of SELECT and PREP.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state_prep
|
StatePreparation
|
A Qubrick implementing a state preparation ( |
required |
select
|
Select
|
A Qubrick implementing a select ( |
required |
**kwargs
|
dict[str, Any]
|
Other arguments to pass to the init. |
{}
|
compute
compute(
psi: Qubits,
be_ancilla_reg: Qubits,
data: PauliSum | list[int],
ctrl: Qubits | int = 0,
**kwargs: dict[str, Any],
)
Compute the block encoding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
psi
|
Qubits
|
Target state register. |
required |
be_ancilla_reg
|
Qubits
|
Block encoding auxiliary register. |
required |
data
|
PauliSum | list[int]
|
Hamiltonian or bitstring values to be block-encoded. |
required |
ctrl
|
Qubits | int
|
Register to control on. Defaults to |
0
|
**kwargs
|
dict[str, Any]
|
Extra kwargs to maintain compatibility with other Qubricks. |
{}
|