dyson.expressions.hf#

Hartree–Fock (HF) expressions [1].

Classes

BaseHF(mol, mo_energy)

Base class for HF expressions.

HF

Collection of HF expressions for different parts of the Green's function.

HF_1h(mol, mo_energy)

HF expressions for the hole Green's function.

HF_1p(mol, mo_energy)

HF expressions for the particle Green's function.

HF_Dyson(mol, mo_energy)

HF expressions for the Dyson Green's function.

class dyson.expressions.hf.BaseHF(mol: Mole, mo_energy: Array)[source]#

Bases: BaseExpression

Base class for HF expressions.

hermitian_downfolded: bool = True#
hermitian_upfolded: bool = True#
classmethod from_mf(mf: RHF) BaseHF[source]#

Create an expression from a mean-field object.

Parameters:

mf – Mean-field object.

Returns:

Expression object.

apply_hamiltonian(vector: Array) Array[source]#

Apply the Hamiltonian to a vector.

Parameters:

vector – Vector to apply Hamiltonian to.

Returns:

Output vector.

abstractmethod diagonal() Array[source]#

Get the diagonal of the Hamiltonian.

Returns:

Diagonal of the Hamiltonian.

build_se_moments(nmom: int, reduction: Reduction = Reduction.NONE) Array[source]#

Build the self-energy moments.

Parameters:
  • nmom – Number of moments.

  • reduction – Reduction method to apply to the moments.

Returns:

Self-energy moments.

property mol: Mole#

Molecule object.

property mo_energy: Array#

Molecular orbital energies.

property non_dyson: bool#

Whether the expression produces a non-Dyson Green’s function.

property nconfig: int#

Number of configurations.

class dyson.expressions.hf.HF_1h(mol: Mole, mo_energy: Array)[source]#

Bases: BaseHF

HF expressions for the hole Green’s function.

diagonal() Array[source]#

Get the diagonal of the Hamiltonian.

Returns:

Diagonal of the Hamiltonian.

get_excitation_vector(orbital: int) Array[source]#

Obtain the vector corresponding to a fermionic operator acting on the ground state.

This vector is a generalisation of

\[f_i^{\pm} \left| \Psi_0 \right>\]

where \(f_i^{\pm}\) is the fermionic creation or annihilation operator, or a product thereof, depending on the particular expression and what Green’s function it corresponds to.

The vector defines the excitaiton manifold probed by the Green’s function corresponding to the expression.

Parameters:

orbital – Orbital index.

Returns:

Excitation vector.

property nsingle: int#

Number of configurations in the singles sector.

class dyson.expressions.hf.HF_1p(mol: Mole, mo_energy: Array)[source]#

Bases: BaseHF

HF expressions for the particle Green’s function.

diagonal() Array[source]#

Get the diagonal of the Hamiltonian.

Returns:

Diagonal of the Hamiltonian.

get_excitation_vector(orbital: int) Array[source]#

Obtain the vector corresponding to a fermionic operator acting on the ground state.

This vector is a generalisation of

\[f_i^{\pm} \left| \Psi_0 \right>\]

where \(f_i^{\pm}\) is the fermionic creation or annihilation operator, or a product thereof, depending on the particular expression and what Green’s function it corresponds to.

The vector defines the excitaiton manifold probed by the Green’s function corresponding to the expression.

Parameters:

orbital – Orbital index.

Returns:

Excitation vector.

property nsingle: int#

Number of configurations in the singles sector.

class dyson.expressions.hf.HF_Dyson(mol: Mole, mo_energy: Array)[source]#

Bases: BaseHF

HF expressions for the Dyson Green’s function.

diagonal() Array[source]#

Get the diagonal of the Hamiltonian.

Returns:

Diagonal of the Hamiltonian.

get_excitation_vector(orbital: int) Array[source]#

Obtain the vector corresponding to a fermionic operator acting on the ground state.

This vector is a generalisation of

\[f_i^{\pm} \left| \Psi_0 \right>\]

where \(f_i^{\pm}\) is the fermionic creation or annihilation operator, or a product thereof, depending on the particular expression and what Green’s function it corresponds to.

The vector defines the excitaiton manifold probed by the Green’s function corresponding to the expression.

Parameters:

orbital – Orbital index.

Returns:

Excitation vector.

property nsingle: int#

Number of configurations in the singles sector.

property non_dyson: bool#

Whether the expression produces a non-Dyson Green’s function.

class dyson.expressions.hf.HF[source]#

Bases: ExpressionCollection

Collection of HF expressions for different parts of the Green’s function.