Learn more about our quantum error correction milestone


Returns a Cirq TwoQubitDiagonalGate for pyQuil's CPHASE01 gate.

In pyQuil, CPHASE01(phi) = diag(1, [exp(1j * phi), 1, 1]), and in Cirq, a TwoQubitDiagonalGate is specified by its diagonal in radians, which would be [0, phi, 0, 0].

phi Gate parameter (in radians).

A TwoQubitDiagonalGate equivalent to a CPHASE01 gate of given angle.