# CCRy gate (Controlled-Controlled-RY) **CCRy** applies Y rotation by $\theta$ to the target if both controls are $|1\rangle$. Parametric doubly-controlled rotation for variational algorithms. Action: $|c_1 c_2 t\rangle \to |c_1 c_2 (R_Y(\theta)|t\rangle)\rangle$ where rotation is applied only when both controls are $|1\rangle$. $$\text{CCRy}(\theta) = \begin{pmatrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & \cos(\theta/2) & -\sin(\theta/2) & 0 & 0 \\ 0 & 0 & 0 & 0 & \sin(\theta/2) & \cos(\theta/2) & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & \cos(\theta/2) & -\sin(\theta/2) \\ 0 & 0 & 0 & 0 & 0 & 0 & \sin(\theta/2) & \cos(\theta/2) \end{pmatrix}$$ ## Properties - **Parametric**: rotation angle $\theta$ is tunable - **Asymmetric**: control and target qubits are distinct - **Real-valued**: unlike CCRx which has imaginary entries - **Exponential form**: $\text{CCRy}(\theta) = e^{-i\theta Y/2}$ on target when controls are $|11\rangle$ ## Uses - **Variational quantum algorithms**: QAOA and VQE ansätze with doubly-controlled rotations - **Conditional state preparation**: rotate target state based on control qubits - **Quantum simulation**: tunable Y interactions for Heisenberg-like models - **Parameterized circuits**: hybrid classical-quantum optimization ## Decomposition CCRy can be decomposed using CX and single-qubit rotations: $$\text{CCRy}(\theta) = (I \otimes I \otimes R_Y(\theta/2)) \text{CNOT}_{12} \text{CNOT}_{02} (I \otimes I \otimes R_Y(\theta/2))$$ More efficient decompositions exist using fewer gates. ## Implementation - **Superconducting qubits**: decomposed into CX chains and single-qubit rotations - **Trapped ions**: controlled rotations via laser interactions - **Photonic**: challenging; typically decomposed ## Relations - [[quantum-gate-ccrx|CCRx]], [[quantum-gate-ccry|CCRy]], [[quantum-gate-ccrz|CCRz]]: doubly-controlled rotations around three axes - [[quantum-gate-ry|RY gate]]: single-qubit version; target rotation - [[quantum-gate-rotation|Rotation gates]]: general parametric rotation category - [[quantum-gate-three-qubit|Three-qubit gates]]: general category