-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduced 1-indexing in Julia, updating documentation and usage exam…
…ples
- Loading branch information
Alexander Wietek
committed
Sep 9, 2024
1 parent
9f3b148
commit 81cb899
Showing
6 changed files
with
63 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
using XDiag | ||
|
||
let | ||
N = 16; | ||
nup = N ÷ 2; | ||
block = Spinhalf(N, nup); | ||
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-1, i % 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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters