Class CC

Class Documentation

class CC

CC is a derivation engine for the coupled-cluster method.

Public Types

enum class Ansatz

Values:

enumerator T

traditional ansatz

enumerator oT

traditional orbital-optimized (singles-free) ansatz

enumerator U

unitary ansatz

enumerator oU

unitary orbital-optimized (singles-free) ansatz

Public Functions

explicit CC(size_t N, Ansatz ansatz = Ansatz::T, bool screen = true, bool use_topology = true)

constructs CC engine

Parameters:
  • N – coupled cluster excitation rank

  • ansatz – the type of CC ansatz

  • screen – if true, uses Operator level screening before applying WickTheorem

  • use_topology – if true, uses topological optimizations in WickTheorem

Ansatz ansatz() const
Returns:

the type of ansatz

bool unitary() const
Returns:

true if the ansatz is unitary

bool screen() const
Returns:

whether screening is on or not

bool use_topology() const
Returns:

whether topological optimization is used in WickTheorem

std::vector<ExprPtr> t(size_t commutator_rank = 4, size_t pmax = std::numeric_limits<size_t>::max(), size_t pmin = 0)

derives t amplitude equations, \( \langle P|\bar{H}|0 \rangle = 0 \)

Parameters:
  • commutator_rank – rank of commutators included in \( \bar{H} \) ; must be specified for unitary ansatz and/or Hamiltonians with particle rank != 2

  • pmax – highest particle rank of the projector manifold \f \langle P | \f; the default value is to use the cluster operator rank of this engine

  • pmin – lowest particle rank of the projector manifold \f \langle P | \f; the default value is 0

Returns:

vector of t amplitude equations, with element k containing equation \( \langle k |\bar{H}|0 \rangle = 0 \) for k in the [pmin,pmax] range, and null value otherwise

std::vector< ExprPtr > λ (size_t commutator_rank=4)

derives λ amplitude equations, \( \langle 0| (1 + \hat{\Lambda}) \frac{d \bar{H}}{d \hat{T}_P} |0 \rangle = 0 \)

Parameters:

commutator_rank – rank of commutators included in \( \bar{H} \) ; must be specified for unitary ansatz and/or Hamiltonians with particle rank != 2

Returns:

vector of λ amplitude equations, with element k containing equation \( \langle 0| (1 + \hat{\Lambda}) \frac{d \bar{H}}{d \hat{T}_k} |0 \rangle = 0 \) for k in the [1,N] range; element 0 is always null

std::vector<ExprPtr> t_pt(size_t rank = 1, size_t order = 1, std::optional<size_t> nbatch = std::nullopt)

derives perturbed t amplitude equations

Parameters:
  • rank – rank of perturbation operator. r = 1 means one-body perturbation operator

  • order – order of perturbation

  • nbatch – optional batching index rank for perturbation operators

Pre:

rank==1 && order==1, only first order perturbation and one-body perturbation operator is supported now

Returns:

std::vector of perturbed t amplitude equations

std::vector< ExprPtr > λ_pt (size_t rank=1, size_t order=1, std::optional< size_t > nbatch=std::nullopt)

derives perturbed λ amplitude equations

Parameters:
  • rank – rank of perturbation operator. r = 1 means one-body perturbation operator

  • order – order of perturbation

  • nbatch – optional batching index rank for perturbation operators

Pre:

rank==1 && order==1, only first order perturbation and one-body perturbation operator is supported now

Returns:

std::vector of perturbed λ amplitude equations

std::vector< ExprPtr > eom_r (nₚ np, nₕ nh)

derives right-side sigma equations for EOM-CC

Parameters:
  • np – number of particle creators in R operator

  • nh – number of hole creators in R operator

Returns:

vector of right side sigma equations, element 0 is always null

std::vector< ExprPtr > eom_l (nₚ np, nₕ nh)

derives left-side sigma equations for EOM-CC

Parameters:
  • np – number of particle annihilators in L operator

  • nh – number of hole annihilators in L operator

Returns:

vector of left side sigma equations, element 0 is always null