Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Wietek committed Feb 13, 2025
1 parent d0df5a1 commit 370ecd2
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,25 @@ That's it!
```julia
using XDiag

let
N = 16;
nup = N ÷ 2;
block = Spinhalf(N, nup);
let
say_hello()
N = 16
nup = N ÷ 2
block = Spinhalf(N, nup)

# Define the nearest-neighbor Heisenberg model
ops = OpSum()
for i in 1:N
ops += Op("HB", "J", [i, mod1(i+1, N)])
ops += "J" * Op("SdotS", [i, mod1(i+1, N)])
end
ops["J"] = 1.0;
ops["J"] = 1.0

set_verbosity(2); # set verbosity for monitoring progress
e0 = eigval0(ops, block); # compute ground state energy
set_verbosity(2) # set verbosity for monitoring progress
e0 = eigval0(ops, block) # compute ground state energy

println("Ground state energy: $e0");
println("Ground state energy: $e0")
end

```

### Documentation
Expand Down

0 comments on commit 370ecd2

Please sign in to comment.