IM-SRG++  0
Operator Class Reference

#include <Operator.hh>

## Public Member Functions

Operator ()
Default constructor.

Operator (ModelSpace &)
Construct a 2-body scalar operator.

Operator (ModelSpace &, int Jrank, int Trank, int Parity, int part_rank)

Operator (const Operator &rhs)
Copy constructor.

Operator (Operator &&)

Operatoroperator= (const Operator &rhs)

Operatoroperator+= (const Operator &rhs)

Operator operator+ (const Operator &rhs) const

Operatoroperator+= (const double &rhs)

Operator operator+ (const double &rhs) const

Operatoroperator-= (const Operator &rhs)

Operator operator- (const Operator &rhs) const

Operator operator- () const

Operatoroperator-= (const double &rhs)

Operator operator- (const double &rhs) const

Operatoroperator*= (const double rhs)

Operator operator* (const double rhs) const

Operatoroperator/= (const double rhs)

Operator operator/ (const double rhs) const

Operatoroperator= (Operator &&rhs)

OperatorTempOp (size_t n)
Static scratch space for calculations.

double GetOneBody (int i, int j)

void SetOneBody (int i, int j, double val)

int GetTwoBodyDimension (int ch_bra, int ch_ket)

double GetTwoBody (int ch_bra, int ch_ket, int i, int j)

void SetTwoBody (int J1, int p1, int T1, int J2, int p2, int T2, int i, int j, int k, int l, double v)

void SetE3max (int e)

int GetE3max ()

ModelSpaceGetModelSpace ()

void SetModelSpace (ModelSpace &ms)

void Erase ()
Set all matrix elements to zero.

void EraseZeroBody ()

void EraseOneBody ()
set zero-body term to zero More...

void EraseTwoBody ()
set all two-body terms to zero

void EraseThreeBody ()
set all two-body terms to zero

void SetHermitian ()

void SetAntiHermitian ()

void SetNonHermitian ()

bool IsHermitian () const

bool IsAntiHermitian () const

bool IsNonHermitian () const

int GetParticleRank () const

int GetJRank () const

int GetTRank () const

int GetParity () const

void SetParticleRank (int pr)

void ResetTensorTransformFirstPass ()

void MakeReduced ()

void MakeNotReduced ()

void ScaleZeroBody (double x)

void ScaleOneBody (double x)

void ScaleTwoBody (double x)

void Symmetrize ()
Copy the upper-half triangle to the lower-half triangle for each matrix.

void AntiSymmetrize ()
Copy the upper-half triangle to the lower-half triangle with a minus sign.

void SetUpOneBodyChannels ()

size_t Size ()

void WriteBinary (ofstream &ofs)

Operator DoNormalOrdering ()
Calls DoNormalOrdering2() or DoNormalOrdering3(), depending on the rank of the operator.

Operator DoNormalOrdering2 ()
Returns the normal ordered two-body operator. More...

Operator DoNormalOrdering3 ()
Returns the normal ordered three-body operator. More...

Operator UndoNormalOrdering ()
Returns the operator normal-ordered wrt the vacuum. More...

Operator Truncate (ModelSpace &ms_new)
Returns the operator trunacted to the new model space. More...

void SetToCommutator (const Operator &X, const Operator &Y)

void CommutatorScalarScalar (const Operator &X, const Operator &Y)

void CommutatorScalarTensor (const Operator &X, const Operator &Y)

Operator BCH_Product (Operator &)

Operator BCH_Transform (const Operator &)

Operator Standard_BCH_Transform (const Operator &)

Operator Brueckner_BCH_Transform (const Operator &)

void CalculateKineticEnergy ()

void Eye ()
set to identity operator

double GetMP2_Energy ()

double GetMP3_Energy ()

double MP1_Eval (Operator &)

void PrintTimes ()

double Norm () const

double OneBodyNorm () const

double TwoBodyNorm () const

void PrintOneBody () const

void PrintTwoBody (int ch) const

deque< arma::mat > InitializePandya (size_t nch, string orientation)

void DoPandyaTransformation (deque< arma::mat > &, string orientation) const

void DoPandyaTransformation_SingleChannel (arma::mat &X, int ch_cc, string orientation) const

void AddInversePandyaTransformation (deque< arma::mat > &)

void AddInversePandyaTransformation_SingleChannel (arma::mat &Z, int ch_cc)

void comm110ss (const Operator &X, const Operator &Y)

void comm220ss (const Operator &X, const Operator &Y)

void comm111ss (const Operator &X, const Operator &Y)

void comm121ss (const Operator &X, const Operator &Y)

void comm221ss (const Operator &X, const Operator &Y)

void comm122ss (const Operator &X, const Operator &Y)

void comm222_pp_hhss (const Operator &X, const Operator &Y)

void comm222_phss (const Operator &X, const Operator &Y)

void comm222_pp_hh_221ss (const Operator &X, const Operator &Y)

void DoTensorPandyaTransformation (map< array< int, 2 >, arma::mat > &) const

void DoTensorPandyaTransformation_SingleChannel (arma::mat &X, int ch_bra_cc, int ch_ket_cc) const

void AddInverseTensorPandyaTransformation (map< array< int, 2 >, arma::mat > &)

void AddInverseTensorPandyaTransformation_SingleChannel (arma::mat &Zbar, int ch_bra_cc, int ch_ket_cc)

void comm111st (const Operator &X, const Operator &Y)

void comm121st (const Operator &X, const Operator &Y)

void comm122st (const Operator &X, const Operator &Y)

void comm222_pp_hh_221st (const Operator &X, const Operator &Y)

void comm222_phst (const Operator &X, const Operator &Y)

## Static Public Member Functions

static void Set_BCH_Transform_Threshold (double x)

static void Set_BCH_Product_Threshold (double x)

static void SetUseBruecknerBCH (bool tf)

## Public Attributes

ModelSpacemodelspace
Pointer to the associated modelspace.

double ZeroBody
The zero body piece of the operator.

arma::mat OneBody
The one body piece of the operator, stored in a single NxN armadillo matrix, where N is the number of single-particle orbits.

TwoBodyME TwoBody
The two body piece of the operator.

ThreeBodyME ThreeBody
The three body piece of the operator.

int rank_J
Spherical tensor rank of the operator.

int rank_T
Isotensor rank of the operator.

int parity
Parity of the operator, 0=even 1=odd.

int particle_rank
Maximum particle rank. Should be 2 or 3.

int E2max
For two-body matrix elements, $$e_i + e_j \leq$$ E2max.

int E3max
For three-body matrix elements, $$e_i + e_j + e_k \leq$$ E3max.

bool hermitian

bool antihermitian

int nChannels
Number of two-body channels $$J,\pi,T_z$$ associated with the model space.

map< array< int, 3 >, vector< index_t > > OneBodyChannels

IMSRGProfiler profiler

## Static Public Attributes

static double bch_transform_threshold = 1e-9

static double bch_product_threshold = 1e-4

static bool scalar_transform_first_pass = true

static bool tensor_transform_first_pass = true

static bool use_brueckner_bch = false

## Friends

Operator Commutator (const Operator &X, const Operator &Y)

## Detailed Description

The Operator class provides a generic operator up to three-body, scalar or tensor. The class contains lots of methods and overloaded operators so that the resulting code that uses the operators can look as close as possible to the math that is written down.

## Member Function Documentation

 Operator Operator::BCH_Product ( Operator & Y )

X.BCH_Product(Y) returns $$Z$$ such that $$e^{Z} = e^{X}e^{Y}$$ by employing the Baker-Campbell-Hausdorff formula

$Z = X + Y + \frac{1}{2}[X,Y] + \frac{1}{12}([X,[X,Y]]+[Y,[Y,X]]) + \ldots$

 Operator Operator::BCH_Transform ( const Operator & Omega )

Calculates the kinetic energy operator in the harmonic oscillator basis.

$t_{ab} = \frac{1}{2}\hbar\omega \delta_{\ell_a \ell_b} \delta_{j_aj_b} \delta_{t_{za}t_{zb}} \left\{ \begin{array}{ll} 2n_a + \ell_a + \frac{3}{2} &: n_a=n_b\\ \sqrt{n_{a}(n_{a}+\ell_a + \frac{1}{2})} &: n_a=n_b+1\\ \end{array} \right.$

X.BCH_Transform(Y) returns $$Z = e^{Y} X e^{-Y}$$. We use the Baker-Campbell-Hausdorff formula

$Z = X + [Y,X] + \frac{1}{2!}[Y,[Y,X]] + \frac{1}{3!}[Y,[Y,[Y,X]]] + \ldots$

with all commutators truncated at the two-body level.

 Operator Operator::Brueckner_BCH_Transform ( const Operator & Omega )

Variation of the BCH transformation procedure requested by a one Dr. T.D. Morris

$e^{\Omega_1 + \Omega_2} X e^{-\Omega_1 - \Omega_2} \rightarrow e^{\Omega_2} e^{\Omega_1} X e^{-\Omega_1} e^{-\Omega_2}$

 void Operator::comm110ss ( const Operator & X, const Operator & Y )

$[X_{1)},Y_{(1)}]_{(0)} = \sum_{a} n_a (2j_a+1) \left(X_{(1)}Y_{(1)}-Y_{(1)}X_{(1)}\right)_{aa}$

 void Operator::comm111ss ( const Operator & X, const Operator & Y )

$[X_{(1)},Y_{(1)}]_{(1)} = X_{(1)}Y_{(1)} - Y_{(1)}X_{(1)}$

 void Operator::comm121ss ( const Operator & X, const Operator & Y )

Returns $$[X_{(1)},Y_{(2)}] - [Y_{(1)},X_{(2)}]$$, where

$[X_{(1)},Y_{(2)}]_{ij} = \frac{1}{2j_i+1}\sum_{ab} (n_a \bar{n}_b) \sum_{J} (2J+1) (X_{ab} Y^J_{biaj} - X_{ba} Y^J_{aibj})$

 void Operator::comm122ss ( const Operator & X, const Operator & Y )

Returns $$[X_{(1)},Y_{(2)}]_{(2)} - [Y_{(1)},X_{(2)}]_{(2)}$$, where

$[X_{(1)},Y_{(2)}]^{J}_{ijkl} = \sum_{a} ( X_{ia}Y^{J}_{ajkl} + X_{ja}Y^{J}_{iakl} - X_{ak} Y^{J}_{ijal} - X_{al} Y^{J}_{ijka} )$

here, all TBME are unnormalized, i.e. they should have a tilde.

 void Operator::comm220ss ( const Operator & X, const Operator & Y )

$[X_{(2)},Y_{(2)}]_{(0)} = \frac{1}{2} \sum_{J} (2J+1) \sum_{abcd} (n_a n_b \bar{n}_c \bar{n}_d) \tilde{X}_{abcd}^{J} \tilde{Y}_{cdab}^{J}$

may be rewritten as

$[X_{(2)},Y_{(2)}]_{(0)} = 2 \sum_{J} (2J+1) Tr(X_{hh'pp'}^{J} Y_{pp'hh'}^{J})$

where we obtain a factor of four from converting two unrestricted sums to restricted sums, i.e. $$\sum_{ab} \rightarrow \sum_{a\leq b}$$, and using the normalized TBME.

 void Operator::comm221ss ( const Operator & X, const Operator & Y )

$[X_{(2)},Y_{(2)}]_{ij} = \frac{1}{2(2j_i+1)}\sum_{J}(2J+1)\sum_{abc} (\bar{n}_a\bar{n}_bn_c + n_an_b\bar{n}_c) (X^{J}_{ciab} Y^{J}_{abcj} - Y^{J}_{ciab}X^{J}_{abcj})$

This may be rewritten as

$[X_{(2)},Y_{(2)}]_{ij} = \frac{1}{2j_i+1} \sum_{c} \sum_{J} (2J+1) \left( n_c \mathcal{M}^{J}_{pp,icjc} + \bar{n}_c\mathcal{M}^{J}_{hh,icjc} \right)$

With the intermediate matrix

$\mathcal{M}^{J}_{pp} \equiv \frac{1}{2} (X^{J}\mathcal{P}_{pp} Y^{J} - Y^{J}\mathcal{P}_{pp}X^{J})$

and likewise for $$\mathcal{M}^{J}_{hh}$$

 void Operator::comm222_phss ( const Operator & X, const Operator & Y )

Calculates the part of $$[X_{(2)},Y_{(2)}]_{ijkl}$$ which involves ph intermediate states, here indicated by $$Z^{J}_{ijkl}$$

$Z^{J}_{ijkl} = \sum_{ab}(n_a\bar{n}_b-\bar{n}_an_b)\sum_{J'} (2J'+1) \left[ \left\{ \begin{array}{lll} j_i & j_j & J \\ j_k & j_l & J' \\ \end{array} \right\} \left( \bar{X}^{J'}_{i\bar{l}a\bar{b}}\bar{Y}^{J'}_{a\bar{b}k\bar{j}} - \bar{Y}^{J'}_{i\bar{l}a\bar{b}}\bar{X}^{J'}_{a\bar{b}k\bar{j}} \right) -(-1)^{j_i+j_j-J} \left\{ \begin{array}{lll} j_j & j_i & J \\ j_k & j_l & J' \\ \end{array} \right\} \left( \bar{X}^{J'}_{j\bar{l}a\bar{b}}\bar{Y}^{J'}_{a\bar{b}k\bar{i}} - \bar{Y}^{J'}_{j\bar{l}a\bar{b}}\bar{X}^{J'}_{a\bar{b}k\bar{i}} \right) \right]$

This is implemented by defining an intermediate matrix

$\bar{Z}^{J}_{i\bar{l}k\bar{j}} \equiv \sum_{ab}(n_a\bar{n}_b) \left[ \left( \bar{X}^{J'}_{i\bar{l}a\bar{b}}\bar{Y}^{J'}_{a\bar{b}k\bar{j}} - \bar{Y}^{J'}_{i\bar{l}a\bar{b}}\bar{X}^{J'}_{a\bar{b}k\bar{j}} \right) -\left( \bar{X}^{J'}_{i\bar{l}b\bar{a}}\bar{Y}^{J'}_{b\bar{a}k\bar{j}} - \bar{Y}^{J'}_{i\bar{l}b\bar{a}}\bar{X}^{J'}_{b\bar{a}k\bar{j}} \right)\right]$

The Pandya-transformed matrix elements are obtained with DoPandyaTransformation(). The matrices $$\bar{X}^{J'}_{i\bar{l}a\bar{b}}\bar{Y}^{J'}_{a\bar{b}k\bar{j}}$$ and $$\bar{Y}^{J'}_{i\bar{l}a\bar{b}}\bar{X}^{J'}_{a\bar{b}k\bar{j}}$$ are related by a Hermitian conjugation, which saves two matrix multiplications. The commutator is then given by

$Z^{J}_{ijkl} = \sum_{J'} (2J'+1) \left[ \left\{ \begin{array}{lll} j_i & j_j & J \\ j_k & j_l & J' \\ \end{array} \right\} \bar{Z}^{J'}_{i\bar{l}k\bar{j}} -(-1)^{j_i+j_j-J} \left\{ \begin{array}{lll} j_j & j_i & J \\ j_k & j_l & J' \\ \end{array} \right\} \bar{Z}^{J'}_{j\bar{l}k\bar{i}} \right]$

 void Operator::comm222_phst ( const Operator & X, const Operator & Y )

Calculates the part of $$[X_{(2)},\mathbb{Y}^{\Lambda}_{(2)}]_{ijkl}$$ which involves ph intermediate states, here indicated by $$\mathbb{Z}^{J_1J_2\Lambda}_{ijkl}$$

$\mathbb{Z}^{J_1J_2\Lambda}_{ijkl} = \sum_{abJ_3J_4}(n_a-n_b) \hat{J_1}\hat{J_2}\hat{J_3}\hat{J_4} \left[ \left\{ \begin{array}{lll} j_i & j_l & J_3 \\ j_j & j_k & J_4 \\ J_1 & J_2 & \Lambda \\ \end{array} \right\} \left( \bar{X}^{J3}_{i\bar{l}a\bar{b}}\bar{\mathbb{Y}}^{J_3J_4\Lambda}_{a\bar{b}k\bar{j}} - \bar{\mathbb{Y}}^{J_3J_4\Lambda}_{i\bar{l}a\bar{b}}\bar{X}^{J_4}_{a\bar{b}k\bar{j}} \right) -(-1)^{j_i+j_j-J_1} \left\{ \begin{array}{lll} j_j & j_l & J_3 \\ j_i & j_k & J_4 \\ J_1 & J_2 & \Lambda \\ \end{array} \right\} \left( \bar{X}^{J_3}_{i\bar{l}a\bar{b}}\bar{\mathbb{Y}}^{J_3J_4\Lambda}_{a\bar{b}k\bar{j}} - \bar{\mathbb{Y}}^{J_3J_4\Lambda}_{i\bar{l}a\bar{b}}\bar{X}^{J_4}_{a\bar{b}k\bar{j}} \right) \right]$

This is implemented by defining an intermediate matrix

$\bar{\mathbb{Z}}^{J_3J_4\Lambda}_{i\bar{l}k\bar{j}} \equiv \sum_{ab}(n_a\bar{n}_b) \left[ \left( \bar{X}^{J3}_{i\bar{l}a\bar{b}}\bar{\mathbb{Y}}^{J_3J_4\Lambda}_{a\bar{b}k\bar{j}} - \bar{\mathbb{Y}}^{J_3J_4\Lambda}_{i\bar{l}a\bar{b}}\bar{X}^{J_4}_{a\bar{b}k\bar{j}} \right) -\left( \bar{X}^{J_3}_{i\bar{l}b\bar{a}}\bar{\mathbb{Y}}^{J_3J_4\Lambda}_{b\bar{a}k\bar{j}} - \bar{\mathbb{Y}}^{J_3J_4\Lambda}_{i\bar{l}b\bar{a}}\bar{X}^{J_4}_{b\bar{a}k\bar{j}} \right)\right]$

The Pandya-transformed matrix elements are obtained with DoTensorPandyaTransformation(). The matrices $$\bar{X}^{J_3}_{i\bar{l}a\bar{b}}\bar{\mathbb{Y}}^{J_3J_4\Lambda}_{a\bar{b}k\bar{j}}$$ and $$\bar{\mathbb{Y}}^{J_4J_3\Lambda}_{i\bar{l}a\bar{b}}\bar{X}^{J_3}_{a\bar{b}k\bar{j}}$$ are related by a Hermitian conjugation, which saves two matrix multiplications, provided we take into account the phase $$(-1)^{J_3-J_4}$$ from conjugating the spherical tensor. The commutator is then given by

$\mathbb{Z}^{J_1J_2\Lambda}_{ijkl} = \sum_{J_3J_4} \hat{J_1}\hat{J_2}\hat{J_3}\hat{J_4} \left[ \left\{ \begin{array}{lll} j_i & j_l & J_3 \\ j_j & j_k & J_4 \\ J_1 & J_2 & \Lambda \\ \end{array} \right\} \bar{\mathbb{Z}}^{J_3J_4\Lambda}_{i\bar{l}k\bar{j}} -(-1)^{j_i+j_j-J} \left\{ \begin{array}{lll} j_j & j_l & J_3 \\ j_i & j_k & J_4 \\ J_1 & J_2 & \Lambda \\ \end{array} \right\} \bar{\mathbb{Z}}^{J_3J_4\Lambda}_{j\bar{l}k\bar{i}} \right]$

 void Operator::comm222_pp_hh_221ss ( const Operator & X, const Operator & Y )

Since comm222_pp_hhss() and comm221ss() both require the construction of the intermediate matrices $$\mathcal{M}_{pp}$$ and $$\mathcal{M}_{hh}$$, we can combine them and only calculate the intermediates once.

 void Operator::comm222_pp_hhss ( const Operator & X, const Operator & Y )

Calculates the part of the commutator $$[X_{(2)},Y_{(2)}]_{(2)}$$ which involves particle-particle or hole-hole intermediate states.

$[X_{(2)},Y_{(2)}]^{J}_{ijkl} = \frac{1}{2} \sum_{ab} (\bar{n}_a\bar{n}_b - n_an_b) (X^{J}_{ijab}Y^{J}_{ablk} - Y^{J}_{ijab}X^{J}_{abkl})$

This may be written as

$[X_{(2)},Y_{(2)}]^{J} = \mathcal{M}^{J}_{pp} - \mathcal{M}^{J}_{hh}$

With the intermediate matrices

$\mathcal{M}^{J}_{pp} \equiv \frac{1}{2}(X^{J} \mathcal{P}_{pp} Y^{J} - Y^{J} \mathcal{P}_{pp} X^{J})$

and likewise for $$\mathcal{M}^{J}_{hh}$$.

 void Operator::CommutatorScalarScalar ( const Operator & X, const Operator & Y )

Commutator where $$X$$ and $$Y$$ are scalar operators. Should be called through Commutator()

 void Operator::CommutatorScalarTensor ( const Operator & X, const Operator & Y )

Commutator $$[X,Y]$$ where $$X$$ is a scalar operator and $$Y$$ is a tensor operator. Should be called through Commutator()

 Operator Operator::DoNormalOrdering2 ( )

Returns the normal ordered two-body operator.

Normal ordering of a 2body operator set up for scalar or tensor operators, but the tensor part hasn't been tested

 Operator Operator::DoNormalOrdering3 ( )

Returns the normal ordered three-body operator.

Normal ordering of a three body operator. Start by generating the normal ordered two body piece, then use DoNormalOrdering2() to get the rest. (Note that there are some numerical factors). The normal ordered two body piece is

$\Gamma^J_{ijkl} = V^J_{ijkl} + \sum_a n_a \sum_K \frac{2K+1}{2J+1} V^{(3)JJK}_{ijakla}$

Right now, this is only set up for scalar operators, but I don't anticipate handling 3body tensor operators in the near future.

 void Operator::DoPandyaTransformation_SingleChannel ( arma::mat & TwoBody_CC_ph, int ch_cc, string orientation = "normal" ) const

The scalar Pandya transformation is defined as

$\bar{X}^{J}_{i\bar{j}k\bar{l}} = - \sum_{J'} (2J'+1) \left\{ \begin{array}{lll} j_i & j_j & J \\ j_k & j_l & J' \\ \end{array} \right\} X^{J}_{ilkj}$

where the overbar indicates time-reversed orbits.

 void Operator::DoTensorPandyaTransformation ( map< array< int, 2 >, arma::mat > & TwoBody_CC_ph ) const

The scalar Pandya transformation is defined as

$\bar{X}^{J}_{i\bar{j}k\bar{l}} = - \sum_{J'} (2J'+1) \left\{ \begin{array}{lll} j_i & j_j & J \\ j_k & j_l & J' \\ \end{array} \right\} X^{J}_{ilkj}$

where the overbar indicates time-reversed orbits. This function is designed for use with comm222_phss() and so it takes in two arrays of matrices, one for hp terms and one for ph terms.

 void Operator::EraseOneBody ( )

set zero-body term to zero

set all one-body terms to zero

 double Operator::GetMP2_Energy ( )

Calculate the second-order perturbation theory correction to the energy

$E^{(2)} = \sum_{ia} (2 j_a +1) \frac{|f_{ia}|^2}{f_{aa}-f_{ii}} + \sum_{\substack{i\leq j // a\leq b}}\sum_{J} (2J+1)\frac{|\Gamma_{ijab}^{J}|^2}{f_{aa}+f_{bb}-f_{ii}-f_{jj}}$

 double Operator::GetMP3_Energy ( )

Calculate the third order perturbation correction to energy

$\frac{1}{8}\sum_{abijpq}\sum_J (2J+1)\frac{\Gamma_{abij}^J\Gamma_{ijpq}^J\Gamma_{pqab}^J}{(f_a+f_b-f_p-f_q)(f_a+f_b-f_i-f_j)} +\sum_{abcijk}\sum_J (2J+1) \frac{\Gamma_{abij}^J\Gamma_{cjkb}^J\Gamma_{ikac}^J}{(f_a+f_b-f_i-f_j)(f_a+f_c-f_i-f_k)}$

 double Operator::MP1_Eval ( Operator & H )

Evaluate first order perturbative correction to the operator's ground-state expectation value. A HF basis is assumed.

$\mathcal{O}^{(1)} = 2\sum_{abij} \frac{H_{abij}\mathcal{O}_{ijab}}{\Delta_{abij}}$

 double Operator::Norm ( ) const

Obtain the Frobenius norm of the operator, which here is defined as

$\|X\| = \sqrt{\|X_{(1)}\|^2 +\|X_{(2)}\|^2 }$

and

$\|X_{(1)}\|^2 = \sum\limits_{ij} X_{ij}^2$

 Operator Operator::Standard_BCH_Transform ( const Operator & Omega )

X.BCH_Transform(Y) returns $$Z = e^{Y} X e^{-Y}$$. We use the Baker-Campbell-Hausdorff formula

$Z = X + [Y,X] + \frac{1}{2!}[Y,[Y,X]] + \frac{1}{3!}[Y,[Y,[Y,X]]] + \ldots$

with all commutators truncated at the two-body level.

 Operator Operator::Truncate ( ModelSpace & ms_new )

Returns the operator trunacted to the new model space.

Truncate an operator to a smaller emax A corresponding ModelSpace object must be created at the appropriate scope. That's why the new operator is passed as a

 Operator Operator::UndoNormalOrdering ( )

Returns the operator normal-ordered wrt the vacuum.

Convert to a basis normal ordered wrt the vacuum. This doesn't handle 3-body terms. In that case, the 2-body piece is unchanged.

## Friends And Related Function Documentation

 Operator Commutator ( const Operator & X, const Operator & Y )
friend

Returns $$Z = [X,Y]$$

The documentation for this class was generated from the following files: