Given: Ry(theta) acting on one qubit

I'm trying to use existing Cirq Operators to build the conjugate transpose of the above gate. I need the operator to produce the exact unitary of the given gate for the given theta.

I'v already used cirq.optimizers.single_qubit_matrix_to_gates. It gives YPowGates but the global phase changes with theta. I need either the exact unitary of the gate or another conversion that its global phase does not change with theta.


cirq.inverse(operation) will return the conjugate transpose of an operation.

Equivalently, you can use operation**-1 (this is the first thing that cirq.inverse tries).

For the specific case of $R_y$, you can just negate the angle i.e. use cirq.ry(-theta).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.