openfermion.circuits.get_chemist_two_body_coefficients
Convert two-body operator coefficients to low rank tensor.
openfermion.circuits.get_chemist_two_body_coefficients(
two_body_coefficients, spin_basis=True
)
The input is a two-body fermionic Hamiltonian expressed as
\(\sum_{pqrs} h_{pqrs} a^\dagger_p a^\dagger_q a_r a_s\)
We will convert this to the chemistry convention expressing it as
\(\sum_{pqrs} g_{pqrs} a^\dagger_p a_q a^\dagger_r a_s\)
but without the spin degree of freedom.
In the process of performing this conversion, constants and one-body
terms come out, which will be returned as well.
Args |
two_body_coefficients
|
ndarray
an N x N x N x N
numpy array giving the \(h_{pqrs}\) tensor.
|
spin_basis
|
bool
True if the two-body terms are passed in spin
orbital basis. False if already in spatial orbital basis.
|
Returns |
one_body_correction
|
ndarray
an N x N array of floats giving
coefficients of the \(a^\dagger_p a_q\) terms that come out.
|
chemist_two_body_coefficients
|
ndarray
an N x N x N x N numpy array
giving the \(g_{pqrs}\) tensor in chemist notation.
|
Raises |
TypeError
|
Input must be two-body number conserving
FermionOperator or InteractionOperator.
|
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.
[{
"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"
}]
{"lastModified": "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."],[],[]]