A prototype of the series-expansion thermal tensor network (SETTN) algorithm [PRB **95**, 161104] is illustrated for the XY chain. Other models can be easily customized thanks to `ITensors.jl`

's `OpSum`

function.

This package is also an essential ingredient for more advanced thermal tensor network algorithms, such as XTRG and tanTRG. In particular,

two-site variational MPO sum and productdiscussed in PRB95, 161104 and PRX8, 031082 are implemented, which can be used in other modules via:

`using SETTN: +, contract`

`julia> ] add Settn`

To make it minimal, this package only exports two functions,

```
"""
function get_ρ(H::MPO, β::Float64; kwargs...) -> ρ::MPO
calculate density matrix ρ(β) using SETTN algorithm
"""
function get_ρ(H::MPO, β::Float64; kwargs...)
```

and

```
"""
function get_fe(ρ::MPO, β::Float64) -> fe::Float64
calculate free energy at β given ρ(β/2) and β
"""
function get_fe(ρ::MPO, β::Float64)
```

Check the `examples/`

directory for computing free energy of the XY chain:

```
julia> cd("examples")
julia> using Pkg
julia> Pkg.instantiate()
julia> include("test.jl")
```

Two-site variational MPO sum `+`

and product `contract`

, are extensions from ITensors.jl with `::Algorithm"variational"`

, more details can be found in `./src/mpo.jl`

; also check the relevant part of source code in `ITensors.jl`

package. Note the sweep scheme for variational sum and product follows the same one for `ITensors.jl`

's `dmrg`

function.

- Implement a more numerically stable MPO product, such as the one given in PRB
**102**, 035147