View source on GitHub |
Apply a double Givens rotation.
openfermion.linalg.double_givens_rotate(
operator, givens_rotation, i, j, which='row'
)
Applies a Givens rotation to coordinates i and j and the conjugate Givens rotation to coordinates n + i and n + j, where n = dim(operator) / 2. dim(operator) must be even.