cirq.givens¶
-
cirq.
givens
(angle_rads: Union[float, sympy.core.basic.Basic]) → cirq.ops.phased_iswap_gate.PhasedISwapPowGate[source]¶ Returns gate with matrix exp(-i angle_rads (Y⊗X - X⊗Y) / 2).
In numerical linear algebra Givens rotation is any linear transformationwith matrix equal to the identity except for a 2x2 orthogonal submatrix[[cos(a), -sin(a)], [sin(a), cos(a)]] which performs a 2D rotation on asubspace spanned by two basis vectors. In quantum computational chemistrythe term is used to refer to the two-qubit gate defined asgivens(a) ≡ exp(-i a (Y⊗X - X⊗Y) / 2)
with the matrix
[[1, 0, 0, 0], [0, c, -s, 0], [0, s, c, 0], [0, 0, 0, 1]]
where
c = cos(a), s = sin(a).
The matrix is a Givens rotation in the numerical linear algebra senseacting on the subspace spanned by the |01⟩ and |10⟩ states.The gate is also equivalent to the ISWAP conjugated by T^-1 ⊗ T.
- Parameters
angle_rads – The rotation angle in radians.
- Returns
A phased iswap gate for the given rotation.