2013-09-13 17:49:28 +02:00
|
|
|
.. module:: pytriqs.random
|
2013-08-21 10:12:15 +02:00
|
|
|
|
2013-09-13 17:49:28 +02:00
|
|
|
.. _operators:
|
2013-08-21 10:12:15 +02:00
|
|
|
|
2014-10-17 18:15:19 +02:00
|
|
|
Second-quantization operators for many-body Hamiltonians
|
|
|
|
===========================================================
|
2013-08-21 10:12:15 +02:00
|
|
|
|
|
|
|
The TRIQS solvers need to know several operators in order to solve the impurity
|
|
|
|
problem. For example, they must know what the local Hamiltonian is, but also its
|
|
|
|
quantum numbers (that can be used to improve the speed), possibly some
|
|
|
|
operators to be averaged, aso.
|
|
|
|
|
|
|
|
In order to deal with these objects, TRIQS provides a class that allows to
|
|
|
|
manipulate operators.
|
|
|
|
|
|
|
|
A simple example
|
|
|
|
-----------------
|
|
|
|
|
2013-09-17 14:55:55 +02:00
|
|
|
.. runblock:: python
|
|
|
|
|
|
|
|
from pytriqs.operators import *
|
|
|
|
H = C('up',1) * Cdag('up',2) + C('up',2) * Cdag('up',1)
|
|
|
|
print H
|
|
|
|
print H - H.dagger()
|
|
|
|
print anti_commutator(C('up'),Cdag('up'))
|
|
|
|
print anti_commutator(C('up'),0.5*Cdag('down'))
|
2013-08-21 10:12:15 +02:00
|
|
|
|
|
|
|
|
2014-10-17 18:15:19 +02:00
|
|
|
Full reference
|
2013-08-21 10:12:15 +02:00
|
|
|
------------------------
|
|
|
|
|
|
|
|
.. autoclass:: pytriqs.operators.Operator
|
|
|
|
:members:
|