From 419858c13b55a3fea9b3d5da6afc8025696a8d0c Mon Sep 17 00:00:00 2001 From: leburgel Date: Wed, 9 Jul 2025 22:22:46 +0200 Subject: [PATCH 1/4] Start --- README.md | 2 +- docs/make.jl | 5 ++- docs/src/assets/custom.css | 42 +++++++++++++++++++ docs/src/assets/logo_readme.svg | 18 ++++++++ .../examples/quantum1d/1.ising-cft/index.md | 4 +- .../examples/quantum1d/5.haldane-spt/index.md | 4 +- docs/src/man/intro.md | 12 ++++-- docs/src/man/operators.md | 4 +- docs/src/man/states.md | 8 +++- examples/quantum1d/1.ising-cft/main.jl | 4 +- examples/quantum1d/5.haldane-spt/main.jl | 4 +- 11 files changed, 94 insertions(+), 13 deletions(-) create mode 100644 docs/src/assets/custom.css create mode 100644 docs/src/assets/logo_readme.svg diff --git a/README.md b/README.md index cc237d9a1..0487f17c7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + # MPSKit.jl diff --git a/docs/make.jl b/docs/make.jl index 86cde1c9d..e899f245d 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -41,9 +41,10 @@ mathengine = MathJax3(Dict(:loader => Dict("load" => ["[tex]/physics"]), makedocs(; sitename="MPSKit.jl", format=Documenter.HTML(; - prettyurls=get(ENV, "CI", nothing) == "true", + prettyurls=true, mathengine, - size_threshold=1024000), + assets=["assets/custom.css"], + size_threshold=1024000,), pages=["Home" => "index.md", "Manual" => ["man/intro.md", "man/states.md", diff --git a/docs/src/assets/custom.css b/docs/src/assets/custom.css new file mode 100644 index 000000000..ef9f18328 --- /dev/null +++ b/docs/src/assets/custom.css @@ -0,0 +1,42 @@ +/* set fixed non-trivial inversion and hue rotation */ +:root { + --inversionFraction: 100%; + --hueRotation: -180deg; +} + +/* color-invert images */ +.color-invertible { + filter: invert(var(--inversionFraction)) hue-rotate(var(--hueRotation)) !important; + -ms-filter: invert(var(--inversionFraction)) !important; + -webkit-filter: invert(var(--inversionFraction)) hue-rotate(var(--hueRotation)) !important; +} +/* including the logo */ +.docs-logo { + filter: invert(var(--inversionFraction)) hue-rotate(var(--hueRotation)) !important; + -ms-filter: invert(var(--inversionFraction)) !important; + -webkit-filter: invert(var(--inversionFraction)) hue-rotate(var(--hueRotation)) !important; +} + + +/* but disable for the two light themes */ +.theme--documenter-light .color-invertible { + filter: invert(0%) hue-rotate(0deg) !important; + -ms-filter: invert(var(0%)) !important; + -webkit-filter: invert(var(0%)) hue-rotate(0deg) !important; +} +.theme--catppuccin-latte .color-invertible { + filter: invert(0%) hue-rotate(0deg) !important; + -ms-filter: invert(var(0%)) !important; + -webkit-filter: invert(var(0%)) hue-rotate(0deg) !important; +} +/* for the logo as well */ +.theme--documenter-light .docs-logo { + filter: invert(0%) hue-rotate(0deg) !important; + -ms-filter: invert(var(0%)) !important; + -webkit-filter: invert(var(0%)) hue-rotate(0deg) !important; +} +.theme--catppuccin-latte .docs-logo { + filter: invert(0%) hue-rotate(0deg) !important; + -ms-filter: invert(var(0%)) !important; + -webkit-filter: invert(var(0%)) hue-rotate(0deg) !important; +} diff --git a/docs/src/assets/logo_readme.svg b/docs/src/assets/logo_readme.svg new file mode 100644 index 000000000..be3ee3831 --- /dev/null +++ b/docs/src/assets/logo_readme.svg @@ -0,0 +1,18 @@ + + +
+
+ + MPSKit Logo +
+
+
+
\ No newline at end of file diff --git a/docs/src/examples/quantum1d/1.ising-cft/index.md b/docs/src/examples/quantum1d/1.ising-cft/index.md index cd40011ed..82768662e 100644 --- a/docs/src/examples/quantum1d/1.ising-cft/index.md +++ b/docs/src/examples/quantum1d/1.ising-cft/index.md @@ -138,7 +138,9 @@ Given a state, it is possible to assign a momentum label through the use of the translation operator. This operator can be defined in MPO language either diagramatically as -![translation operator MPO](translation_mpo.png) +```@raw html +translation operator +``` or in the code as: diff --git a/docs/src/examples/quantum1d/5.haldane-spt/index.md b/docs/src/examples/quantum1d/5.haldane-spt/index.md index c54642d41..2e3e69585 100644 --- a/docs/src/examples/quantum1d/5.haldane-spt/index.md +++ b/docs/src/examples/quantum1d/5.haldane-spt/index.md @@ -1002,7 +1002,9 @@ can obtain an intuitive understanding of $\ket{\psi_+}$ by considering the follo diagram. If we denote the MPS tensors that make up the groundstate as $A_-$, we can construct a state in the trivial SPT phase that approximates the groundstate as follows: -![spt-tensors.svg](spt-tensors.svg) +```@raw html +SPT tensors +``` In other words, we can factorize a purely virtual isomorphism of $S = 1/2$ in order to obtain the groundstate. This then also explains the degeneracies in the entanglement diff --git a/docs/src/man/intro.md b/docs/src/man/intro.md index 9b74dce2f..b18da6c0f 100644 --- a/docs/src/man/intro.md +++ b/docs/src/man/intro.md @@ -65,7 +65,9 @@ For more information, check out the [TensorKit documentation](https://jutho.gith The general definition of an MPS tensor is as follows: -![convention MPSTensor](../assets/mps_tensor_definition.png) +```@raw html +convention MPSTensor +``` These tensors are allowed to have an arbitrary number of physical legs, and both `FiniteMPS` as well as `InfiniteMPS` will be able to handle the resulting objects. This allows for @@ -74,12 +76,16 @@ example for the definition of boundary tensors in PEPS code, which have two phys Similarly, the definition of a bond tensor, appearing in between two MPS tensors, is as follows: -![convention BondTensor](../assets/bond_tensor_definition.png) +```@raw html +convention BondTensor +``` Finally, the definition of a MPO tensor, which is used to represent statistical mechanics problems as well as quantum hamiltonians, is represented as: -![convention MPOTensor](../assets/mpo_tensor_definition.png) +```@raw html +convention MPOTensor +``` While this results at first glance in the not very intuitive ordering of spaces as $V_l \otimes P \leftarrow P \otimes V_r$, this is actually the most natural ordering for keeping diff --git a/docs/src/man/operators.md b/docs/src/man/operators.md index 3d8464975..536a97475 100644 --- a/docs/src/man/operators.md +++ b/docs/src/man/operators.md @@ -13,7 +13,9 @@ These objects can be created either directly from a vector of `MPOTensor`s, or s a dense operator (a subtype of `AbstractTensorMap`), which is then decomposed into a product of local tensors. -![](../assets/mpo.svg) +```@raw html +MPO +``` ```@setup operators using TensorKit, MPSKit, MPSKitModels diff --git a/docs/src/man/states.md b/docs/src/man/states.md index a22b110fd..80b018d10 100644 --- a/docs/src/man/states.md +++ b/docs/src/man/states.md @@ -10,7 +10,9 @@ using LinearAlgebra: dot A [`FiniteMPS`](@ref) is - at its core - a chain of mps tensors. -![](finite_mps_definition.png) +```@raw html +finite MPS +``` ### Usage @@ -37,7 +39,9 @@ You can take dot products, renormalize!, expectation values,.... An MPS representation is not unique: for every virtual bond we can insert $C \cdot C^{-1}$ without altering the state. Then, by redefining the tensors on both sides of the bond to include one factor each, we can change the representation. -![](mps_gauge_freedom.png) +```@raw html +MPS gauge freedom +``` There are two particularly convenient choices for the gauge at a site, the so-called left and right canonical form. For the left canonical form, all tensors to the left of a site are gauged such that they become left-isometries. diff --git a/examples/quantum1d/1.ising-cft/main.jl b/examples/quantum1d/1.ising-cft/main.jl index 8bb4cd781..8936acbf1 100644 --- a/examples/quantum1d/1.ising-cft/main.jl +++ b/examples/quantum1d/1.ising-cft/main.jl @@ -47,7 +47,9 @@ Given a state, it is possible to assign a momentum label through the use of the translation operator. This operator can be defined in MPO language either diagramatically as -![translation operator MPO](translation_mpo.png) +```@raw html +translation operator +``` or in the code as: """ diff --git a/examples/quantum1d/5.haldane-spt/main.jl b/examples/quantum1d/5.haldane-spt/main.jl index fe4597fc6..fd4e223a5 100644 --- a/examples/quantum1d/5.haldane-spt/main.jl +++ b/examples/quantum1d/5.haldane-spt/main.jl @@ -135,7 +135,9 @@ can obtain an intuitive understanding of $\ket{\psi_+}$ by considering the follo diagram. If we denote the MPS tensors that make up the groundstate as $A_-$, we can construct a state in the trivial SPT phase that approximates the groundstate as follows: -![spt-tensors.svg](spt-tensors.svg) +```@raw html +SPT tensors +``` In other words, we can factorize a purely virtual isomorphism of $S = 1/2$ in order to obtain the groundstate. This then also explains the degeneracies in the entanglement From e67b21bf582590a06d3de8674d69b62bfa54a776 Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 10 Jul 2025 00:09:57 +0200 Subject: [PATCH 2/4] One picture at a time --- .../examples/quantum1d/1.ising-cft/index.md | 2 +- .../quantum1d/1.ising-cft/translation_mpo.png | Bin 4826 -> 0 bytes .../quantum1d/1.ising-cft/translation_mpo.svg | 452 ++++++++++++++++++ examples/quantum1d/1.ising-cft/main.jl | 2 +- .../quantum1d/1.ising-cft/translation_mpo.png | Bin 4826 -> 0 bytes .../quantum1d/1.ising-cft/translation_mpo.svg | 452 ++++++++++++++++++ 6 files changed, 906 insertions(+), 2 deletions(-) delete mode 100644 docs/src/examples/quantum1d/1.ising-cft/translation_mpo.png create mode 100644 docs/src/examples/quantum1d/1.ising-cft/translation_mpo.svg delete mode 100644 examples/quantum1d/1.ising-cft/translation_mpo.png create mode 100644 examples/quantum1d/1.ising-cft/translation_mpo.svg diff --git a/docs/src/examples/quantum1d/1.ising-cft/index.md b/docs/src/examples/quantum1d/1.ising-cft/index.md index 82768662e..3295fd107 100644 --- a/docs/src/examples/quantum1d/1.ising-cft/index.md +++ b/docs/src/examples/quantum1d/1.ising-cft/index.md @@ -139,7 +139,7 @@ through the use of the translation operator. This operator can be defined in MPO either diagramatically as ```@raw html -translation operator +translation operator ``` or in the code as: diff --git a/docs/src/examples/quantum1d/1.ising-cft/translation_mpo.png b/docs/src/examples/quantum1d/1.ising-cft/translation_mpo.png deleted file mode 100644 index d689996f8182f36a7f7ec7ee6e27bfb919f208a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4826 zcmd^D`#+QY|DVmKjFxn8P7x`GavCv&YIBZaPUB9|=FoD?gk9C0q)>7uiY7VV8AD^; zDV2n!k>hpW6_SlxSc~{vyTAXyeSd%ZJU)*-9@p!Az22|)^V(~BU$5u$^-gtjIVLNu zBn^YXWC?hCcNh%52#rfOprC7z-}iCIpiVg+vxlvVKc(!7EEsG{2EqRDi3>&ivH1Fu zlZjn_#j#R%?f2bs>Vw}Un?TqRQ}6qi(c5(7>UmA9t@qSp!;m^~K0W99?t!-~-<c2iF{A4||_JuKrsJ%=<@IYVkeOUJ*&~3OA)WH~2<%P4qUtJw9nF z{%-HwA8&vDe)Wt5mCDyTWFl+Ej+IwUkg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+SCd;i1eV;W}{&?*n05i!1UZ4t@n@3D-@P2z5isUowQSSrv0nLw*E zy^6jqzjZn>P);=Es#gf}LKtiu5J;`Yl?vkM&8V3s&16ypoPpv!qS*3La8oo7Ctdw| zpvdV*JsJyjz)%9F?BkOq?SuU>xXjfoGtWC6#l- zW^5mKyjz6&5}bU5A@BxMIW)Zz3p_y4bQ7A1qzftW_;awe)>N z{wa&=bXh*DYrqPAw^RQM!*?OPkMcT6O>e@_(`|X8wP5RjW6cLK#yh>r#i{-Uk*|v` zG2?|sC&}Hu@uI+CqD(!p|ASlY$jk04{lw>2qsFWpMIkRfA_v1nqla5o-ql&!wL}dr zq>Ze9{?{b+&*|*HBy#3OEa!>1bJ#)+gid0bln+34ptwMG7Ah6#dNAlsyYDfA7!jLy s^hD@{rvV4#izTKfCmm`|&aERp!s|%!8p>7BVHJ#U#KpeWHt^Da07*ywtN;K2 diff --git a/docs/src/examples/quantum1d/1.ising-cft/translation_mpo.svg b/docs/src/examples/quantum1d/1.ising-cft/translation_mpo.svg new file mode 100644 index 000000000..5aab21cd3 --- /dev/null +++ b/docs/src/examples/quantum1d/1.ising-cft/translation_mpo.svg @@ -0,0 +1,452 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/quantum1d/1.ising-cft/main.jl b/examples/quantum1d/1.ising-cft/main.jl index 8936acbf1..e3a5e367d 100644 --- a/examples/quantum1d/1.ising-cft/main.jl +++ b/examples/quantum1d/1.ising-cft/main.jl @@ -48,7 +48,7 @@ through the use of the translation operator. This operator can be defined in MPO either diagramatically as ```@raw html -translation operator +translation operator ``` or in the code as: diff --git a/examples/quantum1d/1.ising-cft/translation_mpo.png b/examples/quantum1d/1.ising-cft/translation_mpo.png deleted file mode 100644 index d689996f8182f36a7f7ec7ee6e27bfb919f208a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4826 zcmd^D`#+QY|D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1%Hio%pr{6OVEhlPyhXj?_6^fGgOdoTf|&*lI!( z)&qQ8a>~Ca)Fe|fCA2C6DX4eRQ=djBgU0&}N8WI(s#Yoo;!8b-#EO`8i|-WM z_z&OZXo<-)1aBAS!`w#x5mdDsfey`wshof)9+Rn6+(Zc(R%6BLkvE)7Ges4B5{p#+;@X^=_)0|RM%E#998 z!RwIb8Il`%5G#+Ul}Lj005eZU#Rm$sMn;Gw*-vs@!8B!94Q$#L?poR|$Et!Nw{r!b zzDohgkOZTT;op6HpUKTS)hjjb4W*fVcWawgaKjGgh`rrMHcWha|hp zfVvP$(k9)F)hE061LsgP0#qz!phvP@#h}+SCd;i1eV;W}{&?*n05i!1UZ4t@n@3D-@P2z5isUowQSSrv0nLw*E zy^6jqzjZn>P);=Es#gf}LKtiu5J;`Yl?vkM&8V3s&16ypoPpv!qS*3La8oo7Ctdw| zpvdV*JsJyjz)%9F?BkOq?SuU>xXjfoGtWC6#l- zW^5mKyjz6&5}bU5A@BxMIW)Zz3p_y4bQ7A1qzftW_;awe)>N z{wa&=bXh*DYrqPAw^RQM!*?OPkMcT6O>e@_(`|X8wP5RjW6cLK#yh>r#i{-Uk*|v` zG2?|sC&}Hu@uI+CqD(!p|ASlY$jk04{lw>2qsFWpMIkRfA_v1nqla5o-ql&!wL}dr zq>Ze9{?{b+&*|*HBy#3OEa!>1bJ#)+gid0bln+34ptwMG7Ah6#dNAlsyYDfA7!jLy s^hD@{rvV4#izTKfCmm`|&aERp!s|%!8p>7BVHJ#U#KpeWHt^Da07*ywtN;K2 diff --git a/examples/quantum1d/1.ising-cft/translation_mpo.svg b/examples/quantum1d/1.ising-cft/translation_mpo.svg new file mode 100644 index 000000000..5aab21cd3 --- /dev/null +++ b/examples/quantum1d/1.ising-cft/translation_mpo.svg @@ -0,0 +1,452 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From f87f5c8d2a89e4e3455330234d584ded823a51e3 Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 10 Jul 2025 00:34:11 +0200 Subject: [PATCH 3/4] Update some examples --- .../examples/quantum1d/1.ising-cft/index.md | 435 +++-- .../examples/quantum1d/1.ising-cft/main.ipynb | 4 +- .../examples/quantum1d/5.haldane-spt/index.md | 1585 +++++++++-------- .../quantum1d/5.haldane-spt/main.ipynb | 4 +- examples/Cache.toml | 4 +- 5 files changed, 1021 insertions(+), 1011 deletions(-) diff --git a/docs/src/examples/quantum1d/1.ising-cft/index.md b/docs/src/examples/quantum1d/1.ising-cft/index.md index 3295fd107..49b15148a 100644 --- a/docs/src/examples/quantum1d/1.ising-cft/index.md +++ b/docs/src/examples/quantum1d/1.ising-cft/index.md @@ -63,67 +63,69 @@ plot(real.(energies); - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -139,7 +141,7 @@ through the use of the translation operator. This operator can be defined in MPO either diagramatically as ```@raw html -translation operator +translation operator ``` or in the code as: @@ -191,24 +193,24 @@ append!(momenta, fix_degeneracies(states[17:18])) ```` 18-element Vector{Float64}: - -3.9672804251717156e-17 - -3.7809066376698395e-17 - 1.9364434176550726e-17 - -0.5235987755982991 - 0.5235987755982987 - 1.047197551196598 - -1.047197551196597 - -0.5235987755982985 - 0.5235987755982987 + 1.246186266146853e-17 + -8.631511857294761e-18 + -1.3216734210710249e-17 + -0.5235987755982986 + 0.5235987755982986 + 1.0471975511965979 -1.0471975511965976 - 1.0471975511965976 - -1.1073637563936691e-17 - -1.5707963267948968 - 1.5707963267948968 + -0.5235987755982994 + 0.5235987755982986 -1.0471975511965979 - 1.0471975511965972 + 1.047197551196598 + 2.045951729445069e-18 + 1.5707963267948972 + -1.5707963267948966 + 1.0471975511965976 + -1.0471975511965976 1.5707963267948968 - -1.5707963267948963 + -1.5707963267948966 ```` We can compute the scaling dimensions $\Delta_n$ of the operators in the CFT from the @@ -233,81 +235,81 @@ p - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -325,36 +327,29 @@ D = 64 ```` ```` -[ Info: DMRG init: obj = -1.990218724629e+01 err = 7.4846e-02 -[ Info: DMRG 1: obj = -2.549098967874e+01 err = 4.1389989697e-03 time = 1.98 sec -[ Info: DMRG 2: obj = -2.549098968636e+01 err = 8.3286537771e-07 time = 0.43 sec -[ Info: DMRG 3: obj = -2.549098968636e+01 err = 7.8836932549e-08 time = 0.78 sec -[ Info: DMRG 4: obj = -2.549098968636e+01 err = 1.2157986090e-08 time = 0.52 sec -[ Info: DMRG 5: obj = -2.549098968636e+01 err = 4.5963842433e-09 time = 0.56 sec -[ Info: DMRG 6: obj = -2.549098968636e+01 err = 2.3229977031e-09 time = 0.55 sec -[ Info: DMRG 7: obj = -2.549098968636e+01 err = 1.9807447155e-09 time = 0.79 sec -[ Info: DMRG 8: obj = -2.549098968636e+01 err = 1.8101666690e-09 time = 0.70 sec -[ Info: DMRG 9: obj = -2.549098968636e+01 err = 1.6596660041e-09 time = 1.00 sec -[ Info: DMRG 10: obj = -2.549098968636e+01 err = 1.5028466015e-09 time = 1.00 sec -[ Info: DMRG 11: obj = -2.549098968636e+01 err = 1.3419670975e-09 time = 0.99 sec -[ Info: DMRG 12: obj = -2.549098968636e+01 err = 1.1842249707e-09 time = 1.00 sec -[ Info: DMRG 13: obj = -2.549098968636e+01 err = 1.0356798368e-09 time = 0.99 sec -[ Info: DMRG 14: obj = -2.549098968636e+01 err = 9.0001540544e-10 time = 0.99 sec -[ Info: DMRG 15: obj = -2.549098968636e+01 err = 7.7880124636e-10 time = 1.01 sec -[ Info: DMRG 16: obj = -2.549098968636e+01 err = 6.7212700978e-10 time = 1.00 sec -[ Info: DMRG 17: obj = -2.549098968636e+01 err = 5.7919723678e-10 time = 1.02 sec -[ Info: DMRG 18: obj = -2.549098968636e+01 err = 4.9877203200e-10 time = 1.03 sec -[ Info: DMRG 19: obj = -2.549098968636e+01 err = 4.2945107431e-10 time = 1.02 sec -[ Info: DMRG 20: obj = -2.549098968636e+01 err = 3.6984011575e-10 time = 1.03 sec -[ Info: DMRG 21: obj = -2.549098968636e+01 err = 3.1863801222e-10 time = 1.05 sec -[ Info: DMRG 22: obj = -2.549098968636e+01 err = 2.7467488610e-10 time = 1.06 sec -[ Info: DMRG 23: obj = -2.549098968636e+01 err = 2.3692226590e-10 time = 1.05 sec -[ Info: DMRG 24: obj = -2.549098968636e+01 err = 2.0448836836e-10 time = 1.06 sec -[ Info: DMRG 25: obj = -2.549098968636e+01 err = 1.7660632136e-10 time = 1.06 sec -[ Info: DMRG 26: obj = -2.549098968636e+01 err = 1.5262000256e-10 time = 1.05 sec -[ Info: DMRG 27: obj = -2.549098968636e+01 err = 1.3196928368e-10 time = 1.13 sec -[ Info: DMRG 28: obj = -2.549098968636e+01 err = 1.1417667953e-10 time = 1.35 sec -[ Info: DMRG conv 29: obj = -2.549098968636e+01 err = 9.8835132816e-11 time = 28.86 sec +[ Info: DMRG init: obj = -1.962262453177e+01 err = 7.3556e-02 +[ Info: DMRG 1: obj = -2.549098959968e+01 err = 6.9556083849e-03 time = 6.15 sec +[ Info: DMRG 2: obj = -2.549098968636e+01 err = 9.6981397128e-07 time = 1.72 sec +[ Info: DMRG 3: obj = -2.549098968636e+01 err = 1.3889229576e-07 time = 3.00 sec +[ Info: DMRG 4: obj = -2.549098968636e+01 err = 1.0660559825e-08 time = 1.22 sec +[ Info: DMRG 5: obj = -2.549098968636e+01 err = 4.3665500904e-09 time = 1.61 sec +[ Info: DMRG 6: obj = -2.549098968636e+01 err = 2.3077809720e-09 time = 1.46 sec +[ Info: DMRG 7: obj = -2.549098968636e+01 err = 1.5733990931e-09 time = 1.77 sec +[ Info: DMRG 8: obj = -2.549098968636e+01 err = 1.1971538263e-09 time = 1.61 sec +[ Info: DMRG 9: obj = -2.549098968636e+01 err = 9.8752978358e-10 time = 1.91 sec +[ Info: DMRG 10: obj = -2.549098968636e+01 err = 8.1374220442e-10 time = 1.58 sec +[ Info: DMRG 11: obj = -2.549098968636e+01 err = 6.7075749015e-10 time = 1.81 sec +[ Info: DMRG 12: obj = -2.549098968636e+01 err = 5.5405183201e-10 time = 1.55 sec +[ Info: DMRG 13: obj = -2.549098968636e+01 err = 4.5909617368e-10 time = 2.38 sec +[ Info: DMRG 14: obj = -2.549098968636e+01 err = 3.8179578214e-10 time = 2.88 sec +[ Info: DMRG 15: obj = -2.549098968636e+01 err = 3.1869349978e-10 time = 2.66 sec +[ Info: DMRG 16: obj = -2.549098968636e+01 err = 2.6697738491e-10 time = 2.45 sec +[ Info: DMRG 17: obj = -2.549098968636e+01 err = 2.2440327341e-10 time = 2.17 sec +[ Info: DMRG 18: obj = -2.549098968636e+01 err = 1.8919500490e-10 time = 1.83 sec +[ Info: DMRG 19: obj = -2.549098968636e+01 err = 1.5994966767e-10 time = 1.73 sec +[ Info: DMRG 20: obj = -2.549098968636e+01 err = 1.3555718171e-10 time = 1.98 sec +[ Info: DMRG 21: obj = -2.549098968636e+01 err = 1.1513558901e-10 time = 2.08 sec +[ Info: DMRG conv 22: obj = -2.549098968636e+01 err = 9.7980377538e-11 time = 47.77 sec ```` @@ -394,77 +389,77 @@ p_mps - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` diff --git a/docs/src/examples/quantum1d/1.ising-cft/main.ipynb b/docs/src/examples/quantum1d/1.ising-cft/main.ipynb index 11419eaee..b72803229 100644 --- a/docs/src/examples/quantum1d/1.ising-cft/main.ipynb +++ b/docs/src/examples/quantum1d/1.ising-cft/main.ipynb @@ -85,7 +85,9 @@ "through the use of the translation operator. This operator can be defined in MPO language\n", "either diagramatically as\n", "\n", - "![translation operator MPO](translation_mpo.png)\n", + "\n", + "\"translation\n", + "\n", "\n", "or in the code as:" ], diff --git a/docs/src/examples/quantum1d/5.haldane-spt/index.md b/docs/src/examples/quantum1d/5.haldane-spt/index.md index 2e3e69585..e020519ca 100644 --- a/docs/src/examples/quantum1d/5.haldane-spt/index.md +++ b/docs/src/examples/quantum1d/5.haldane-spt/index.md @@ -104,274 +104,285 @@ transferplot(ψ; sectors, title="Transfer matrix spectrum", legend=:outertop) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -399,7 +410,7 @@ E_plus = expectation_value(ψ_plus, H) ```` ```` --1.4014193313393015 - 2.5829324229205153e-17im +-1.4014193313392993 - 2.900712048241961e-17im ```` ````julia @@ -410,7 +421,7 @@ E_minus = expectation_value(ψ_minus, H) ```` ```` --1.4014839739630842 - 3.3657493938637046e-16im +-1.4014839739630869 - 1.670298784395022e-16im ```` ````julia @@ -425,464 +436,464 @@ plot(transferp_plus, transferp_minus; layout=(1, 2), size=(800, 400)) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -896,104 +907,104 @@ plot(entanglementp_plus, entanglementp_minus; layout=(1, 2), size=(800, 400)) - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ``` @@ -1021,8 +1032,8 @@ println("S_plus = $S_plus") ```` ```` -S_minus + log(2) = 1.5486227235443117 -S_plus = 1.545032353057881 +S_minus + log(2) = 1.5486227235407952 +S_plus = 1.5450323530589885 ```` diff --git a/docs/src/examples/quantum1d/5.haldane-spt/main.ipynb b/docs/src/examples/quantum1d/5.haldane-spt/main.ipynb index 567c463e6..964f3765f 100644 --- a/docs/src/examples/quantum1d/5.haldane-spt/main.ipynb +++ b/docs/src/examples/quantum1d/5.haldane-spt/main.ipynb @@ -159,7 +159,9 @@ "diagram. If we denote the MPS tensors that make up the groundstate as $A_-$, we can\n", "construct a state in the trivial SPT phase that approximates the groundstate as follows:\n", "\n", - "![spt-tensors.svg](spt-tensors.svg)\n", + "\n", + "\"SPT\n", + "\n", "\n", "In other words, we can factorize a purely virtual isomorphism of $S = 1/2$ in order to\n", "obtain the groundstate. This then also explains the degeneracies in the entanglement\n", diff --git a/examples/Cache.toml b/examples/Cache.toml index faa708cac..4524ed74f 100644 --- a/examples/Cache.toml +++ b/examples/Cache.toml @@ -6,6 +6,6 @@ "6.hubbard" = "708c865dd9681d36d5d1b3dc43914d3df59d3f97ae7bcc6e3a24092890b8d44f" "7.xy-finiteT" = "8ba5bd93407263202d3f07aa5e36d8387308a9107202ea06df9755ee128058c1" "3.ising-dqpt" = "bfa10659a7c002fc7237948367474064f81071d773d493f30f222c0842fc416f" -"5.haldane-spt" = "1f4a054ff1528f1f273fbeec6258a7bad21fb789bfffb073dbb01e697d1b275c" +"5.haldane-spt" = "e5b4665915d5a91e845f85c03b47a628c45ae3d326f1c0dbf01df7e7ff1bad6e" "4.xxz-heisenberg" = "8d27d51408b6dbb5550afd7d2d80307e134f8a32a163923e12e74ad3ce8c5041" -"1.ising-cft" = "b0b2106eb3b6ba5b4c505adfcae7a4ed49a788e4545df08d053416feccec1797" +"1.ising-cft" = "999e9643a38198e8586005978878c5f96158336d029df7e5ce8088976e8cc4f5" From 7009e240f6b1a1aadc4be4df0d99ae6139b40bbf Mon Sep 17 00:00:00 2001 From: leburgel Date: Thu, 10 Jul 2025 01:00:03 +0200 Subject: [PATCH 4/4] Small fix --- examples/quantum1d/3.ising-dqpt/main.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/quantum1d/3.ising-dqpt/main.jl b/examples/quantum1d/3.ising-dqpt/main.jl index 316bf9fd8..fd5d85eea 100644 --- a/examples/quantum1d/3.ising-dqpt/main.jl +++ b/examples/quantum1d/3.ising-dqpt/main.jl @@ -1,5 +1,5 @@ md""" -# DQPT in the Ising model(@id demo_dqpt) +# [DQPT in the Ising model](@id demo_dqpt) In this tutorial we will try to reproduce the results from [this paper](https://arxiv.org/pdf/1206.2505.pdf). The needed packages are