DEFGATE FSIM(%theta, %phi):
1, 0, 0, 0
0, cos(%theta/2), i*sin(%theta/2), 0
0, i*sin(%theta/2), cos(%theta/2), 0
0, 0, 0, cis(%phi)
DEFGATE PHASEDFSIM(%theta, %zeta, %chi, %gamma, %phi):
1, 0, 0, 0
0, cis(-%gamma - %zeta)*cos(%theta/2), i*cis(%chi - %gamma)*sin(%theta/2), 0
0, i*cis(-%gamma - %chi)*sin(%theta/2), cis(%zeta - %gamma)*cos(%theta/2), 0
0, 0, 0, cis(%phi - 2*%gamma)
DEFGATE RZZ(%phi):
cis(-%phi/2), 0, 0, 0
0, cis(%phi/2), 0, 0
0, 0, cis(%phi/2), 0
0, 0, 0, cis(-%phi/2)
DEFGATE RXX(%phi):
cos(%phi/2), 0, 0, -i*sin(%phi/2)
0, cos(%phi/2), -i*sin(%phi/2), 0
0, -i*sin(%phi/2), cos(%phi/2), 0
-i*sin(%phi/2), 0, 0, cos(%phi/2)
DEFGATE RYY(%phi):
cos(%phi/2), 0, 0, i*sin(%phi/2)
0, cos(%phi/2), -i*sin(%phi/2), 0
0, -i*sin(%phi/2), cos(%phi/2), 0
i*sin(%phi/2), 0, 0, cos(%phi/2)
QVM: quil-lang/qvm#325
QuilC: quil-lang/quilc#930