workbench_algorithms.subroutines.phase_gradient_adder
Qubrick for phase gradient adder.
PhaseGradientAdder
Bases: Qubrick
Optimized adder for use in phase gradient addition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
dict[str, Any]
|
Keyword arguments |
{}
|
compute
Circuit for optimized phase gradient adder.
This construction comes from Fig. 13 in arXiv:2007.07391.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lhs
|
QUInt | None
|
The register with the phase gradient catalyst state. May be |
required |
rhs
|
QUInt
|
The register we are adding into the phase gradient register. |
required |
ctrl
|
(Optional, int | Qubits)
|
Control register. Defaults to |
None
|
Note
- The phase gradient register is usually one qubit smaller than the rhs.
- However, there exists at least one known case where they are equal in size (ex. when using GivensRotationTwoAdders).
- When they are the same size, we can actually drop a CZ, and so, we distinguish these cases.
- For
rhstwo qubits andlhsone qubit shorter thanrhs, the Fig.~13 chain collapses to three bilinear gates (no temporary elbow). With no adder control, those arelhs.z(rhs[0]),lhs.x(rhs[0]),rhs[1].z(). With a control registerctrl(e.g. bidirectional rotation tests), mergectrlinto each gate aslhs[0].z(rhs[0] | ctrl),lhs[0].x(rhs[0] | ctrl),rhs[1].z(cond=ctrl). - For
lhsandrhsboth a single qubit, only the closing segment remains (matchingGidneyAddon one-qubitlhs).