Skip to content

Commit

Permalink
Print output excitation energies
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos authored Jun 7, 2024
1 parent 37d5b3b commit dbe7894
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions docs/src/man/algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,30 +232,28 @@ This approach is often referred to as the 'Chepiga ansatz', named after one of t

This is supported via the following syntax:

```jldoctest; output=false
```jldoctest
g = 1.0
L = 16
H = transverse_field_ising(; g)
ψ₀ = FiniteMPS(L, ComplexSpace(2), ComplexSpace(32))
ψ, envs, = find_groundstate(ψ₀, H; verbosity=0)
E₀ = real(sum(expectation_value(ψ, H, envs)))
Es, ϕs = excitations(H, ChepigaAnsatz(), ψ, envs; num=1)
@show Es
E₀, Es
```

In order to improve the accuracy, a two-site version also exists, which varies two neighbouring sites:

```jldoctest; output=false
```jldoctest
g = 1.0
L = 16
H = transverse_field_ising(; g)
ψ₀ = FiniteMPS(L, ComplexSpace(2), ComplexSpace(32))
ψ, envs, = find_groundstate(ψ₀, H; verbosity=0)
E₀ = real(sum(expectation_value(ψ, H, envs)))
Es, ϕs = excitations(H, ChepigaAnsatz2(), ψ, envs; num=1)
@show Es
E₀, Es
```

The algorithm is described in more detail in the following paper:
Expand Down

0 comments on commit dbe7894

Please sign in to comment.