{ }
View source on GitHub |
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\)
Raises | |
---|---|
TypeError
|
Invalid two-body coefficient tensor specification. |