# 4.2. Hubbard chain (optical conductivity)¶

Here, we calculate the optical conductivity for the one-dimensional Hubbard model.

The optical conductivity \(\sigma(\omega)\) can be calculated from the current-current correlation \(I(\omega,\eta)\), which is defined as

where \({\bf e}_{x}\) is the unit translational vector in the x direction. From this the regular part of the optical conductivity is defined as

where \(N_{\rm s}\) is the number of sites.

An input file (`samples/tutorial_4.2/stan1.in`

) for 6-site Hubbard model is as follows:

```
model = "Hubbard"
method = "CG"
lattice = "chain"
L = 6
t = 1
U = 10
2Sz = 0
nelec = 6
exct = 1
EigenVecIO = "out"
```

Scripts for calculating the optical conductivity are
available at `samples/tutorial_4.2/`

.

By performing the all-in-one script (`All.sh`

),

```
sh ./All.sh
```

you can obtain `optical.dat`

Note that `samples/tutorial_4.2/OpticalSpectrum.py`

, `samples/tutorial_4.1/lattice.py`

,
`samples/tutorial_4.2/lattice.py`

, and `samples/tutorial_4.2/input.txt`

are necessary.

A way for plotting `optical.dat`

is as follows

```
plot "optical.dat" u 1:(-($4+$8)/$1) w l
```