# openfermion.circuits.prepare_one_body_squared_evolution

Get Givens angles and DiagonalHamiltonian to simulate squared one-body.

The goal here will be to prepare to simulate evolution under :math:(\sum_{pq} h_{pq} a^\dagger_p a_q)^2 by decomposing as :math:R e^{-i \sum_{pq} V_{pq} n_p n_q} R^\dagger' where :math:R is a basis transformation matrix.

one_body_matrix (ndarray of floats): an N by N array storing the coefficients of a one-body operator to be squared. For instance, in the above the elements of this matrix are :math:h_{pq}. spin_basis (bool): Whether the matrix is passed in the spin orbital basis.

density_density_matrix(ndarray of floats) an N by N array storing the diagonal two-body coefficeints :math:V_{pq} above. basis_transformation_matrix (ndarray of floats) an N by N array storing the values of the basis transformation.

ValueError` one_body_matrix is not Hermitian.

[{ "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" }]