Ground State Computations

Coupled Cluster parent class

class coupled_cluster.cc.CoupledCluster(system, mixer=<class 'coupled_cluster.mix.DIIS'>, verbose=False)

Coupled Cluster Abstract class

Abstract base class defining the skeleton of a Coupled Cluster ground state solver class.

Parameters
  • system (QuantumSystems) – Quantum systems class instance

  • mixer (AlphaMixer) – AlpaMixer object

  • verbose (bool) – Prints iterations for ground state computation if True

compute_ground_state(t_args=[], t_kwargs={}, l_args=[], l_kwargs={})

Compute ground state energy

compute_one_body_expectation_value(mat, make_hermitian=True)

Function computing the expectation value of a one-body operator \(\hat{A}\). This is done by evaluating

\[\langle A \rangle = \rho^{q}_{p} A^{p}_{q},\]

where \(p, q\) are general single-particle indices and \(\rho^{q}_{p}\) is the one-body density matrix.

Parameters
  • mat (np.ndarray) – The one-body operator to evaluate (\(\hat{A}\)), as a matrix. The dimensionality of the matrix must be the same as the one-body density matrix, i.e., \(\mathbb{C}^{l \times l}\), where l is the number of basis functions.

  • make_hermitian (bool) – Whether or not to make the one-body density matrix Hermitian. This is done by \(\tilde{\boldsymbol{\rho}} = \frac{1}{2}(\boldsymbol{\rho}^{\dagger} + \boldsymbol{\rho}), where :math:\)tilde{boldsymbol{rho}}` is the Hermitian one-body density matrix. Default is make_hermitian=True.

Returns

The expectation value of the one-body operator.

Return type

complex

See also

CoupledCluster.compute_one_body_density_matrix

compute_particle_density()

Computes one-particle density

Returns

Particle density

Return type

np.array

compute_reference_energy()

Computes reference energy

Returns

Reference energy

Return type

np.array

get_amplitudes(get_t_0=False)

Getter for amplitudes

Parameters

get_t_0 (bool) – Returns amplitude at t=0 if True

Returns

Amplitudes in AmplitudeContainer object

Return type

AmplitudeContainer

CCS

class coupled_cluster.ccs.CCS(system, **kwargs)

Coupled cluster singles

Class for coupled cluster solver with singles excitations.

Parameters

system (QuantumSystem) – QuantumSystem class describing the system

compute_energy()

Compute ground state CCS energy.

Returns

CCS ground state energy

Return type

float

CCD

class coupled_cluster.ccd.CCD(system, **kwargs)

Coupled Cluster Doubles

Class for Coupled Cluster solver, including double excitations.

Parameters

system (QuantumSystem) – QuantumSystem class describing the system

CCSD

class coupled_cluster.ccsd.CCSD(system, include_singles=True, **kwargs)

Coupled Cluster Singels Doubles

Coupled Cluster solver with single-, and double excitations.

Parameters
  • system (QuantumSystems) – QuantumSystems class instance describing the system to be solved

  • include_singles (bool) – Include singles

compute_energy()

Compute Energy

Returns

Energy of current state

Return type

float

compute_one_body_density_matrix()

Computes one-body density matrix

Returns

One-body density matrix

Return type

np.array

RCCSD

class coupled_cluster.rccsd.RCCSD(system, include_singles=True, **kwargs)

Restricted Coupled Cluster Singels Doubles

Restricted coupled-cluster solver with single-, and double excitations. The excitation and de-exciation operators are parametrized according to chapter 13.7.5 in 1,

\[\begin{split}\hat{T}_1 &= \sum_{ai} \tau^a_i E_{ai} \\ \hat{T}_2 &= \frac{1}{2}\sum_{abij} \tau^{ab}_{ij} E_{ai} E_{bj} \\ \hat{\Lambda}_1 &= \frac{1}{2} \sum_{ai} \lambda^i_a E_{ia} \\ \hat{\Lambda}_2 &= \frac{1}{2} \sum_{abij} \lambda^{ij}_{ab} \left(\frac{1}{3} E_{ia} E_{jb} + \frac{1}{6} E_{ja} E_{ib} \right)\end{split}\]
Parameters
  • system (QuantumSystems) – QuantumSystems class instance describing the system to be solved

  • include_singles (bool) – Include singles

t_1, t_2

\(\hat{T}\)-amplitudes \(\tau^a_i, \tau^{ab}_{ij}\)

Type

np.ndarray

l_1, l_2

\(\hat{\Lambda}\)-amplitudes \(\lambda^i_a, \lambda^{ij}_{ab}\)

Type

np.ndarray

References

1

T. Helgaker, P. Jorgensen, J. Olsen “Molecular electronic-structure theory”, John Wiley & Sons, 2014.

compute_energy()

Compute the total restricted coupled-cluster energy

\[E_{\text{RCCSD}} = E_{\text{ref}} + 2 f^i_a \tau^a_i + (2 \tau^{ab}_{ij} - \tau^{a}_i \tau^b_j) (u^{ij}_{ab} - u^{ij}_{ba} )\]
Returns

The total coupled-cluster energy of the current state.

Return type

float

compute_initial_guess()

Compute the initial guess for the coupled-cluster amplitudes. Currently the only option is the MP2 initial guess,

\[\begin{split}\tau^a_i &= \lambda^i_a = 0, \, \forall a,i \\ \tau^{ab}_{ij} &= \frac{u^{ab}_{ij}}{\epsilon_i+\epsilon_j - \epsilon_a - \epsilon_b} \\ \lambda^{ij}_{ab} &= \frac{u^{ij}_{ab}}{\epsilon_i+\epsilon_j - \epsilon_a - \epsilon_b}.\end{split}\]
compute_one_body_density_matrix()

Computes the coupled-cluster one-body density matrix 2,

\[\rho^q_p \equiv \langle \tilde{\Psi} | a_p^\dagger a_q | \Psi \rangle.\]
Returns

One-body density matrix

Return type

np.array

References

2

I. Shavitt, R. Bartlett “Many-body methods in chemistry and physics: MBPT and coupled-cluster theory”, Cambridge university press, 2009.

OACCD

class coupled_cluster.ccd.OACCD(system, **kwargs)

Orbital Adaptive Coupled Cluster Doubles

Implementation of the non-orthogonal coupled cluster method with double excitations. The code is based on a script written by Rolf H. Myhre and Simen Kvaal.

Requires orthonormal basis functions.

https://doi.org/10.1063/1.5006160

Parameters

system (QuantumSystem) – QuantumSystem class instance description of system

compute_ground_state(max_iterations=100, tol=0.0001, termination_tol=0.0001, tol_factor=0.1, change_system_basis=True, **mixer_kwargs)

Compute ground state

Parameters
  • max_iterations (int) – Maximum number of iterations

  • tol (float) – Tolerance parameter, e.g. 1e-4

  • tol_factor (float) – Tolerance factor

  • change_system_basis (bool) – Whether or not to change the basis when the ground state is reached. Default is True.

compute_one_body_expectation_value(mat, make_hermitian=True)

Function computing the expectation value of a one-body operator \(\hat{A}\). This is done by evaluating

\[\langle A \rangle = \rho^{q}_{p} A^{p}_{q},\]

where \(p, q\) are general single-particle indices and \(\rho^{q}_{p}\) is the one-body density matrix.

Parameters
  • mat (np.ndarray) – The one-body operator to evaluate (\(\hat{A}\)), as a matrix. The dimensionality of the matrix must be the same as the one-body density matrix, i.e., \(\mathbb{C}^{l \times l}\), where l is the number of basis functions.

  • make_hermitian (bool) – Whether or not to make the one-body density matrix Hermitian. This is done by \(\tilde{\boldsymbol{\rho}} = \frac{1}{2}(\boldsymbol{\rho}^{\dagger} + \boldsymbol{\rho}), where :math:\)tilde{boldsymbol{rho}}` is the Hermitian one-body density matrix. Default is make_hermitian=True.

Returns

The expectation value of the one-body operator.

Return type

complex

See also

CoupledCluster.compute_one_body_density_matrix

get_amplitudes(get_t_0=False)

Getter for amplitudes, overwrites CC.get_amplitudes to also include coefficients.

Parameters

get_t_0 (bool) – Returns amplitude at t=0 if True

Returns

Amplitudes and coefficients in OACCVector object

Return type

OACCVector