# hamiltonian.m

Hamiltonian operator or superoperator and its rotational decomposition.

## Syntax

    [H,Q]=hamiltonian(spin_system,operator_type)


## Arguments

In Liouville space, operator_type can be set to

         'left' - produces left side product superoperator

'right' - produces right side product superoperator

'comm' - produces commutation superoperator (default)

'acomm' - produces anticommutation superoperator


In Hilbert space this parameter is ignored.

## Outputs

    H   - rotationally invariant part of the Hamiltonian

Q   - irreducible components of the anisotropic part,
use orientation.m to get the full Hamiltonian
at each specific orientation


## Notes

1. All spin interactions that go into the Hamiltonian are specified during the spin system setup - see the spin system specification section of the online manual.
2. Descriptor and operator generation are parallelised.