Decompose a matrix into a sequence of Givens rotations and particle-hole transformations on the last fermionic mode.
View aliases
Main aliases
openfermion.fermionic_gaussian_decomposition
, openfermion.linalg.givens_rotations.fermionic_gaussian_decomposition
openfermion.linalg.fermionic_gaussian_decomposition(
unitary_rows
)
The input is an N×2N matrix W with orthonormal rows. Furthermore, W must have the block form
W=(W1W2)
where W1 and W2 satisfy
W_1 W_1^\dagger + W_2 W_2^\dagger &= I
W_1 W_2^T + W_2 W_1^T &= 0.
Then W can be decomposed as
VWU†=(0D)
where V and U are unitary matrices and D is a diagonal unitary matrix. Furthermore, U can be decomposed as follows:
U=BGk⋯BG3G2BG1B,
where each Gi is a Givens rotation, and B represents swapping the N-th column with the 2N-th column, which corresponds to a particle-hole transformation on the last fermionic mode. This particle-hole transformation maps a†N to aN and vice versa, while leaving the other fermionic ladder operators invariant.
The decomposition of U is returned as a list of tuples of objects describing rotations and particle-hole transformations. The list looks something like [('pht', ), (G_1, ), ('pht', G_2), ... ]. The objects within a tuple are either the string 'pht', which indicates a particle-hole transformation on the last fermionic mode, or a tuple of the form (i,j,θ,φ), which indicates a Givens rotation of rows i and j by angles θ and φ.
The matrix VTD∗ can also be decomposed as a sequence of Givens rotations. This decomposition is needed for a circuit that prepares an excited state.
Returns
decomposition (list[tuple]):
The decomposition of \\(U\\).
left_decomposition (list[tuple]):
The decomposition of \\(V^T D^*\\).
diagonal (ndarray):
A list of the nonzero entries of \\(D\\).
left_diagonal (ndarray):
A list of the nonzero entries left from the decomposition
of \\(V^T D^*\\).