ffsim.DoubleFactorizedHamiltonian

class ffsim.DoubleFactorizedHamiltonian(one_body_tensor, diag_coulomb_mats, orbital_rotations, constant=0.0, z_representation=False)[source]

Bases: SupportsApproximateEquality, SupportsDiagonal, SupportsFermionOperator, SupportsLinearOperator

A Hamiltonian in the double-factorized representation.

The double-factorized form of the molecular Hamiltonian is

\[\begin{split}H = \sum_{\substack{pq \\ \sigma}} \kappa_{pq} a^\dagger_{p\sigma} a_{q\sigma} + \frac12 \sum_t \sum_{\substack{ij \\ \sigma\tau}} J^{(t)}_{ij} n^{(t)}_{i\sigma} n^{(t)}_{j\tau} + \text{constant}.\end{split}\]

where

\[n^{(t)}_{i\sigma} = \sum_{pq} U^{(t)}_{pi} a^\dagger_{p\sigma} a_{q\sigma} U^{(t)*}_{qi}.\]

Here each \(U^{(t)}\) is a unitary matrix and each \(J^{(t)}\) is a real symmetric matrix.

“Z” representation

The “Z” representation of the double factorization is an alternative representation that sometimes yields simpler quantum circuits.

Under the Jordan-Wigner transformation, the number operators take the form

\[n^{(t)}_{i\sigma} = \frac{(1 - z^{(t)}_{i\sigma})}{2}\]

where \(z^{(t)}_{i\sigma}\) is the Pauli Z operator in the rotated basis. The “Z” representation is obtained by rewriting the two-body part in terms of these Pauli Z operators and updating the one-body term as appropriate:

\[\begin{split}H = \sum_{\substack{pq \\ \sigma}} \kappa'_{pq} a^\dagger_{p\sigma} a_{q\sigma} + \frac18 \sum_t \sum_{\substack{ij \\ \sigma\tau}}^* J^{(t)}_{ij} z^{(t)}_{i\sigma} z^{(t)}_{j\tau} + \text{constant}''\end{split}\]

where the asterisk denotes summation over indices \(ij, \sigma\tau\) where \(\sigma \neq \tau\) or \(i \neq j\).

References

one_body_tensor

The one-body tensor \(\kappa\).

Type:

np.ndarray

diag_coulomb_mats

The diagonal Coulomb matrices.

Type:

np.ndarray

orbital_rotations

The orbital rotations.

Type:

np.ndarray

constant

The constant.

Type:

float

z_representation

Whether the Hamiltonian is in the “Z” representation rather than the “number” representation.

Type:

bool

Methods

from_molecular_hamiltonian(hamiltonian, *[, ...])

Initialize a DoubleFactorizedHamiltonian from a MolecularHamiltonian.

to_molecular_hamiltonian()

Convert the DoubleFactorizedHamiltonian to a MolecularHamiltonian.

to_number_representation()

Return the Hamiltonian in the "number" representation.

to_z_representation()

Return the Hamiltonian in the "Z" representation.

Attributes