# cirq.givens

Returns gate with matrix exp(-i angle_rads (Y⊗X - X⊗Y) / 2).

In numerical linear algebra Givens rotation is any linear transformation with 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 a subspace spanned by two basis vectors. In quantum computational chemistry the term is used to refer to the two-qubit gate defined as

``````givens(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 sense acting on the subspace spanned by the |01⟩ and |10⟩ states.

The gate is also equivalent to the ISWAP conjugated by T^-1 ⊗ T.

`angle_rads` The rotation angle in radians.

A phased iswap gate for the given rotation.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]