workbench_algorithms.subroutines.dyson
Implementation of the DysonSeries Qubricks.
DysonSeriesPrepareUnary
Bases: Qubrick
A modified version of the Dyson series expansion as in arXiv:1805.00675.
Uses the PrepareClockState Qubrick as its subroutine to encode probabilities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sort
|
Qubrick
|
a qubrick implementing quantum sort. |
None
|
prepare
|
Qubrick
|
prepare qubrick to implement the prepare oracle for |
None
|
usp
|
Qubrick
|
a qubrick that prepares a uniform state. |
None
|
**kwargs
|
dict[str, Any]
|
Other arguments to pass to the init. |
{}
|
compute
Apply the Dyson series prepare operator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register
|
CompositeRegister
|
register for Dyson series indexing. |
required |
data
|
DysonSeriesData
|
Dataclass for the DysonSeries operator parameters. |
required |
ctrl
|
(Qubits, int)
|
A register to control this operation on. Default to |
0
|
Note
The control version is an optimized version when an input register is 0.
If the input register is not 0, the gates will be applied.
DysonSeriesSelectUnary
Bases: Qubrick
A modified version of the Dyson series expansion as in arXiv:1805.00675.
Note
If flagging time collisions, a flag qubrick is placed after the DysonSeriesSelectUnary
in the unary version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fast_forward_exp
|
Qubrick
|
a qubrick implementing the time-evolution of the fast-forwardable part of the Hamiltonian. |
required |
lcu
|
Qubrick
|
a block-encoding subroutine for appliying Hamiltonian to the sustem register. |
required |
flag
|
Qubrick
|
a unary version of a flag to mark time collisions in the time-discretization register. Flagging time collisions is optional. |
None
|
**kwargs
|
dict[str, Any]
|
Other arguments to pass to the init. |
{}
|
compute
Apply the Dyson series select operator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register
|
CompositeRegister
|
register for Dyson series indexing (unary version). |
required |
data
|
DysonSeriesData
|
Dataclass for the DysonSeries operator parameters. |
required |
ctrl
|
(Qubits, int)
|
A register to control this operation on. Default to |
0
|
FlagCollisionsUnary
Bases: Qubrick
A FlagCollisions Qubrick to reflect (time) collisions.
Implementation of the collision functionality as described in "Optimized quantum algorithms for simulating the Schwinger effect" research paper (internal document).
Note
for unary version of the DysonSeries (unary version of the truncation register).
compute
Construct the Qubrick.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
discret_reg
|
Qubits
|
registers to be compared (registers where time collisions may occure). |
required |
trunc_reg
|
Qubits
|
register indicating the value to compare up to. |
required |
ctrl
|
(Qubits, int)
|
a register to control this operation on. Default to |
0
|
Note on convention
The resulting register, flag, stores 1 if at least one collision occured, 0 otherwise.
DysonSeriesPrepareBinary
Bases: Qubrick
A modified version of the Dyson series expansion as in arXiv:1805.00675.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sort
|
Qubrick
|
a qubrick implementing quantum sort. |
None
|
prepare
|
Qubrick
|
prepare qubrick to implement the prepare oracle for |
None
|
usp
|
Qubrick
|
a qubrick that prepares a uniform state. |
None
|
**kwargs
|
dict[str, Any]
|
Other arguments to pass to the init. |
{}
|
compute
Apply the Dyson series prepare operator with binary version of the truncation register.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register
|
CompositeRegister
|
register for Dyson series indexing (binary). |
required |
data
|
DysonSeriesData
|
Dataclass for the DysonSeries operator parameters. |
required |
ctrl
|
(Qubits, int)
|
A register to control this operation on. Default to |
0
|
Note
The control version is an optimized version when an input register is 0.
If the input register is not 0, the gates will be applied.
DysonSeriesSelectBinary
Bases: Qubrick
A modified version of the Dyson series expansion as in arXiv:1805.00675.
Note
If flagging time collisions, a flag qubrick is placed before the DysonSeriesSelectBinary
in the binary version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
strategy_cg
|
class
|
strategy to apply compression gadget subroutine. |
required |
flag
|
Qubrick
|
a binary version of a flag to mark time collisions in the time-discretization register. Flagging time collisions is optional. |
None
|
adder
|
Qubrick
|
a qubrick implementing add/subtract operation. |
None
|
**kwargs
|
dict[str, Any]
|
Other arguments to pass to the init. |
{}
|
compute
Apply the Dyson series select operator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register
|
CompositeRegister
|
register (binary) for Dyson series indexing. |
required |
data
|
DysonSeriesData
|
Dataclass for the DysonSeries operator parameters. |
required |
ctrl
|
(Qubits, int)
|
A register to control this operation on. Default to |
0
|
FlagCollisionsBinary
Bases: Qubrick
A FlagCollisionsBinary Qubrick to reflect (time) collisions.
Implementation of the collision functionality as described in "Optimized quantum algorithms for simulating the Schwinger effect" research paper (internal document).
Note
For the DysonSeriesBinary logic, the flag is to applied before the application of Hamiltonians, in contrast to DysonSeriesUnary logic.
compute
Construct the Qubrick.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
discret_reg
|
Qubits
|
registers to be compared (registers where time collisions may occure). |
required |
trunc_reg
|
Qubits
|
register indicating the value to compare up to. |
required |
ctrl
|
(Qubits, int)
|
a register to control this operation on. Default to |
0
|
Note on convention
The resulting register, flag, stores 1 if at least one collision occured, 0 otherwise.
DysonSeriesLCU
Bases: Qubrick
A Dyson Series LCU Qubrick with a unary version of the truncation register.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prepare
|
Qubrick
|
a prepare qubrick for Dyson Series. |
required |
select
|
Qubrick
|
a select qubrick for Dyson Series. |
required |
**kwargs
|
dict[str, Any]
|
Other arguments to pass to the init. |
{}
|
compute
Apply Dyson Series.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
register
|
CompositeRegister
|
a composite register for Dyson Series. |
required |
data
|
DysonSeriesData
|
Dataclass for the DysonSeries operator parameters. |
required |
ctrl
|
(Qubits, int)
|
a register to control this operation on. Default to |
0
|