# Difference between revisions of "Tutorial:SSE"

## Susceptibility of one-dimensional Heisenberg models

### The one-dimensional Heisenberg chain

The parameter file quantum1/parm3a sets up Monte Carlo simulations of the quantum mechanical Heisenberg model on a one-dimensional chain with 60 sites for a couple of temperatures (T=0.05, 0.1, ..., 2.0) using cluster updates.

```LATTICE="chain lattice"
MODEL="spin"
LATTICE_LIBRARY="../lattices.xml"
MODEL_LIBRARY="../models.xml"
local_S=1/2
L=60
J=1
THERMALIZATION=15000
SWEEPS=150000
REPRESENTATION="SSE"
{T=0.05;}
{T=0.1;}
{T=0.2;}
{T=0.3;}
{T=0.4;}
{T=0.5;}
{T=0.6;}
{T=0.7;}
{T=0.75;}
{T=0.8;}
{T=0.9;}
{T=1.0;}
{T=1.25;}
{T=1.5;}
{T=1.75;}
{T=2.0;}
```

Using the following standard sequence of commands you can run the simulation using the quantum SSE loop code and extract the calculated susceptibility from the XML output files

```parameter2xml parm3a
loop -Tmin 10 parm3a.in.xml
```

where the plot is specified in the file plot.xml like

```<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://xml.comp-phys.org/2003/4/plot2html.xsl"?>

<plot name="Susceptibility versus temperature for one-dimesnional Heisenberg models">

<legend show="true"/>
<xaxis label="Temperature"    type="PARAMETER" name="T"/>
<yaxis label="Susceptibility" type="SCALAR_AVERAGE"/>

<set label="One-dimensional chain"/>

</plot>
```

The parameter file quantum1/parm3b sets up Monte Carlo simulations of the quantum mechanical Heisenberg model on a one-dimensional ladder with 60 sites for a couple of temperatures (T=0.1, 0.2, ..., 2.0) using cluster updates.

```LATTICE="ladder"
MODEL="spin"
LATTICE_LIBRARY="../lattices.xml"
MODEL_LIBRARY="../models.xml"
local_S=1/2
L=60
J=1
THERMALIZATION=15000
SWEEPS=150000
REPRESENTATION="SSE"
{T=0.1;}
{T=0.2;}
{T=0.3;}
{T=0.4;}
{T=0.5;}
{T=0.6;}
{T=0.7;}
{T=0.8;}
{T=1.0;}
{T=1.25;}
{T=1.5;}
{T=1.75;}
{T=2.0;}
```

Using the following standard sequence of commands you can run the simulation using the quantum SSE loop code and extract the calculated susceptibility from the XML output files

```parameter2xml parm3b
loop -Tmin 10 parm3b.in.xml
```

### Questions

• Is there a difference between the classical and quantum calculation?
• How does the susceptibility depend on the lattice?
• Why does the susceptibility change?

## Magnetization versus magnetic field

### One-dimensional Heisenberg chain in a magnetic field

The parameter file quantum2/parm4a sets up Monte Carlo simulations of the quantum mechanical S=1/2 Heisenberg model on a one-dimensional chain with 20 sites at fixed temperature T=0.08 for a couple of magnetic fields (h=0, 0.1, ..., 2.5).

```LATTICE="chain lattice"
MODEL   = "spin"
LATTICE_LIBRARY="../lattices.xml"
MODEL_LIBRARY="../models.xml"
local_S=1/2
L=20
J=1
T=0.08
THERMALIZATION=2000
SWEEPS=20000
{h=0;}
{h=0.1;}
{h=0.2;}
{h=0.3;}
{h=0.4;}
{h=0.5;}
{h=0.6;}
{h=0.7;}
{h=0.8;}
{h=0.9;}
{h=1.0;}
{h=1.2;}
{h=1.4;}
{h=1.6;}
{h=1.8;}
{h=2.0;}
{h=2.2;}
{h=2.4;}
{h=2.5;}
```

Using the following standard sequence of commands you can run the simulation using the quantum SSE code and extract the calculated magnetization from the XML output files

```parameter2xml parm4a
sse -Tmin 10 parm4a.in.xml
```

where plot2.xml specifies a plot of the magnetization versus magnetic field

```<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://xml.comp-phys.org/2003/4/plot2html.xsl"?>

<plot name="Magnetization versus magnetic field for one-dimesnional Heisenberg models">

<legend show="true"/>
<xaxis label="Magnetic field" type="PARAMETER" name="h"/>
<yaxis label="Magnetization"  type="SCALAR_AVERAGE"/>

<set label="One-dimensional chain"/>

</plot>
```

#### Questions

• How does the magnetization depend on the magnetic field?

### One-dimensional Heisenberg ladder in a magnetic field

The parameter file quantum2/parm4b sets up Monte Carlo simulations of the quantum mechanical S=1/2 Heisenberg model on a one-dimensional ladder with 60 sites at fixed temperature T=0.08 for a couple of magnetic fields (h=0, 0.1, ..., 3.5).

```LATTICE="ladder"
MODEL   = "spin"
LATTICE_LIBRARY="../lattices.xml"
MODEL_LIBRARY="../models.xml"
local_S=1/2
L=20
J=1
T=0.08
THERMALIZATION=2000
SWEEPS=20000
{h=0;}
{h=0.1;}
{h=0.2;}
{h=0.3;}
{h=0.4;}
{h=0.5;}
{h=0.6;}
{h=0.8;}
{h=1.0;}
{h=1.25;}
{h=1.5;}
{h=1.75;}
{h=2.0;}
{h=2.25;}
{h=2.5;}
{h=2.75;}
{h=3.0;}
{h=3.25;}
{h=3.5;}
```

Using the following standard sequence of commands you can run the simulation using the quantum SSE code and extract the calculated magnetization from the XML output files

```parameter2xml parm4b
sse -Tmin 10 parm4b.in.xml