Native Parameterized Angle Hardware Gates¶
Native gates are gates on a quantum computer that the hardware physically executes. Different quantum computers may have different gates that are physically executed on the hardware. The Helios compiler realigns non-native gates in the user program into native gates. The runtime also determines virtual qubit to ion correspondence.
Quantinuum Helios’ native gate set includes parameterized angle ZZ gates. This is beneficial for reducing the 2-qubit gate count for many quantum algorithms and gate sequences.
Note that \(R_{zz}(\frac{\pi}{2}) = ZZ()\).
Basic Usage¶
Guppy provides a \(R_{zz}\) function, guppylang.std.qsystem.zz_phase(), that acts in-place on specified qubits (first and second arguments) and requires an angle in radians (last argument). Guppy provides a module, , to define angles in radians.
Quantum circuits that use the gate sequence CX, \(R_{z}\), CX can be replaced with \(R_{zz}\). Parameterized angle two-qubit gates can be used to improve fidelity of the output and to decrease two-qubit gate depth. Specifically, the error from parameterized angle two-qubit gates is less than the fixed-angle two-qubit gate for small angles. The error from both gates is the same at angle \(\frac{\phi}{2}\). The error from parameterized angle two-qubit gates increases with angle size.
pi constant¶
from guppylang import guppy
from guppylang.std.angles import pi
from guppylang.std.qsystem import zz_phase
from guppylang.std.quantum import qubit, discard
@guppy
def main() -> None:
q0 = qubit()
q1 = qubit()
a = pi * -0.125
zz_phase(q0, q1, a)
discard(q0)
discard(q1)
hugr = main.compile()
Angles¶
The function, guppy:guppylang.std.angles.angle(), accepts half-turns as input. The output instance corresponds to a value in radians.
angle(1): \(\pi\)angle(-0.5): \(-\frac{\pi}{2}\)
from guppylang import guppy
from guppylang.std.angles import angle
from guppylang.std.qsystem import zz_phase
from guppylang.std.quantum import qubit, discard
@guppy
def main() -> None:
q0 = qubit()
q1 = qubit()
a = angle(-0.125)
zz_phase(q0, q1, a)
discard(q0)
discard(q1)
hugr = main.compile()