dyson.expressions.ccsd#

Coupled cluster singles and doubles (CCSD) expressions [1] [2].

Classes

BaseCCSD(mol, t1, t2, l1, l2, imds)

Base class for CCSD expressions.

CCSD

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

CCSD_1h(mol, t1, t2, l1, l2, imds)

IP-EOM-CCSD expressions.

CCSD_1p(mol, t1, t2, l1, l2, imds)

EA-EOM-CCSD expressions.

class dyson.expressions.ccsd.BaseCCSD(mol: Mole, t1: Array, t2: Array, l1: Array, l2: Array, imds: Any)[source]#

Bases: BaseExpression

Base class for CCSD expressions.

hermitian_downfolded: bool = False#
hermitian_upfolded: bool = False#
partition: str | None = None#
PYSCF_EOM = <module 'pyscf.cc.eom_rccsd' from '/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/pyscf/cc/eom_rccsd.py'>#
classmethod from_ccsd(ccsd: CCSD) BaseCCSD[source]#

Create an expression from a CCSD object.

Parameters:

ccsd – CCSD object.

Returns:

Expression object.

classmethod from_mf(mf: RHF) BaseCCSD[source]#

Create an expression from a mean-field object.

Parameters:

mf – Mean-field object.

Returns:

Expression object.

abstractmethod vector_to_amplitudes(vector: Array, *args: Any) tuple[Array, Array][source]#

Convert a vector to amplitudes.

Parameters:
  • vector – Vector to convert.

  • args – Additional arguments, redunantly passed during interoperation with PySCF.

Returns:

Amplitudes.

abstractmethod amplitudes_to_vector(t1: Array, t2: Array) Array[source]#

Convert amplitudes to a vector.

Parameters:
  • t1 – T1 amplitudes.

  • t2 – T2 amplitudes.

Returns:

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 t1: Array#

T1 amplitudes.

property t2: Array#

T2 amplitudes.

property l1: Array#

L1 amplitudes.

property l2: Array#

L2 amplitudes.

property non_dyson: bool#

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

property nmo: int#

Get the number of molecular orbitals.

class dyson.expressions.ccsd.CCSD_1h(mol: Mole, t1: Array, t2: Array, l1: Array, l2: Array, imds: Any)[source]#

Bases: BaseCCSD

IP-EOM-CCSD expressions.

vector_to_amplitudes(vector: Array, *args: Any) tuple[Array, Array][source]#

Convert a vector to amplitudes.

Parameters:
  • vector – Vector to convert.

  • args – Additional arguments, redunantly passed during interoperation with PySCF.

Returns:

Amplitudes.

amplitudes_to_vector(t1: Array, t2: Array) Array[source]#

Convert amplitudes to a vector.

Parameters:
  • t1 – T1 amplitudes.

  • t2 – T2 amplitudes.

Returns:

Vector.

apply_hamiltonian_right(vector: Array) Array[source]#

Apply the Hamiltonian to a vector.

Parameters:

vector – Vector to apply Hamiltonian to.

Returns:

Output vector.

apply_hamiltonian_left(vector: Array) Array[source]#

Apply the Hamiltonian to a vector on the left.

Parameters:

vector – Vector to apply Hamiltonian to.

Returns:

Output vector.

Notes

The Hamiltonian is applied in the opposite direction compared to canonical IP-EOM-CCSD, which reflects the opposite ordering of the excitation operators with respect to the physical indices in the Green’s function. This is only of consequence to non-Hermitian Green’s functions.

apply_hamiltonian(vector: Array) Array#

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_bra(orbital: int) Array[source]#

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

The bra vector is the excitation vector corresponding to the bra state, which may or may not be the same as the ket state vector.

Parameters:

orbital – Orbital index.

Returns:

Bra excitation vector.

Notes

The bra and ket are defined in the opposite direction compared to canonical IP-EOM-CCSD, which reflects the opposite ordering of the excitation operators with respect to the physical indices in the Green’s function. This is only of consequence to non-Hermitian Green’s functions.

See also

get_excitation_vector(): Function to get the excitation vector when the bra and ket are the same.

get_excitation_ket(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.

get_excitation_vector(orbital: int) Array#

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 nconfig: int#

Number of configurations.

class dyson.expressions.ccsd.CCSD_1p(mol: Mole, t1: Array, t2: Array, l1: Array, l2: Array, imds: Any)[source]#

Bases: BaseCCSD

EA-EOM-CCSD expressions.

vector_to_amplitudes(vector: Array, *args: Any) tuple[Array, Array][source]#

Convert a vector to amplitudes.

Parameters:
  • vector – Vector to convert.

  • args – Additional arguments, redunantly passed during interoperation with PySCF.

Returns:

Amplitudes.

amplitudes_to_vector(t1: Array, t2: Array) Array[source]#

Convert amplitudes to a vector.

Parameters:
  • t1 – T1 amplitudes.

  • t2 – T2 amplitudes.

Returns:

Vector.

apply_hamiltonian_right(vector: Array) Array[source]#

Apply the Hamiltonian to a vector.

Parameters:

vector – Vector to apply Hamiltonian to.

Returns:

Output vector.

apply_hamiltonian_left(vector: Array) Array[source]#

Apply the Hamiltonian to a vector on the left.

Parameters:

vector – Vector to apply Hamiltonian to.

Returns:

Output vector.

apply_hamiltonian(vector: Array) Array#

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_bra(orbital: int) Array[source]#

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

The bra vector is the excitation vector corresponding to the bra state, which may or may not be the same as the ket state vector.

Parameters:

orbital – Orbital index.

Returns:

Bra excitation vector.

See also

get_excitation_vector(): Function to get the excitation vector when the bra and ket are the same.

get_excitation_ket(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.

get_excitation_vector(orbital: int) Array#

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 nconfig: int#

Number of configurations.

class dyson.expressions.ccsd.CCSD[source]#

Bases: ExpressionCollection

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