|View source on GitHub|
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]]
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.
||The rotation angle in radians.|
|A phased iswap gate for the given rotation.|