openfermion.circuits.low_rank_two_body_decomposition
Convert two-body operator into sum of squared one-body operators.
openfermion.circuits.low_rank_two_body_decomposition(
two_body_coefficients,
truncation_threshold=1e-08,
final_rank=None,
spin_basis=True
)
As in arXiv:1808.02625, this function decomposes
\(\sum_{pqrs} h_{pqrs} a^\dagger_p a^\dagger_q a_r a_s\) as
\(\sum_{l} \lambda_l (\sum_{pq} g_{lpq} a^\dagger_p a_q)^2\)
l is truncated to take max value L so that
\(\sum_{l=0}^{L-1} (\sum_{pq} |g_{lpq}|)^2 |\lambda_l| < x\)
Args |
two_body_coefficients
|
ndarray
an N x N x N x N
numpy array giving the \(h_{pqrs}\) tensor.
This tensor must be 8-fold symmetric (real integrals).
|
truncation_threshold
|
optional Float
the value of x, above.
|
final_rank
|
optional int
if provided, this specifies the value of
L at which to truncate. This overrides truncation_threshold.
|
spin_basis
|
bool
True if the two-body terms are passed in spin
orbital basis. False if already in spatial orbital basis.
|
Returns |
eigenvalues
|
ndarray of floats
length L array
giving the \(\lambda_l\).
|
one_body_squares
|
ndarray of floats
L x N x N array of floats
corresponding to the value of \(g_{pql}\).
|
one_body_correction
|
ndarray
One-body correction terms that result
from reordering to chemist ordering, in spin-orbital basis.
|
truncation_value
|
float
after truncation, this is the value
\(\sum_{l=0}^{L-1} (\sum_{pq} |g_{lpq}|)^2 |\lambda_l| < x\)
|
Raises |
TypeError
|
Invalid two-body coefficient tensor specification.
|
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."],[],[]]