A controlled-Ry gate, written CRy(θ), applies Ry(θ) to a target qubit exactly when its control qubit is |1⟩; when the control is |0⟩, the state remains unchanged. section 2.3.1
With the left qubit as control and the right as target:
- CRy(θ)|10⟩ = cos(θ/2)|10⟩ + sin(θ/2)|11⟩. section 2.3.1
- CRy(θ)|11⟩ = −sin(θ/2)|10⟩ + cos(θ/2)|11⟩. section 2.3.1
- CRy(θ)|00⟩ = |00⟩ and CRy(θ)|01⟩ = |01⟩. section 2.3.1
Applying the gate to a superposition
For α|10⟩ + β|01⟩, apply CRy(θ) term by term: α(cos(θ/2)|10⟩ + sin(θ/2)|11⟩) + β|01⟩. section 2.3.1
