dyson.expressions.fci#

Full configuration interaction (FCI) expressions [1].

Classes

BaseFCI(mol, e_fci, c_fci, hamiltonian, diagonal)

Base class for FCI expressions.

FCI

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

FCI_1h(mol, e_fci, c_fci, hamiltonian, diagonal)

FCI expressions for the hole Green's function.

FCI_1p(mol, e_fci, c_fci, hamiltonian, diagonal)

FCI expressions for the particle Green's function.

class dyson.expressions.fci.BaseFCI(mol: Mole, e_fci: Array, c_fci: Array, hamiltonian: Array, diagonal: Array, chempot: Array | float = 0.0)[source]#

Bases: BaseExpression

Base class for FCI expressions.

hermitian_downfolded: bool = True#
hermitian_upfolded: bool = True#
SIGN: int#
DELTA_ALPHA: int#
DELTA_BETA: int#
STATE_FUNC: Callable[[Array, int, tuple[int, int], int], Array]#
classmethod from_fci(ci: fci.FCI, h1e: Array, h2e: Array) BaseFCI[source]#

Create an expression from an FCI object.

Parameters:
  • ci – FCI object.

  • h1e – One-electron Hamiltonian matrix.

  • h2e – Two-electron Hamiltonian matrix.

Returns:

Expression object.

classmethod from_mf(mf: RHF) BaseFCI[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.

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.

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

Build the self-energy moments.

Parameters:
  • nmom – Number of moments to compute.

  • reduction – Reduction method to apply to the moments.

Returns:

Moments of the self-energy.

property mol: Mole#

Molecule object.

property e_fci: Array#

FCI eigenvalues.

property c_fci: Array#

FCI eigenvectors.

property hamiltonian: Array#

Hamiltonian matrix.

property chempot: Array | float#

Chemical potential.

Index helpers.

property non_dyson: bool#

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

property nconfig: int#

Number of configurations.

class dyson.expressions.fci.FCI_1h(mol: Mole, e_fci: Array, c_fci: Array, hamiltonian: Array, diagonal: Array, chempot: Array | float = 0.0)[source]#

Bases: BaseFCI

FCI expressions for the hole Green’s function.

SIGN: int = -1#
DELTA_ALPHA: int = -1#
DELTA_BETA: int = 0#
static STATE_FUNC(ci0, norb, neleca_nelecb, ap_id)#

Construct (N-1)-electron wavefunction by removing an alpha electron from the N-electron wavefunction.

… math:

|N-1\rangle = \hat{a}_p |N\rangle
Parameters:
  • ci0 – 2D array CI coefficients, row for alpha strings and column for beta strings.

  • norb – int Number of orbitals.

  • (neleca – (int,int) Number of (alpha, beta) electrons of the input CI function

  • nelecb) – (int,int) Number of (alpha, beta) electrons of the input CI function

  • ap_id – int Orbital index (0-based), for the annihilation operator

Returns:

2D array, row for alpha strings and column for beta strings. Note it has different number of rows to the input CI coefficients

property nsingle: int#

Number of configurations in the singles sector.

class dyson.expressions.fci.FCI_1p(mol: Mole, e_fci: Array, c_fci: Array, hamiltonian: Array, diagonal: Array, chempot: Array | float = 0.0)[source]#

Bases: BaseFCI

FCI expressions for the particle Green’s function.

SIGN: int = 1#
DELTA_ALPHA: int = 1#
DELTA_BETA: int = 0#
static STATE_FUNC(ci0, norb, neleca_nelecb, ap_id)#

Construct (N+1)-electron wavefunction by adding an alpha electron in the N-electron wavefunction.

… math:

|N+1\rangle = \hat{a}^+_p |N\rangle
Parameters:
  • ci0 – 2D array CI coefficients, row for alpha strings and column for beta strings.

  • norb – int Number of orbitals.

  • (neleca – (int,int) Number of (alpha, beta) electrons of the input CI function

  • nelecb) – (int,int) Number of (alpha, beta) electrons of the input CI function

  • ap_id – int Orbital index (0-based), for the creation operator

Returns:

2D array, row for alpha strings and column for beta strings. Note it has different number of rows to the input CI coefficients.

property nsingle: int#

Number of configurations in the singles sector.

class dyson.expressions.fci.FCI[source]#

Bases: ExpressionCollection

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