openfermion.circuits.prepare_one_body_squared_evolution
Get Givens angles and DiagonalHamiltonian to simulate squared one-body.
openfermion.circuits.prepare_one_body_squared_evolution(
one_body_matrix, spin_basis=True
)
The goal here will be to prepare to simulate evolution under
\((\sum_{pq} h_{pq} a^\dagger_p a_q)^2\) by decomposing as
\(R e^{-i \sum_{pq} V_{pq} n_p n_q} R^\dagger\) where
\(R\) is a basis transformation matrix.
Args |
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 \(h_{pq}\).
|
spin_basis
|
bool
Whether the matrix is passed in the
spin orbital basis.
|
Returns |
density_densitymatrix(ndarray of floats) an N by N array storing
the diagonal two-body coefficeints \(V{pq}\) above.
basis_transformation_matrix (ndarray of floats) an N by N array
storing the values of the basis transformation.
|
Raises |
ValueError
|
one_body_matrix is not Hermitian.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]