Skip to content

Commit 32fbd39

Browse files
20akshay00leburgel
andauthored
Add Bose-Hubbard example (#342)
* add bose hubbard example * formatting * update notebooks after formatting * Fix some math typesetting, add extra (external) references, reflow paragraphs * Regerate markdown and notebook * Minor edits * Break up a few more paragraphs * Add renders --------- Co-authored-by: leburgel <[email protected]>
1 parent 8df9de3 commit 32fbd39

File tree

7 files changed

+1437
-2
lines changed

7 files changed

+1437
-2
lines changed

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ links = InterLinks(
3131
"TensorOperations" => "https://quantumkithub.github.io/TensorOperations.jl/stable/",
3232
"KrylovKit" => "https://jutho.github.io/KrylovKit.jl/stable/",
3333
"BlockTensorKit" => "https://lkdvos.github.io/BlockTensorKit.jl/dev/",
34-
"MatrixAlgebraKit" => "https://quantumkithub.github.io/MatrixAlgebraKit.jl/stable/"
34+
"MatrixAlgebraKit" => "https://quantumkithub.github.io/MatrixAlgebraKit.jl/stable/",
35+
"MPSKitModels" => "https://quantumkithub.github.io/MPSKitModels.jl/dev/"
3536
)
3637

3738
# include MPSKit in all doctests

docs/src/examples/quantum1d/8.bose-hubbard/index.md

Lines changed: 480 additions & 0 deletions
Large diffs are not rendered by default.

docs/src/examples/quantum1d/8.bose-hubbard/main.ipynb

Lines changed: 554 additions & 0 deletions
Large diffs are not rendered by default.

examples/Cache.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"2.haldane" = "804433b690faa1ce268a430edb4185af77a38de7a9f53e097795688a53c30c5e"
66
"6.hubbard" = "af14e1df11b2392a69260ce061a716370a2ce50b5c907f0a7d2548e796d543fe"
77
"7.xy-finiteT" = "7afb26fb9ff8ef84722fee3442eaed2ddffda4a5f70a7844b61ce5178093706c"
8+
"8.bose-hubbard" = "4ca414d4b76bbffbd88a7c153dce245c9fab5b7cee0fe0b706b9a10ed87e29e9"
89
"3.ising-dqpt" = "2d314fd05a75c5c91ff81391c7bf166171b35a7b32933e9490756dc584fe8437"
910
"5.haldane-spt" = "3de1b3baa1e4c5dc2252bbe8688d0c6ac8e5d5265deeb6ab66818bbfb02dd4aa"
1011
"4.xxz-heisenberg" = "1a2093a182f3ce070b53488484d1024e45496b291c1b74e3f370201d4c056be2"

examples/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
BenchmarkFreeFermions = "5b68a00d-ca4d-4b58-ab0c-dc082ade624e"
33
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
44
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
5+
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
56
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
67
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
78
MPSKit = "bb1c41ca-d63c-52ed-829e-0820dda26502"

examples/quantum1d/8.bose-hubbard/main.jl

Lines changed: 398 additions & 0 deletions
Large diffs are not rendered by default.

src/algorithms/toolbox.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Calculate the Galerkin error, which is the error between the solution of the ori
4343
Concretely, this is the overlap of the current state with the single-site derivative, projected onto the nullspace of the current state:
4444
4545
```math
46-
\\epsilon = |VL * (VL' * \\frac{above}{\\partial AC_{pos}})|
46+
\\epsilon = \\left|VL \\left(VL^{\\dagger} ⋅ \\frac{\\partial \\text{above}}{\\partial AC_{\\text{pos}}}\\right)\\right|
4747
```
4848
"""
4949
function calc_galerkin(

0 commit comments

Comments
 (0)