Processing math: 100%

This is an old revision of the document!


OperatorSetTrace

OperatorSetTrace(O, t, {i1,...,in}) takes an Operator O, an optional real value t for the trace and an optional list {i1,...,in} of included orbitals, and sets the trace of these orbitals to t. It furthermore sets any scalar offset of the operator to 0 (or rather will, with the next update). If no list of indices is given the function includes all orbitals up to the number of fermionic states, and if no value t is given the trace is set to 0.

After the operation the operator has the property j={i1,...,in}Ojj=t, where Ojj are the prefactors of the diagonal quadratic terms of the operator, O=i,jOijaiaj+....

Input

  • O : Operator
  • t : New value of the trace (Default 0)
  • {i1,...,in} : List of indices (Default {0,...,NFermi1})

Output

  • O : Operator with newly set trace

Example

Give me just a minute.

Input

Example.Quanty
-- some example code

Result

text produced as output

Table of contents

Print/export