Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
documentation:language_reference:functions:operatorsettrace [2018/09/26 11:50] – Filled with content Simon Heinzedocumentation:language_reference:functions:operatorsettrace [2018/11/12 10:53] (current) – de-created Simon Heinze
Line 1: Line 1:
 ====== OperatorSetTrace ====== ====== OperatorSetTrace ======
  
-### +Deprecatedwith next release use //[[documentation:language_reference:functions:OperatorSetOnsiteEnergy|OperatorSetOnsiteEnergy()]]//, which has the same behaviour.
-OperatorSetTrace($O$$t$, {$i_1,...,i_n$}) takes an Operator $O$, an optional real value $t$ for the trace and an optional list {$i_1,...,i_n$} of included orbitals, and sets the trace of these orbitals to $t$. It furthermore sets any scalar offset of the operator to 0. 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 +
-\begin{equation*} +
-\sum_{j=\{i_1,...,i_n\}} +
-O_{jj} +
-+
-+
-\hspace{0.3cm} +
-+
-\end{equation*} +
-where $O_{jj}$ are the prefactors of the diagonal quadratic terms of the operator, +
-\begin{equation*} +
-+
-+
-\sum_{i,j} +
-O_{ij} a_i^\dagger a_j^{\phantom{\dagger}} +
-+
-... +
-\hspace{0.3cm} +
-+
-\end{equation*} +
-### +
- +
-===== Input ===== +
- +
-  * $O$ Operator +
-  * $t$ New value of the trace (Default 0) +
-  * {$i_1,...,i_n$} List of indices (Default {$0,...,N_{Fermi}-1$}) +
- +
-===== Output ===== +
- +
-  * $O^\prime$ : Operator with newly set trace +
- +
-===== Example ===== +
- +
-### +
-Give me just a minute. +
-### +
- +
-==== Input ==== +
-<code Quanty Example.Quanty> +
--- some example code +
-</code> +
- +
-==== Result ==== +
-<file Quanty_Output> +
-text produced as output +
-</file>+
  
 ===== Table of contents ===== ===== Table of contents =====
 {{indexmenu>.#1}} {{indexmenu>.#1}}
  
Print/export