![]() |
Returns a Cirq TwoQubitDiagonalGate for pyQuil's CPHASE01 gate.
cirq_rigetti.quil_input.cphase01(
phi: float
) -> TwoQubitDiagonalGate
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].
Args | |
---|---|
phi
|
Gate parameter (in radians). |
Returns | |
---|---|
A TwoQubitDiagonalGate equivalent to a CPHASE01 gate of given angle. |