From dc3f9c488535662eed5de24f8a867410737b7972 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 2 May 2024 11:12:07 +0000 Subject: [PATCH] build based on 84c7c80 --- dev/.documenter-siteinfo.json | 2 +- .../classic2d/1.hard-hexagon/index.html | 2 +- dev/examples/index.html | 2 +- dev/examples/quantum1d/1.ising-cft/index.html | 2 +- dev/examples/quantum1d/2.haldane/index.html | 2 +- .../quantum1d/3.ising-dqpt/index.html | 2 +- .../quantum1d/4.xxz-heisenberg/index.html | 2 +- .../quantum1d/5.haldane-spt/index.html | 2 +- dev/index.html | 50 +++++++++---------- dev/lib/lib/index.html | 24 ++++----- dev/man/algorithms/index.html | 4 +- dev/man/environments/index.html | 2 +- dev/man/intro/index.html | 10 ++-- dev/man/operators/index.html | 4 +- dev/man/parallelism/index.html | 2 +- dev/man/states/index.html | 2 +- 16 files changed, 57 insertions(+), 57 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 28c7ca0f..0d821585 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-02T07:17:45","documenter_version":"1.4.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-02T11:12:02","documenter_version":"1.4.1"}} \ No newline at end of file diff --git a/dev/examples/classic2d/1.hard-hexagon/index.html b/dev/examples/classic2d/1.hard-hexagon/index.html index 096a7fa0..c456a602 100644 --- a/dev/examples/classic2d/1.hard-hexagon/index.html +++ b/dev/examples/classic2d/1.hard-hexagon/index.html @@ -93,4 +93,4 @@ -

This page was generated using Literate.jl.

+

This page was generated using Literate.jl.

diff --git a/dev/examples/index.html b/dev/examples/index.html index c25a45ec..35f22c8f 100644 --- a/dev/examples/index.html +++ b/dev/examples/index.html @@ -1,2 +1,2 @@ -Examples · MPSKit.jl +Examples · MPSKit.jl diff --git a/dev/examples/quantum1d/1.ising-cft/index.html b/dev/examples/quantum1d/1.ising-cft/index.html index f973cb15..ce139383 100644 --- a/dev/examples/quantum1d/1.ising-cft/index.html +++ b/dev/examples/quantum1d/1.ising-cft/index.html @@ -363,4 +363,4 @@

-

This page was generated using Literate.jl.

+

This page was generated using Literate.jl.

diff --git a/dev/examples/quantum1d/2.haldane/index.html b/dev/examples/quantum1d/2.haldane/index.html index 7ac405f2..7e4c9bfe 100644 --- a/dev/examples/quantum1d/2.haldane/index.html +++ b/dev/examples/quantum1d/2.haldane/index.html @@ -399,4 +399,4 @@

-

This page was generated using Literate.jl.

+

This page was generated using Literate.jl.

diff --git a/dev/examples/quantum1d/3.ising-dqpt/index.html b/dev/examples/quantum1d/3.ising-dqpt/index.html index a0aadcc6..74a80ee0 100644 --- a/dev/examples/quantum1d/3.ising-dqpt/index.html +++ b/dev/examples/quantum1d/3.ising-dqpt/index.html @@ -61,4 +61,4 @@ end return times, echos -end
infinite_sim (generic function with 3 methods)


This page was generated using Literate.jl.

+end
infinite_sim (generic function with 3 methods)


This page was generated using Literate.jl.

diff --git a/dev/examples/quantum1d/4.xxz-heisenberg/index.html b/dev/examples/quantum1d/4.xxz-heisenberg/index.html index 188d4f06..c58aeaa4 100644 --- a/dev/examples/quantum1d/4.xxz-heisenberg/index.html +++ b/dev/examples/quantum1d/4.xxz-heisenberg/index.html @@ -532,4 +532,4 @@ [ Info: VUMPS 71: obj = -8.862878980874e-01 err = 1.5883810301e-12 time = 0.06 sec [ Info: VUMPS 72: obj = -8.862878980874e-01 err = 1.4779906096e-12 time = 0.12 sec [ Info: VUMPS conv 73: obj = -8.862878980874e-01 err = 8.1850316544e-13 time = 9.30 sec -

This page was generated using Literate.jl.

+

This page was generated using Literate.jl.

diff --git a/dev/examples/quantum1d/5.haldane-spt/index.html b/dev/examples/quantum1d/5.haldane-spt/index.html index 5dc8ec89..613605ff 100644 --- a/dev/examples/quantum1d/5.haldane-spt/index.html +++ b/dev/examples/quantum1d/5.haldane-spt/index.html @@ -874,4 +874,4 @@ println("S_minus + log(2) = $(S_minus + log(2))") println("S_plus = $S_plus")
S_minus + log(2) = 1.5486227235451633
 S_plus = 1.5450323530414438
-

This page was generated using Literate.jl.

+

This page was generated using Literate.jl.

diff --git a/dev/index.html b/dev/index.html index eeb24a0a..5c3e70a7 100644 --- a/dev/index.html +++ b/dev/index.html @@ -38,22 +38,22 @@ N2 = expectation_value(mps, id(physicalspace(mps, 3)), 3) println("‖mps‖ = $N1") println("<mps|𝕀₃|mps> = $N2")
‖mps‖ = 2.23606797749979
-<mps|𝕀₃|mps> = 5.000000000000002 + 0.0im

Finally, the MPS can be optimized in order to determine groundstates of given Hamiltonians. Using the pre-defined models in MPSKitModels, we can construct the groundstate for the transverse field Ising model:

H = transverse_field_ising(; J=1.0, g=0.5)
+<mps|𝕀₃|mps> = 4.999999999999999 + 0.0im

Finally, the MPS can be optimized in order to determine groundstates of given Hamiltonians. Using the pre-defined models in MPSKitModels, we can construct the groundstate for the transverse field Ising model:

H = transverse_field_ising(; J=1.0, g=0.5)
 find_groundstate!(mps, H, DMRG(; maxiter=10))
 E0 = expectation_value(mps, H)
-println("<mps|H|mps> = $(sum(real(E0)) / length(mps))")
[ Info: DMRG init:	obj = -1.957173245884e+00	err = 4.8133e-01
-[ Info: DMRG   1:	obj = -9.765499749623e+00	err = 2.3790172157e-02	time = 0.46 sec
-[ Info: DMRG   2:	obj = -9.765503486201e+00	err = 3.6198037445e-04	time = 0.51 sec
-[ Info: DMRG   3:	obj = -9.765503487358e+00	err = 5.0939207432e-06	time = 0.04 sec
-[ Info: DMRG   4:	obj = -9.765503487615e+00	err = 2.3679137455e-06	time = 0.04 sec
-[ Info: DMRG   5:	obj = -9.765503487672e+00	err = 1.0772933945e-06	time = 0.04 sec
-[ Info: DMRG   6:	obj = -9.765503487685e+00	err = 4.8976151793e-07	time = 0.03 sec
-[ Info: DMRG   7:	obj = -9.765503487689e+00	err = 2.2327485915e-07	time = 0.03 sec
-[ Info: DMRG   8:	obj = -9.765503487689e+00	err = 1.0212878184e-07	time = 0.03 sec
-[ Info: DMRG   9:	obj = -9.765503487689e+00	err = 4.6891878032e-08	time = 0.03 sec
-┌ Warning: DMRG cancel 10:	obj = -9.765503487689e+00	err = 2.3321891329e-08	time = 1.24 sec
+println("<mps|H|mps> = $(sum(real(E0)) / length(mps))")
[ Info: DMRG init:	obj = -1.991667650874e+00	err = 4.8146e-01
+[ Info: DMRG   1:	obj = -9.765491761003e+00	err = 2.3058659855e-02	time = 0.45 sec
+[ Info: DMRG   2:	obj = -9.765503496654e+00	err = 3.7324273979e-04	time = 0.52 sec
+[ Info: DMRG   3:	obj = -9.765503497409e+00	err = 3.0994945538e-06	time = 0.04 sec
+[ Info: DMRG   4:	obj = -9.765503497561e+00	err = 1.3859248727e-06	time = 0.04 sec
+[ Info: DMRG   5:	obj = -9.765503497594e+00	err = 6.7247584343e-07	time = 0.04 sec
+[ Info: DMRG   6:	obj = -9.765503497601e+00	err = 3.3143394566e-07	time = 0.04 sec
+[ Info: DMRG   7:	obj = -9.765503497602e+00	err = 1.6460922477e-07	time = 0.03 sec
+[ Info: DMRG   8:	obj = -9.765503497603e+00	err = 8.2035715724e-08	time = 0.03 sec
+[ Info: DMRG   9:	obj = -9.765503497603e+00	err = 4.0937062455e-08	time = 0.03 sec
+┌ Warning: DMRG cancel 10:	obj = -9.765503497603e+00	err = 2.0433785650e-08	time = 1.26 sec
 └ @ MPSKit ~/work/MPSKit.jl/MPSKit.jl/src/algorithms/groundstate/dmrg.jl:48
-<mps|H|mps> = -0.9765503487689491

Infinite Matrix Product States

Similarly, an infinite MPS can be constructed by specifying the tensors for the unit cell, characterised by the spaces (dimensions) thereof.

d = 2 # physical dimension
+<mps|H|mps> = -0.9765503497602624

Infinite Matrix Product States

Similarly, an infinite MPS can be constructed by specifying the tensors for the unit cell, characterised by the spaces (dimensions) thereof.

d = 2 # physical dimension
 D = 5 # virtual dimension
 mps = InfiniteMPS(d, D) # random MPS
single site InfiniteMPS:
 │   ⋮
@@ -74,17 +74,17 @@
 N2 = expectation_value(mps, id(physicalspace(mps, 1)), 1)
 println("‖mps‖ = $N1")
 println("<mps|𝕀₁|mps> = $N2")
‖mps‖ = 1.0
-<mps|𝕀₁|mps> = 1.0 + 0.0im
Normalization of infinite MPS

Because infinite MPS cannot sensibly be normalized to anything but $1$, the norm of an infinite MPS is always set to be $1$ at construction. If this were not the case, any observable computed from the MPS would either blow up to infinity or vanish to zero.

Finally, the MPS can be optimized in order to determine groundstates of given Hamiltonians. Using the pre-defined models in MPSKitModels, we can construct the groundstate for the transverse field Ising model:

H = transverse_field_ising(; J=1.0, g=0.5)
+<mps|𝕀₁|mps> = 0.9999999999999998 + 8.673617379884035e-19im
Normalization of infinite MPS

Because infinite MPS cannot sensibly be normalized to anything but $1$, the norm of an infinite MPS is always set to be $1$ at construction. If this were not the case, any observable computed from the MPS would either blow up to infinity or vanish to zero.

Finally, the MPS can be optimized in order to determine groundstates of given Hamiltonians. Using the pre-defined models in MPSKitModels, we can construct the groundstate for the transverse field Ising model:

H = transverse_field_ising(; J=1.0, g=0.5)
 mps, = find_groundstate(mps, H, VUMPS(; maxiter=10))
 E0 = expectation_value(mps, H)
-println("<mps|H|mps> = $(sum(real(E0)) / length(mps))")
[ Info: VUMPS init:	obj = -5.266827034333e-01	err = 4.3683e-01
-[ Info: VUMPS   1:	obj = -1.062738002515e+00	err = 2.6017722400e-02	time = 0.00 sec
-[ Info: VUMPS   2:	obj = -1.063544404958e+00	err = 6.1696381483e-05	time = 0.00 sec
-[ Info: VUMPS   3:	obj = -1.063544409973e+00	err = 1.2519190830e-07	time = 0.00 sec
-[ Info: VUMPS   4:	obj = -1.063544409973e+00	err = 1.1699897952e-08	time = 0.00 sec
-[ Info: VUMPS   5:	obj = -1.063544409973e+00	err = 1.2664112933e-09	time = 0.00 sec
-[ Info: VUMPS   6:	obj = -1.063544409973e+00	err = 1.3591929360e-10	time = 0.00 sec
-[ Info: VUMPS   7:	obj = -1.063544409973e+00	err = 1.4617535339e-11	time = 0.00 sec
-[ Info: VUMPS   8:	obj = -1.063544409973e+00	err = 1.5049160847e-12	time = 0.00 sec
-[ Info: VUMPS conv 9:	obj = -1.063544409973e+00	err = 8.8469476646e-13	time = 0.02 sec
-<mps|H|mps> = -1.0635444099732507

Additional Resources

For more detailed information on the functionality and capabilities of MPSKit, refer to the Manual section, or have a look at the Examples page.

Keep in mind that the documentation is still a work in progress, and that some features may not be fully documented yet. If you encounter any issues or have questions, please check the library's issue tracker on the GitHub repository and open a new issue.

Publications using MPSKit

Below you can find a list of publications that have made use of MPSKit. If you have used this package and wish to have your publication added to this list, please open a pull request or an issue on the GitHub repository.

  • R. Belyansky et al., “High-Energy Collision of Quarks and Hadrons in the Schwinger Model: From Tensor Networks to Circuit QED,” 2023, doi: 10.48550/ARXIV.2307.02522.
  • L. Devos, L. Vanderstraeten, and F. Verstraete, “Haldane gap in the SU(3) [3 0 0] Heisenberg chain,” Phys. Rev. B, vol. 106, no. 15, p. 155103, Oct. 2022, doi: 10.1103/PhysRevB.106.155103.
  • J. C. Halimeh, M. V. Damme, T. V. Zache, D. Banerjee, and P. Hauke, “Achieving the quantum field theory limit in far-from-equilibrium quantum link models,” Quantum, vol. 6, p. 878, Dec. 2022, doi: 10.22331/q-2022-12-19-878.
  • J. C. Halimeh, D. Trapin, M. Van Damme, and M. Heyl, “Local measures of dynamical quantum phase transitions,” Phys. Rev. B, vol. 104, no. 7, p. 075130, Aug. 2021, doi: 10.1103/PhysRevB.104.075130.
  • M. Hauru, M. Van Damme, and J. Haegeman, “Riemannian optimization of isometric tensor networks,” SciPost Physics, vol. 10, no. 2, p. 040, Feb. 2021, doi: 10.21468/SciPostPhys.10.2.040.
  • M. Van Damme, R. Vanhove, J. Haegeman, F. Verstraete, and L. Vanderstraeten, “Efficient matrix product state methods for extracting spectral information on rings and cylinders,” Phys. Rev. B, vol. 104, no. 11, p. 115142, Sep. 2021, doi: 10.1103/PhysRevB.104.115142.
  • M. Van Damme, T. V. Zache, D. Banerjee, P. Hauke, and J. C. Halimeh, “Dynamical quantum phase transitions in spin-$S$ $\text{U}(1)$ quantum link models,” Phys. Rev. B, vol. 106, no. 24, p. 245110, Dec. 2022, doi: 10.1103/PhysRevB.106.245110.
  • E. L. Weerda and M. Rizzi, “Fractional quantum Hall states with variational Projected Entangled-Pair States: a study of the bosonic Harper-Hofstadter model,” 2023, doi: 10.48550/ARXIV.2309.12811.
  • C. Yu and J.-W. Lee, “Closing of the Haldane gap in a spin-1 XXZ chain,” J. Korean Phys. Soc., vol. 79, no. 9, pp. 841–845, Nov. 2021, doi: 10.1007/s40042-021-00283-z.
  • Y. Zhang, A. Hulsch, H.-C. Zhang, W. Tang, L. Wang, and H.-H. Tu, “Universal Scaling of Klein Bottle Entropy near Conformal Critical Points,” Phys. Rev. Lett., vol. 130, no. 15, p. 151602, Apr. 2023, doi: 10.1103/PhysRevLett.130.151602.
+println("<mps|H|mps> = $(sum(real(E0)) / length(mps))")
[ Info: VUMPS init:	obj = -5.066663384033e-01	err = 4.7069e-01
+[ Info: VUMPS   1:	obj = -1.057958942092e+00	err = 6.0355704948e-02	time = 0.01 sec
+[ Info: VUMPS   2:	obj = -1.063544358929e+00	err = 1.9468147150e-04	time = 0.00 sec
+[ Info: VUMPS   3:	obj = -1.063544409973e+00	err = 1.6771634261e-07	time = 0.00 sec
+[ Info: VUMPS   4:	obj = -1.063544409973e+00	err = 1.2887117995e-08	time = 0.00 sec
+[ Info: VUMPS   5:	obj = -1.063544409973e+00	err = 1.4480412602e-09	time = 0.00 sec
+[ Info: VUMPS   6:	obj = -1.063544409973e+00	err = 1.5675355027e-10	time = 0.00 sec
+[ Info: VUMPS   7:	obj = -1.063544409973e+00	err = 1.6868864384e-11	time = 0.00 sec
+[ Info: VUMPS   8:	obj = -1.063544409973e+00	err = 1.8342118030e-12	time = 0.00 sec
+[ Info: VUMPS conv 9:	obj = -1.063544409973e+00	err = 3.8998943929e-13	time = 0.03 sec
+<mps|H|mps> = -1.063544409973249

Additional Resources

For more detailed information on the functionality and capabilities of MPSKit, refer to the Manual section, or have a look at the Examples page.

Keep in mind that the documentation is still a work in progress, and that some features may not be fully documented yet. If you encounter any issues or have questions, please check the library's issue tracker on the GitHub repository and open a new issue.

Publications using MPSKit

Below you can find a list of publications that have made use of MPSKit. If you have used this package and wish to have your publication added to this list, please open a pull request or an issue on the GitHub repository.

  • R. Belyansky et al., “High-Energy Collision of Quarks and Hadrons in the Schwinger Model: From Tensor Networks to Circuit QED,” 2023, doi: 10.48550/ARXIV.2307.02522.
  • L. Devos, L. Vanderstraeten, and F. Verstraete, “Haldane gap in the SU(3) [3 0 0] Heisenberg chain,” Phys. Rev. B, vol. 106, no. 15, p. 155103, Oct. 2022, doi: 10.1103/PhysRevB.106.155103.
  • J. C. Halimeh, M. V. Damme, T. V. Zache, D. Banerjee, and P. Hauke, “Achieving the quantum field theory limit in far-from-equilibrium quantum link models,” Quantum, vol. 6, p. 878, Dec. 2022, doi: 10.22331/q-2022-12-19-878.
  • J. C. Halimeh, D. Trapin, M. Van Damme, and M. Heyl, “Local measures of dynamical quantum phase transitions,” Phys. Rev. B, vol. 104, no. 7, p. 075130, Aug. 2021, doi: 10.1103/PhysRevB.104.075130.
  • M. Hauru, M. Van Damme, and J. Haegeman, “Riemannian optimization of isometric tensor networks,” SciPost Physics, vol. 10, no. 2, p. 040, Feb. 2021, doi: 10.21468/SciPostPhys.10.2.040.
  • M. Van Damme, R. Vanhove, J. Haegeman, F. Verstraete, and L. Vanderstraeten, “Efficient matrix product state methods for extracting spectral information on rings and cylinders,” Phys. Rev. B, vol. 104, no. 11, p. 115142, Sep. 2021, doi: 10.1103/PhysRevB.104.115142.
  • M. Van Damme, T. V. Zache, D. Banerjee, P. Hauke, and J. C. Halimeh, “Dynamical quantum phase transitions in spin-$S$ $\text{U}(1)$ quantum link models,” Phys. Rev. B, vol. 106, no. 24, p. 245110, Dec. 2022, doi: 10.1103/PhysRevB.106.245110.
  • E. L. Weerda and M. Rizzi, “Fractional quantum Hall states with variational Projected Entangled-Pair States: a study of the bosonic Harper-Hofstadter model,” 2023, doi: 10.48550/ARXIV.2309.12811.
  • C. Yu and J.-W. Lee, “Closing of the Haldane gap in a spin-1 XXZ chain,” J. Korean Phys. Soc., vol. 79, no. 9, pp. 841–845, Nov. 2021, doi: 10.1007/s40042-021-00283-z.
  • Y. Zhang, A. Hulsch, H.-C. Zhang, W. Tang, L. Wang, and H.-H. Tu, “Universal Scaling of Klein Bottle Entropy near Conformal Critical Points,” Phys. Rev. Lett., vol. 130, no. 15, p. 151602, Apr. 2023, doi: 10.1103/PhysRevLett.130.151602.
diff --git a/dev/lib/lib/index.html b/dev/lib/lib/index.html index 52dd7d68..ea7afc07 100644 --- a/dev/lib/lib/index.html +++ b/dev/lib/lib/index.html @@ -5,41 +5,41 @@ FiniteMPS([f, eltype], N::Int, physicalspace::Union{S,CompositeSpace{S}}, maxvirtualspaces::Union{S,Vector{S}}; normalize=true, left=oneunit(S), right=oneunit(S)) where {S<:ElementarySpace} -FiniteMPS(As::Vector{<:GenericMPSTensor}; normalize=false, overwrite=false)

Construct an MPS via a specification of physical and virtual spaces, or from a list of tensors As. All cases reduce to the latter.

Arguments

  • As::Vector{<:GenericMPSTensor}: vector of site tensors

  • f::Function=rand: initializer function for tensor data

  • eltype::Type{<:Number}=ComplexF64: scalar type of tensors

  • physicalspaces::Vector{<:Union{S, CompositeSpace{S}}: list of physical spaces

  • N::Int: number of sites

  • physicalspace::Union{S,CompositeSpace{S}}: local physical space

  • virtualspaces::Vector{<:Union{S, CompositeSpace{S}}: list of virtual spaces

  • maxvirtualspace::S: maximum virtual space

Keywords

  • normalize: normalize the constructed state
  • overwrite=false: overwrite the given input tensors
  • left=oneunit(S): left-most virtual space
  • right=oneunit(S): right-most virtual space
source
MPSKit.InfiniteMPSType
InfiniteMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbtractMPS

Type that represents an infinite Matrix Product State.

Fields

  • AL – left-gauged MPS tensors
  • AR – right-gauged MPS tensors
  • AC – center-gauged MPS tensors
  • CR – gauge tensors

Notes

By convention, we have that:

  • AL[i] * CR[i] = AC[i] = CR[i-1] * AR[i]
  • AL[i]' * AL[i] = 1
  • AR[i] * AR[i]' = 1

Constructors

InfiniteMPS([f, eltype], physicalspaces::Vector{<:Union{S, CompositeSpace{S}},
+FiniteMPS(As::Vector{<:GenericMPSTensor}; normalize=false, overwrite=false)

Construct an MPS via a specification of physical and virtual spaces, or from a list of tensors As. All cases reduce to the latter.

Arguments

  • As::Vector{<:GenericMPSTensor}: vector of site tensors

  • f::Function=rand: initializer function for tensor data

  • eltype::Type{<:Number}=ComplexF64: scalar type of tensors

  • physicalspaces::Vector{<:Union{S, CompositeSpace{S}}: list of physical spaces

  • N::Int: number of sites

  • physicalspace::Union{S,CompositeSpace{S}}: local physical space

  • virtualspaces::Vector{<:Union{S, CompositeSpace{S}}: list of virtual spaces

  • maxvirtualspace::S: maximum virtual space

Keywords

  • normalize: normalize the constructed state
  • overwrite=false: overwrite the given input tensors
  • left=oneunit(S): left-most virtual space
  • right=oneunit(S): right-most virtual space
source
MPSKit.InfiniteMPSType
InfiniteMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbtractMPS

Type that represents an infinite Matrix Product State.

Fields

  • AL – left-gauged MPS tensors
  • AR – right-gauged MPS tensors
  • AC – center-gauged MPS tensors
  • CR – gauge tensors

Notes

By convention, we have that:

  • AL[i] * CR[i] = AC[i] = CR[i-1] * AR[i]
  • AL[i]' * AL[i] = 1
  • AR[i] * AR[i]' = 1

Constructors

InfiniteMPS([f, eltype], physicalspaces::Vector{<:Union{S, CompositeSpace{S}},
             virtualspaces::Vector{<:Union{S, CompositeSpace{S}};
             kwargs...) where {S<:ElementarySpace}
 InfiniteMPS(As::AbstractVector{<:GenericMPSTensor}; kwargs...)
 InfiniteMPS(ALs::AbstractVector{<:GenericMPSTensor}, C₀::MPSBondTensor;
-            kwargs...)

Construct an MPS via a specification of physical and virtual spaces, or from a list of tensors As, or a list of left-gauged tensors ALs.

Arguments

  • As::AbstractVector{<:GenericMPSTensor}: vector of site tensors

  • ALs::AbstractVector{<:GenericMPSTensor}: vector of left-gauged site tensors

  • C₀::MPSBondTensor: initial gauge tensor

  • f::Function=rand: initializer function for tensor data

  • eltype::Type{<:Number}=ComplexF64: scalar type of tensors

  • physicalspaces::AbstractVector{<:Union{S, CompositeSpace{S}}: list of physical spaces

  • virtualspaces::AbstractVector{<:Union{S, CompositeSpace{S}}: list of virtual spaces

Keywords

  • tol: gauge fixing tolerance
  • maxiter: gauge fixing maximum iterations
source
MPSKit.WindowMPSType
WindowMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbstractFiniteMPS

Type that represents a finite Matrix Product State embedded in an infinte Matrix Product State.

Fields

  • left_gs::InfiniteMPS – left infinite environment
  • window::FiniteMPS – finite window Matrix Product State
  • right_gs::InfiniteMPS – right infinite environment

Constructors

WindowMPS(left_gs::InfiniteMPS, window_state::FiniteMPS, [right_gs::InfiniteMPS])
+            kwargs...)

Construct an MPS via a specification of physical and virtual spaces, or from a list of tensors As, or a list of left-gauged tensors ALs.

Arguments

  • As::AbstractVector{<:GenericMPSTensor}: vector of site tensors

  • ALs::AbstractVector{<:GenericMPSTensor}: vector of left-gauged site tensors

  • C₀::MPSBondTensor: initial gauge tensor

  • f::Function=rand: initializer function for tensor data

  • eltype::Type{<:Number}=ComplexF64: scalar type of tensors

  • physicalspaces::AbstractVector{<:Union{S, CompositeSpace{S}}: list of physical spaces

  • virtualspaces::AbstractVector{<:Union{S, CompositeSpace{S}}: list of virtual spaces

Keywords

  • tol: gauge fixing tolerance
  • maxiter: gauge fixing maximum iterations
source
MPSKit.WindowMPSType
WindowMPS{A<:GenericMPSTensor,B<:MPSBondTensor} <: AbstractFiniteMPS

Type that represents a finite Matrix Product State embedded in an infinte Matrix Product State.

Fields

  • left_gs::InfiniteMPS – left infinite environment
  • window::FiniteMPS – finite window Matrix Product State
  • right_gs::InfiniteMPS – right infinite environment

Constructors

WindowMPS(left_gs::InfiniteMPS, window_state::FiniteMPS, [right_gs::InfiniteMPS])
 WindowMPS(left_gs::InfiniteMPS, window_tensors::AbstractVector, [right_gs::InfiniteMPS])
 WindowMPS([f, eltype], physicalspaces::Vector{<:Union{S, CompositeSpace{S}},
           virtualspaces::Vector{<:Union{S, CompositeSpace{S}}, left_gs::InfiniteMPS,
           [right_gs::InfiniteMPS])
 WindowMPS([f, eltype], physicalspaces::Vector{<:Union{S,CompositeSpace{S}}},
-          maxvirtualspace::S, left_gs::InfiniteMPS, [right_gs::InfiniteMPS])

Construct a WindowMPS via a specification of left and right infinite environment, and either a window state or a vector of tensors to construct the window. Alternatively, it is possible to supply the same arguments as for the constructor of FiniteMPS, followed by a left (and right) environment to construct the WindowMPS in one step.

Note

By default, the right environment is chosen to be equal to the left, however no copy is made. In this case, changing the left state will also affect the right state.

WindowMPS(state::InfiniteMPS, L::Int)

Construct a WindowMPS from an InfiniteMPS, by promoting a region of length L to a FiniteMPS.

source
MPSKit.MPSMultilineType
const MPSMultiline = Multiline{<:InfiniteMPS}

Type that represents multiple lines of InfiniteMPS objects.

Constructors

MPSMultiline(mpss::AbstractVector{<:InfiniteMPS})
+          maxvirtualspace::S, left_gs::InfiniteMPS, [right_gs::InfiniteMPS])

Construct a WindowMPS via a specification of left and right infinite environment, and either a window state or a vector of tensors to construct the window. Alternatively, it is possible to supply the same arguments as for the constructor of FiniteMPS, followed by a left (and right) environment to construct the WindowMPS in one step.

Note

By default, the right environment is chosen to be equal to the left, however no copy is made. In this case, changing the left state will also affect the right state.

WindowMPS(state::InfiniteMPS, L::Int)

Construct a WindowMPS from an InfiniteMPS, by promoting a region of length L to a FiniteMPS.

source
MPSKit.MPSMultilineType
const MPSMultiline = Multiline{<:InfiniteMPS}

Type that represents multiple lines of InfiniteMPS objects.

Constructors

MPSMultiline(mpss::AbstractVector{<:InfiniteMPS})
 MPSMultiline([f, eltype], physicalspaces::Matrix{<:Union{S, CompositeSpace{S}},
              virtualspaces::Matrix{<:Union{S, CompositeSpace{S}}) where
              {S<:ElementarySpace}
 MPSMultiline(As::AbstractMatrix{<:GenericMPSTensor}; kwargs...)
 MPSMultiline(ALs::AbstractMatrix{<:GenericMPSTensor}, 
-             C₀::AbstractVector{<:MPSBondTensor}; kwargs...)

See also: Multiline

source

Operators

Missing docstring.

Missing docstring for SparseMPO. Check Documenter's build log for details.

Operators

Missing docstring.

Missing docstring for SparseMPO. Check Documenter's build log for details.

MPSKit.MPOHamiltonianType
MPOHamiltonian
 
 represents a general periodic quantum hamiltonian
 
-really just a sparsempo, with some garantuees on its structure
source

Environments

MPSKit.FinEnvType
FinEnv keeps track of the environments for FiniteMPS / WindowMPS
+really just a sparsempo, with some garantuees on its structure
source

Environments

MPSKit.FinEnvType
FinEnv keeps track of the environments for FiniteMPS / WindowMPS
 It automatically checks if the queried environment is still correctly cached and if not - recalculates
 
 if above is set to nothing, above === below.
 
-opp can be a vector of nothing, in which case it'll just be the overlap
source
Missing docstring.

Missing docstring for MPSKit.IDMRGEnvs. Check Documenter's build log for details.

Generic actions

MPSKit.∂CFunction
Zero-site derivative (the C matrix to the right of pos)
source
Missing docstring.

Missing docstring for ∂∂C. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂AC. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂∂AC. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂∂AC2. Check Documenter's build log for details.

Missing docstring.

Missing docstring for c_proj. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ac_proj. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ac2_proj. Check Documenter's build log for details.

MPSKit.expectation_valueFunction
expectation_value(ψ, O, [location], [environments])

Compute the expectation value of an operator O on a state ψ. If location is given, the operator is applied at that location. If environments is given, the expectation value might be computed more efficiently by re-using previously calculated environments.

Note

For MPOHamiltonian, the expectation value is not uniquely defined, as it is unclear to what site a given term belongs. For this reason, the returned value is half the expectation value of all terms that start and end on the site.

Arguments

  • ψ::AbstractMPS : the state on which to compute the expectation value
  • O : the operator to compute the expectation value of. This can either be an AbstractMPO, a single AbstractTensorMap or an array of AbstractTensorMaps.
  • location::Union{Int,AbstractRange{Int}} : the location at which to apply the operator. Only applicable for operators that act on a subset of all sites.
  • environments::Cache : the environments to use for the calculation. If not given, they will be calculated.
source

Algorithms

MPSKit.find_groundstateFunction
find_groundstate(ψ, H, [environments]; kwargs...)
-find_groundstate(ψ, H, algorithm, environments)

Compute the groundstate for Hamiltonian H with initial guess ψ. If not specified, an optimization algorithm will be attempted based on the supplied keywords.

Arguments

  • ψ::AbstractMPS: initial guess
  • H::AbstractMPO: operator for which to find the groundstate
  • [environments]: MPS environment manager
  • algorithm: optimization algorithm

Keywords

  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: display progress information
source
MPSKit.timestepFunction
timestep(ψ₀, H, t, dt, [alg], [envs]; kwargs...)
-timestep!(ψ₀, H, t, dt, [alg], [envs]; kwargs...)

Time-step the state ψ₀ with Hamiltonian H over a given time step dt at time t, solving the Schroedinger equation: $i ∂ψ/∂t = H ψ$.

Arguments

  • ψ₀::AbstractMPS: initial state
  • H::AbstractMPO: operator that generates the time evolution (can be time-dependent).
  • t::Number: starting time of time-step
  • dt::Number: time-step magnitude
  • [alg]: algorithm to use for the time evolution. Defaults to TDVP.
  • [envs]: MPS environment manager
source
Missing docstring.

Missing docstring for dynamicaldmrg. Check Documenter's build log for details.

MPSKit.excitationsFunction
excitations(H, algorithm::QuasiparticleAnsatz, ψ::FiniteQP, [left_environments],
+opp can be a vector of nothing, in which case it'll just be the overlap
source
Missing docstring.

Missing docstring for MPSKit.IDMRGEnvs. Check Documenter's build log for details.

Generic actions

MPSKit.∂CFunction
Zero-site derivative (the C matrix to the right of pos)
source
Missing docstring.

Missing docstring for ∂∂C. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂AC. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂∂AC. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ∂∂AC2. Check Documenter's build log for details.

Missing docstring.

Missing docstring for c_proj. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ac_proj. Check Documenter's build log for details.

Missing docstring.

Missing docstring for ac2_proj. Check Documenter's build log for details.

MPSKit.expectation_valueFunction
expectation_value(ψ, O, [location], [environments])

Compute the expectation value of an operator O on a state ψ. If location is given, the operator is applied at that location. If environments is given, the expectation value might be computed more efficiently by re-using previously calculated environments.

Note

For MPOHamiltonian, the expectation value is not uniquely defined, as it is unclear to what site a given term belongs. For this reason, the returned value is half the expectation value of all terms that start and end on the site.

Arguments

  • ψ::AbstractMPS : the state on which to compute the expectation value
  • O : the operator to compute the expectation value of. This can either be an AbstractMPO, a single AbstractTensorMap or an array of AbstractTensorMaps.
  • location::Union{Int,AbstractRange{Int}} : the location at which to apply the operator. Only applicable for operators that act on a subset of all sites.
  • environments::Cache : the environments to use for the calculation. If not given, they will be calculated.
source

Algorithms

MPSKit.find_groundstateFunction
find_groundstate(ψ, H, [environments]; kwargs...)
+find_groundstate(ψ, H, algorithm, environments)

Compute the groundstate for Hamiltonian H with initial guess ψ. If not specified, an optimization algorithm will be attempted based on the supplied keywords.

Arguments

  • ψ::AbstractMPS: initial guess
  • H::AbstractMPO: operator for which to find the groundstate
  • [environments]: MPS environment manager
  • algorithm: optimization algorithm

Keywords

  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: display progress information
source
MPSKit.timestepFunction
timestep(ψ₀, H, t, dt, [alg], [envs]; kwargs...)
+timestep!(ψ₀, H, t, dt, [alg], [envs]; kwargs...)

Time-step the state ψ₀ with Hamiltonian H over a given time step dt at time t, solving the Schroedinger equation: $i ∂ψ/∂t = H ψ$.

Arguments

  • ψ₀::AbstractMPS: initial state
  • H::AbstractMPO: operator that generates the time evolution (can be time-dependent).
  • t::Number: starting time of time-step
  • dt::Number: time-step magnitude
  • [alg]: algorithm to use for the time evolution. Defaults to TDVP.
  • [envs]: MPS environment manager
source
Missing docstring.

Missing docstring for dynamicaldmrg. Check Documenter's build log for details.

MPSKit.excitationsFunction
excitations(H, algorithm::QuasiparticleAnsatz, ψ::FiniteQP, [left_environments],
             [right_environments]; num=1)
 excitations(H, algorithm::QuasiparticleAnsatz, ψ::InfiniteQP, [left_environments],
             [right_environments]; num=1, solver=Defaults.solver)
 excitations(H, algorithm::FiniteExcited, ψs::NTuple{<:Any, <:FiniteMPS};
-            num=1, init=copy(first(ψs)))

Compute the first excited states and their energy gap above a groundstate.

Arguments

  • H::AbstractMPO: operator for which to find the excitations
  • algorithm: optimization algorithm
  • ψ::QP: initial quasiparticle guess
  • ψs::NTuple{N, <:FiniteMPS}: N first excited states
  • [left_environments]: left groundstate environment
  • [right_environments]: right groundstate environment

Keywords

  • num::Int: number of excited states to compute
  • solver: algorithm for the linear solver of the quasiparticle environments
  • init: initial excited state guess
source
MPSKit.approximateFunction
approximate(ψ₀, (O, ψ), algorithm, [environments]; kwargs...)
-approximate!(ψ₀, (O, ψ), algorithm, [environments]; kwargs...)

Compute an approximation to the application of an operator O to the state ψ in the form of an MPS ψ₀.

Arguments

  • ψ₀::AbstractMPS: initial guess of the approximated state
  • (O::AbstractMPO, ψ::AbstractMPS): operator O and state ψ to be approximated
  • algorithm: approximation algorithm. See below for a list of available algorithms.
  • [environments]: MPS environment manager

Keywords

  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: display progress information

Algorithms

  • DMRG: Alternating least square method for maximizing the fidelity with a single-site scheme.

  • DMRG2: Alternating least square method for maximizing the fidelity with a two-site scheme.

  • IDMRG1: Variant of DMRG for maximizing fidelity density in the thermodynamic limit.

  • IDMRG2: Variant of DMRG2 for maximizing fidelity density in the thermodynamic limit.

  • VOMPS: Tangent space method for truncating uniform MPS.

source

Groundstate algorithms

MPSKit.VUMPSType
VUMPS{F} <: Algorithm

Variational optimization algorithm for uniform matrix product states, as introduced in https://arxiv.org/abs/1701.07035.

Fields

  • tol::Float64: tolerance for convergence criterium

  • maxiter::Int: maximum amount of iterations

  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, ψ, H, envs) -> ψ, envs

  • verbosity::Int: display progress information

  • alg_gauge=Defaults.alg_gauge(): algorithm for gauging

  • alg_eigsolve=Defaults.alg_eigsolve(): algorithm for eigensolvers

  • alg_environments=Defaults.alg_environments(): algorithm for updating environments

source
MPSKit.IDMRG1Type
IDMRG1{A} <: Algorithm

Single site infinite DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • tol_gauge::Float64: tolerance for gauging algorithm
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbosity::Int: display progress information
source
MPSKit.IDMRG2Type
IDMRG2{A} <: Algorithm

2-site infinite DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • tol_gauge::Float64: tolerance for gauging algorithm
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbosity::Int: display progress information
  • trscheme::TruncationScheme: truncation algorithm for [tsvd]TensorKit.tsvd
source
MPSKit.DMRGType
DMRG{A,F} <: Algorithm

Single site DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbosity::Int: display progress information
  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, ψ, H, envs) -> ψ, envs
source
MPSKit.DMRG2Type
DMRG2{A,F} <: Algorithm

2-site DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbosity::Int: display progress information
  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, ψ, H, envs) -> ψ, envs
  • trscheme: truncation algorithm for [tsvd]TensorKit.tsvd
source
MPSKit.GradientGrassmannType
GradientGrassmann <: Algorithm

Variational gradient-based optimization algorithm that keeps the MPS in left-canonical form, as points on a Grassmann manifold. The optimization is then a Riemannian gradient descent with a preconditioner to induce the metric from the Hilbert space inner product.

Fields

  • method::OptimKit.OptimizationAlgorithm: algorithm to perform the gradient search
  • finalize!::Function: user-supplied function which is applied after each iteration, with signature finalize!(x::GrassmannMPS.ManifoldPoint, f, g, numiter) -> x, f, g

Constructors

GradientGrassmann(; kwargs...)

Keywords

  • method=ConjugateGradient: instance of optimization algorithm, or type of optimization algorithm to construct
  • finalize!: finalizer algorithm
  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: level of information display
source

Time evolution algorithms

MPSKit.TDVPType
TDVP{A} <: Algorithm

Single site TDVP algorithm for time evolution.

Fields

  • integrator::A: integration algorithm (defaults to Lanczos exponentiation)
  • tolgauge::Float64: tolerance for gauging algorithm
  • gaugemaxiter::Int: maximum amount of gauging iterations
  • finalize::F: user-supplied function which is applied after each timestep, with signature finalize(t, Ψ, H, envs) -> Ψ, envs
source
MPSKit.TDVP2Type
TDVP2{A} <: Algorithm

2-site TDVP algorithm for time evolution.

Fields

  • integrator::A: integrator algorithm (defaults to Lanczos exponentiation)
  • tolgauge::Float64: tolerance for gauging algorithm
  • gaugemaxiter::Int: maximum amount of gauging iterations
  • trscheme: truncation algorithm for [tsvd]TensorKit.tsvd
  • finalize::F: user-supplied function which is applied after each timestep, with signature finalize(t, Ψ, H, envs) -> Ψ, envs
source
Missing docstring.

Missing docstring for TaylorCluster. Check Documenter's build log for details.

Missing docstring.

Missing docstring for WII. Check Documenter's build log for details.

Leading boundary algorithms

Missing docstring.

Missing docstring for VUMPS. Check Documenter's build log for details.

MPSKit.VOMPSType
VOMPS{F} <: Algorithm

Power method algorithm for infinite MPS. SciPost:4.1.004

Fields

  • tol::Float64: tolerance for convergence criterium

  • maxiter::Int: maximum amount of iterations

  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, ψ, toapprox, envs) -> ψ, envs

  • verbosity::Int: display progress information

  • alg_gauge=Defaults.alg_gauge(): algorithm for gauging

  • alg_environments=Defaults.alg_environments(): algorithm for updating environments

source
Missing docstring.

Missing docstring for GradientGrassmann. Check Documenter's build log for details.

Bond change algorithms

MPSKit.OptimalExpandType
struct OptimalExpand <: Algorithm end

An algorithm that expands the given mps using the algorithm given in the VUMPS paper, by selecting the dominant contributions of a two-site updated MPS tensor, orthogonal to the original ψ.

Fields

  • trscheme::TruncationScheme = truncdim(1) : The truncation scheme to use.
source
MPSKit.RandExpandType
struct RandExpand <: Algorithm end

An algorithm that expands the bond dimension by adding random unitary vectors that are orthogonal to the existing state. This is achieved by performing a truncated SVD on a random two-site MPS tensor, which is made orthogonal to the existing state.

Fields

  • trscheme::TruncationScheme = truncdim(1) : The truncation scheme to use.
source
MPSKit.VUMPSSvdCutType
struct VUMPSSvdCut <: Algorithm end

An algorithm that uses an IDMRG2 step to change the bond dimension of a state.

Fields

  • tol_gauge::Real = Defaults.tolgauge : The tolerance for the gauge.
  • tol::Real = Defaults.tol : The tolerance for the Galerkin truncation.
  • tol_eigenval::Real = Defaults.tol : The tolerance for the eigenvalue solver.
  • trscheme::TruncationScheme = notrunc() : The truncation scheme to use.
source
MPSKit.SvdCutType
struct SvdCut <: Algorithm end

An algorithm that uses truncated SVD to change the bond dimension of a ψ.

Fields

  • trscheme::TruncationScheme = notrunc() : The truncation scheme to use.
source

[Excitations]

MPSKit.QuasiparticleAnsatzType
QuasiparticleAnsatz <: Algorithm

Optimization algorithm for quasiparticle excitations on top of MPS groundstates, as introduced in this paper.

Fields

  • alg::A = Defaults.eigsolver: algorithm to use for the eigenvalue problem

Constructors

QuasiparticleAnsatz()
+            num=1, init=copy(first(ψs)))

Compute the first excited states and their energy gap above a groundstate.

Arguments

  • H::AbstractMPO: operator for which to find the excitations
  • algorithm: optimization algorithm
  • ψ::QP: initial quasiparticle guess
  • ψs::NTuple{N, <:FiniteMPS}: N first excited states
  • [left_environments]: left groundstate environment
  • [right_environments]: right groundstate environment

Keywords

  • num::Int: number of excited states to compute
  • solver: algorithm for the linear solver of the quasiparticle environments
  • init: initial excited state guess
source
MPSKit.approximateFunction
approximate(ψ₀, (O, ψ), algorithm, [environments]; kwargs...)
+approximate!(ψ₀, (O, ψ), algorithm, [environments]; kwargs...)

Compute an approximation to the application of an operator O to the state ψ in the form of an MPS ψ₀.

Arguments

  • ψ₀::AbstractMPS: initial guess of the approximated state
  • (O::AbstractMPO, ψ::AbstractMPS): operator O and state ψ to be approximated
  • algorithm: approximation algorithm. See below for a list of available algorithms.
  • [environments]: MPS environment manager

Keywords

  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: display progress information

Algorithms

  • DMRG: Alternating least square method for maximizing the fidelity with a single-site scheme.

  • DMRG2: Alternating least square method for maximizing the fidelity with a two-site scheme.

  • IDMRG1: Variant of DMRG for maximizing fidelity density in the thermodynamic limit.

  • IDMRG2: Variant of DMRG2 for maximizing fidelity density in the thermodynamic limit.

  • VOMPS: Tangent space method for truncating uniform MPS.

source

Groundstate algorithms

MPSKit.VUMPSType
VUMPS{F} <: Algorithm

Variational optimization algorithm for uniform matrix product states, as introduced in https://arxiv.org/abs/1701.07035.

Fields

  • tol::Float64: tolerance for convergence criterium

  • maxiter::Int: maximum amount of iterations

  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, ψ, H, envs) -> ψ, envs

  • verbosity::Int: display progress information

  • alg_gauge=Defaults.alg_gauge(): algorithm for gauging

  • alg_eigsolve=Defaults.alg_eigsolve(): algorithm for eigensolvers

  • alg_environments=Defaults.alg_environments(): algorithm for updating environments

source
MPSKit.IDMRG1Type
IDMRG1{A} <: Algorithm

Single site infinite DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • tol_gauge::Float64: tolerance for gauging algorithm
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbosity::Int: display progress information
source
MPSKit.IDMRG2Type
IDMRG2{A} <: Algorithm

2-site infinite DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • tol_gauge::Float64: tolerance for gauging algorithm
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbosity::Int: display progress information
  • trscheme::TruncationScheme: truncation algorithm for [tsvd]TensorKit.tsvd
source
MPSKit.DMRGType
DMRG{A,F} <: Algorithm

Single site DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbosity::Int: display progress information
  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, ψ, H, envs) -> ψ, envs
source
MPSKit.DMRG2Type
DMRG2{A,F} <: Algorithm

2-site DMRG algorithm for finding groundstates.

Fields

  • tol::Float64: tolerance for convergence criterium
  • eigalg::A: eigensolver algorithm
  • maxiter::Int: maximum number of outer iterations
  • verbosity::Int: display progress information
  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, ψ, H, envs) -> ψ, envs
  • trscheme: truncation algorithm for [tsvd]TensorKit.tsvd
source
MPSKit.GradientGrassmannType
GradientGrassmann <: Algorithm

Variational gradient-based optimization algorithm that keeps the MPS in left-canonical form, as points on a Grassmann manifold. The optimization is then a Riemannian gradient descent with a preconditioner to induce the metric from the Hilbert space inner product.

Fields

  • method::OptimKit.OptimizationAlgorithm: algorithm to perform the gradient search
  • finalize!::Function: user-supplied function which is applied after each iteration, with signature finalize!(x::GrassmannMPS.ManifoldPoint, f, g, numiter) -> x, f, g

Constructors

GradientGrassmann(; kwargs...)

Keywords

  • method=ConjugateGradient: instance of optimization algorithm, or type of optimization algorithm to construct
  • finalize!: finalizer algorithm
  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: level of information display
source

Time evolution algorithms

MPSKit.TDVPType
TDVP{A} <: Algorithm

Single site TDVP algorithm for time evolution.

Fields

  • integrator::A: integration algorithm (defaults to Lanczos exponentiation)
  • tolgauge::Float64: tolerance for gauging algorithm
  • gaugemaxiter::Int: maximum amount of gauging iterations
  • finalize::F: user-supplied function which is applied after each timestep, with signature finalize(t, Ψ, H, envs) -> Ψ, envs
source
MPSKit.TDVP2Type
TDVP2{A} <: Algorithm

2-site TDVP algorithm for time evolution.

Fields

  • integrator::A: integrator algorithm (defaults to Lanczos exponentiation)
  • tolgauge::Float64: tolerance for gauging algorithm
  • gaugemaxiter::Int: maximum amount of gauging iterations
  • trscheme: truncation algorithm for [tsvd]TensorKit.tsvd
  • finalize::F: user-supplied function which is applied after each timestep, with signature finalize(t, Ψ, H, envs) -> Ψ, envs
source
Missing docstring.

Missing docstring for TaylorCluster. Check Documenter's build log for details.

Missing docstring.

Missing docstring for WII. Check Documenter's build log for details.

Leading boundary algorithms

Missing docstring.

Missing docstring for VUMPS. Check Documenter's build log for details.

MPSKit.VOMPSType
VOMPS{F} <: Algorithm

Power method algorithm for infinite MPS. SciPost:4.1.004

Fields

  • tol::Float64: tolerance for convergence criterium

  • maxiter::Int: maximum amount of iterations

  • finalize::F: user-supplied function which is applied after each iteration, with signature finalize(iter, ψ, toapprox, envs) -> ψ, envs

  • verbosity::Int: display progress information

  • alg_gauge=Defaults.alg_gauge(): algorithm for gauging

  • alg_environments=Defaults.alg_environments(): algorithm for updating environments

source
Missing docstring.

Missing docstring for GradientGrassmann. Check Documenter's build log for details.

Bond change algorithms

MPSKit.OptimalExpandType
struct OptimalExpand <: Algorithm end

An algorithm that expands the given mps using the algorithm given in the VUMPS paper, by selecting the dominant contributions of a two-site updated MPS tensor, orthogonal to the original ψ.

Fields

  • trscheme::TruncationScheme = truncdim(1) : The truncation scheme to use.
source
MPSKit.RandExpandType
struct RandExpand <: Algorithm end

An algorithm that expands the bond dimension by adding random unitary vectors that are orthogonal to the existing state. This is achieved by performing a truncated SVD on a random two-site MPS tensor, which is made orthogonal to the existing state.

Fields

  • trscheme::TruncationScheme = truncdim(1) : The truncation scheme to use.
source
MPSKit.VUMPSSvdCutType
struct VUMPSSvdCut <: Algorithm end

An algorithm that uses an IDMRG2 step to change the bond dimension of a state.

Fields

  • tol_gauge::Real = Defaults.tolgauge : The tolerance for the gauge.
  • tol::Real = Defaults.tol : The tolerance for the Galerkin truncation.
  • tol_eigenval::Real = Defaults.tol : The tolerance for the eigenvalue solver.
  • trscheme::TruncationScheme = notrunc() : The truncation scheme to use.
source
MPSKit.SvdCutType
struct SvdCut <: Algorithm end

An algorithm that uses truncated SVD to change the bond dimension of a ψ.

Fields

  • trscheme::TruncationScheme = notrunc() : The truncation scheme to use.
source

[Excitations]

MPSKit.QuasiparticleAnsatzType
QuasiparticleAnsatz <: Algorithm

Optimization algorithm for quasiparticle excitations on top of MPS groundstates, as introduced in this paper.

Fields

  • alg::A = Defaults.eigsolver: algorithm to use for the eigenvalue problem

Constructors

QuasiparticleAnsatz()
 QuasiparticleAnsatz(; kwargs...)
-QuasiparticleAnsatz(alg)

Create a QuasiparticleAnsatz algorithm with the given algorithm, or by passing the keyword arguments to Arnoldi.

source
MPSKit.FiniteExcitedType
FiniteExcited{A} <: Algorithm

Variational optimization algorithm for excitations of finite Matrix Product States by minimizing the energy of $H - λᵢ |ψᵢ><ψᵢ|$.

Fields

  • gsalg::A: optimization algorithm.
  • weight::Float64: energy penalty for previous states.
source
+QuasiparticleAnsatz(alg)

Create a QuasiparticleAnsatz algorithm with the given algorithm, or by passing the keyword arguments to Arnoldi.

source
MPSKit.FiniteExcitedType
FiniteExcited{A} <: Algorithm

Variational optimization algorithm for excitations of finite Matrix Product States by minimizing the energy of $H - λᵢ |ψᵢ><ψᵢ|$.

Fields

  • gsalg::A: optimization algorithm.
  • weight::Float64: energy penalty for previous states.
source
diff --git a/dev/man/algorithms/index.html b/dev/man/algorithms/index.html index c7ce2cf4..3dacf01b 100644 --- a/dev/man/algorithms/index.html +++ b/dev/man/algorithms/index.html @@ -57,7 +57,7 @@ ts = FiniteMPS(10,ℂ^2,ℂ^12); (ts,envs,_) = find_groundstate(ts,th,DMRG(verbosity=0)); (energies,Bs) = excitations(th,FiniteExcited(),ts,envs);

changebonds

Many of the previously mentioned algorithms do not possess a way to dynamically change to bond dimension. This is often a problem, as the optimal bond dimension is often not a priori known, or needs to increase because of entanglement growth throughout the course of a simulation. changebonds exposes a way to change the bond dimension of a given state, without altering the state itself.

There are several different algorithms implemented, each having their own advantages and disadvantages:

  • SvdCut: The simplest method for changing the bonddimension is found by simply locally truncating the state using an SVD decomposition. This yields a (locally) optimal truncation, but clearly cannot be used to increase the bond dimension. Note that a globally optimal truncation can be obtained by using the SvdCut algorithm in combination with approximate. The state will remain largely unchanged.

  • OptimalExpand: This algorithm is based on the idea of expanding the bond dimension by investigating the two-site derivative, and adding the most important blocks which are orthogonal to the current state. From the point of view of a local two-site update, this procedure is optimal, but it requires to evaluate a two-site derivative, which can be costly when the physical space is large. The state will remain unchanged, but a one-site scheme will now be able to push the optimization further.

  • RandExpand: This algorithm similarly adds blocks orthogonal to the current state, but does not attempt to select the most important ones, and rather just selects them at random. The advantage here is that this is much cheaper than the optimal expand, and if the bond dimension is grown slow enough, this still obtains a very good expansion scheme. Again, the state will remain unchanged, and a one-site scheme will be able to push the optimization further.

  • VUMPSSvdCut: This algorithm is based on the VUMPS algorithm, and consists of performing a two-site update, and then truncating the state back down. Because of the two-site update, this can again become expensive, but the algorithm has the option of both expanding as well as truncating the bond dimension. Note that this will change the state itself, as it consists of an update step.

leading boundary

For statmech partition functions we want to find the approximate leading boundary MPS. Again this can be done with VUMPS:

th = nonsym_ising_mpo()
+changebonds(ψ::AbstractMPS, alg) -> ψ′

Change the bond dimension of ψ using the algorithm alg, and return the new ψ and the new envs.

See also: SvdCut, RandExpand, VUMPSSvdCut, OptimalExpand

source

There are several different algorithms implemented, each having their own advantages and disadvantages:

  • SvdCut: The simplest method for changing the bonddimension is found by simply locally truncating the state using an SVD decomposition. This yields a (locally) optimal truncation, but clearly cannot be used to increase the bond dimension. Note that a globally optimal truncation can be obtained by using the SvdCut algorithm in combination with approximate. The state will remain largely unchanged.

  • OptimalExpand: This algorithm is based on the idea of expanding the bond dimension by investigating the two-site derivative, and adding the most important blocks which are orthogonal to the current state. From the point of view of a local two-site update, this procedure is optimal, but it requires to evaluate a two-site derivative, which can be costly when the physical space is large. The state will remain unchanged, but a one-site scheme will now be able to push the optimization further.

  • RandExpand: This algorithm similarly adds blocks orthogonal to the current state, but does not attempt to select the most important ones, and rather just selects them at random. The advantage here is that this is much cheaper than the optimal expand, and if the bond dimension is grown slow enough, this still obtains a very good expansion scheme. Again, the state will remain unchanged, and a one-site scheme will be able to push the optimization further.

  • VUMPSSvdCut: This algorithm is based on the VUMPS algorithm, and consists of performing a two-site update, and then truncating the state back down. Because of the two-site update, this can again become expensive, but the algorithm has the option of both expanding as well as truncating the bond dimension. Note that this will change the state itself, as it consists of an update step.

leading boundary

For statmech partition functions we want to find the approximate leading boundary MPS. Again this can be done with VUMPS:

th = nonsym_ising_mpo()
 ts = InfiniteMPS([ℂ^2],[ℂ^20]);
 (ts,envs,_) = leading_boundary(ts,th,VUMPS(maxiter=400,verbosity=false));

if the mpo satisfies certain properties (positive and hermitian), it may also be possible to use GradientGrassmann.

approximate

Often, it is useful to approximate a given MPS by another, typically by one of a different bond dimension. This is achieved by approximating an application of an MPO to the initial state, by a new state.

MPSKit.approximateFunction
approximate(ψ₀, (O, ψ), algorithm, [environments]; kwargs...)
-approximate!(ψ₀, (O, ψ), algorithm, [environments]; kwargs...)

Compute an approximation to the application of an operator O to the state ψ in the form of an MPS ψ₀.

Arguments

  • ψ₀::AbstractMPS: initial guess of the approximated state
  • (O::AbstractMPO, ψ::AbstractMPS): operator O and state ψ to be approximated
  • algorithm: approximation algorithm. See below for a list of available algorithms.
  • [environments]: MPS environment manager

Keywords

  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: display progress information

Algorithms

  • DMRG: Alternating least square method for maximizing the fidelity with a single-site scheme.

  • DMRG2: Alternating least square method for maximizing the fidelity with a two-site scheme.

  • IDMRG1: Variant of DMRG for maximizing fidelity density in the thermodynamic limit.

  • IDMRG2: Variant of DMRG2 for maximizing fidelity density in the thermodynamic limit.

  • VOMPS: Tangent space method for truncating uniform MPS.

source

Varia

What follows is a medley of lesser known (or used) algorithms and don't entirely fit under one of the above categories.

Dynamical DMRG

Dynamical DMRG has been described in other papers and is a way to find the propagator. The basic idea is that to calculate $G(z) = < V | (H-z)^{-1} | V >$ , one can variationally find $(H-z) |W > = | V >$ and then the propagator simply equals $G(z) = < V | W >$.

fidelity susceptibility

The fidelity susceptibility measures how much the groundstate changes when tuning a parameter in your hamiltonian. Divergences occur at phase transitions, making it a valuable measure when no order parameter is known.

fidelity_susceptibility(groundstate,H_0,perturbing_Hams::AbstractVector)

periodic boundary conditions

You can impose periodic boundary conditions on the hamiltonian itself, while still using a normal OBC finite matrix product states. This is straightforward to implement but competitive with more advanced PBC MPS algorithms.

exact diagonalization

As a side effect, our code support exact diagonalization. The idea is to construct a finite matrix product state with maximal bond dimension, and then optimize the middle site. Because we never truncated the bond dimension, this single site effectively parametrizes the entire hilbert space.

exact_diagonalization(periodic_boundary_conditions(su2_xxx_ham(spin=1),10),which=:SR) # find the groundstate on 10 sites
+approximate!(ψ₀, (O, ψ), algorithm, [environments]; kwargs...)

Compute an approximation to the application of an operator O to the state ψ in the form of an MPS ψ₀.

Arguments

  • ψ₀::AbstractMPS: initial guess of the approximated state
  • (O::AbstractMPO, ψ::AbstractMPS): operator O and state ψ to be approximated
  • algorithm: approximation algorithm. See below for a list of available algorithms.
  • [environments]: MPS environment manager

Keywords

  • tol::Float64: tolerance for convergence criterium
  • maxiter::Int: maximum amount of iterations
  • verbosity::Int: display progress information

Algorithms

  • DMRG: Alternating least square method for maximizing the fidelity with a single-site scheme.

  • DMRG2: Alternating least square method for maximizing the fidelity with a two-site scheme.

  • IDMRG1: Variant of DMRG for maximizing fidelity density in the thermodynamic limit.

  • IDMRG2: Variant of DMRG2 for maximizing fidelity density in the thermodynamic limit.

  • VOMPS: Tangent space method for truncating uniform MPS.

source

Varia

What follows is a medley of lesser known (or used) algorithms and don't entirely fit under one of the above categories.

Dynamical DMRG

Dynamical DMRG has been described in other papers and is a way to find the propagator. The basic idea is that to calculate $G(z) = < V | (H-z)^{-1} | V >$ , one can variationally find $(H-z) |W > = | V >$ and then the propagator simply equals $G(z) = < V | W >$.

fidelity susceptibility

The fidelity susceptibility measures how much the groundstate changes when tuning a parameter in your hamiltonian. Divergences occur at phase transitions, making it a valuable measure when no order parameter is known.

fidelity_susceptibility(groundstate,H_0,perturbing_Hams::AbstractVector)

periodic boundary conditions

You can impose periodic boundary conditions on the hamiltonian itself, while still using a normal OBC finite matrix product states. This is straightforward to implement but competitive with more advanced PBC MPS algorithms.

exact diagonalization

As a side effect, our code support exact diagonalization. The idea is to construct a finite matrix product state with maximal bond dimension, and then optimize the middle site. Because we never truncated the bond dimension, this single site effectively parametrizes the entire hilbert space.

exact_diagonalization(periodic_boundary_conditions(su2_xxx_ham(spin=1),10),which=:SR) # find the groundstate on 10 sites
diff --git a/dev/man/environments/index.html b/dev/man/environments/index.html index 04f040df..d141c405 100644 --- a/dev/man/environments/index.html +++ b/dev/man/environments/index.html @@ -5,4 +5,4 @@ cache = environments(state,operator)

There are also some notable differences. Infinite environments typically require solving linear problems or eigenvalue problems iteratively with finite precision. To find out what precision we used we can type:

(cache.tol,cache.maxiter)

To recalculate with a different precision :

cache.tol=1e-8;
 recalculate!(cache,state)

Unlike their finite counterparts, recalculating is not done automatically. To get the environment for a different state one has to recalculate explicitly!

different_state = InfiniteMPS([ℂ^2],[ℂ^10]);
 recalculate!(cache,different_state)
-leftenv(cache,3,different_state)
+leftenv(cache,3,different_state) diff --git a/dev/man/intro/index.html b/dev/man/intro/index.html index 287e79dd..e5be66fc 100644 --- a/dev/man/intro/index.html +++ b/dev/man/intro/index.html @@ -19,14 +19,14 @@ t3 = TensorMap(rand, Float64, V2 ⊗ V2, V2)
TensorMap((Rep[ℤ₂](0=>1, 1=>1) ⊗ Rep[ℤ₂](0=>1, 1=>1)) ← Rep[ℤ₂](0=>1, 1=>1)):
 * Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](0),):
 [:, :, 1] =
- 0.4126203128539905
+ 0.4171626008721582
 * Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](0),):
 [:, :, 1] =
- 0.5194808684069216
+ 0.32625032798772036
 * Data for sector (Irrep[ℤ₂](1), Irrep[ℤ₂](0)) ← (Irrep[ℤ₂](1),):
 [:, :, 1] =
- 0.6665597484491592
+ 0.47366081307672836
 * Data for sector (Irrep[ℤ₂](0), Irrep[ℤ₂](1)) ← (Irrep[ℤ₂](1),):
 [:, :, 1] =
- 0.586895875559263
-

For more information, check out the TensorKit documentation!

Conventions

The general definition of an MPS tensor is as follows:

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 example for the definition of boundary tensors in PEPS code, which have two physical legs.

Similarly, the definition of a bond tensor, appearing in between two MPS tensors, is as follows:

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

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 the algorithms planar. In particular, this is relevant for dealing with fermionic systems, where additional crossings would lead to sign problems.

+ 0.9844343576147102 +

For more information, check out the TensorKit documentation!

Conventions

The general definition of an MPS tensor is as follows:

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 example for the definition of boundary tensors in PEPS code, which have two physical legs.

Similarly, the definition of a bond tensor, appearing in between two MPS tensors, is as follows:

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

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 the algorithms planar. In particular, this is relevant for dealing with fermionic systems, where additional crossings would lead to sign problems.

diff --git a/dev/man/operators/index.html b/dev/man/operators/index.html index 6d32d48d..ff81f177 100644 --- a/dev/man/operators/index.html +++ b/dev/man/operators/index.html @@ -1,5 +1,5 @@ -Operators · MPSKit.jl

Operators

DenseMPO

This operator is used for statistical physics problems. It is simply a periodic array of mpo tensors.

Can be created using

DenseMPO(t::AbstractArray{T,1}) where T<:MPOTensor

SparseMPO

SparseMPO is similar to a DenseMPO, in that it again represents an mpo tensor, periodically repeated. However this type keeps track of all internal zero blocks, allowing for a more efficient representation of certain operators (such as time evolution operators and quantum hamiltonians). You can convert a sparse mpo to a densempo, but the converse does not hold.

Indexing a SparseMPO returns a SparseMPOSlice object, which has 3 fields

MPSKit.SparseMPOSliceType
SparseMPOSlice{S,T,E} <: AbstractArray{T,2}

A view of a sparse MPO at a single position.

Fields

  • Os::AbstractMatrix{Union{T,E}}: matrix of operators.
  • domspaces::AbstractVector{S}: list of left virtual spaces.
  • imspaces::AbstractVector{S}: list of right virtual spaces.
  • pspace::S: physical space.
source

When indexing a SparseMPOSlice at index [j, k] (or equivalently SparseMPO[i][j, k]), the code looks up the corresponding field in Os[j, k]. Either that element is a tensormap, in which case it gets returned. If it equals zero(E), then we return a tensormap

domspaces[j] * pspace ← pspace * imspaces[k]

with norm zero. If the element is a nonzero number, then implicitly we have the identity operator there (multiplied by that element).

The idea here is that you don't have to worry about the underlying structure, you can just index into a sparsempo as if it is a vector of matrices. Behind the scenes we then optimize certain contractions by using the sparsity structure.

SparseMPO are always assumed to be periodic in the first index (position). In this way, we can both represent periodic infinite mpos and place dependent finite mpos.

MPOHamiltonian

We represent all quantum hamiltonians in their MPO form. This consists of an upper triangular (sparse) matrix of regular MPO tensors per site, resulting in an array with 3 dimensions. Thus, an MPOHamiltonian is just a wrapper around SparseMPO, but with some guarantees about its structure. As an example, the following bit of code constructs the Ising hamiltonian.

T = ComplexF64
+Operators · MPSKit.jl

Operators

DenseMPO

This operator is used for statistical physics problems. It is simply a periodic array of mpo tensors.

Can be created using

DenseMPO(t::AbstractArray{T,1}) where T<:MPOTensor

SparseMPO

SparseMPO is similar to a DenseMPO, in that it again represents an mpo tensor, periodically repeated. However this type keeps track of all internal zero blocks, allowing for a more efficient representation of certain operators (such as time evolution operators and quantum hamiltonians). You can convert a sparse mpo to a densempo, but the converse does not hold.

Indexing a SparseMPO returns a SparseMPOSlice object, which has 3 fields

MPSKit.SparseMPOSliceType
SparseMPOSlice{S,T,E} <: AbstractArray{T,2}

A view of a sparse MPO at a single position.

Fields

  • Os::AbstractMatrix{Union{T,E}}: matrix of operators.
  • domspaces::AbstractVector{S}: list of left virtual spaces.
  • imspaces::AbstractVector{S}: list of right virtual spaces.
  • pspace::S: physical space.
source

When indexing a SparseMPOSlice at index [j, k] (or equivalently SparseMPO[i][j, k]), the code looks up the corresponding field in Os[j, k]. Either that element is a tensormap, in which case it gets returned. If it equals zero(E), then we return a tensormap

domspaces[j] * pspace ← pspace * imspaces[k]

with norm zero. If the element is a nonzero number, then implicitly we have the identity operator there (multiplied by that element).

The idea here is that you don't have to worry about the underlying structure, you can just index into a sparsempo as if it is a vector of matrices. Behind the scenes we then optimize certain contractions by using the sparsity structure.

SparseMPO are always assumed to be periodic in the first index (position). In this way, we can both represent periodic infinite mpos and place dependent finite mpos.

MPOHamiltonian

We represent all quantum hamiltonians in their MPO form. This consists of an upper triangular (sparse) matrix of regular MPO tensors per site, resulting in an array with 3 dimensions. Thus, an MPOHamiltonian is just a wrapper around SparseMPO, but with some guarantees about its structure. As an example, the following bit of code constructs the Ising hamiltonian.

T = ComplexF64
 X = TensorMap(T[0 1; 1 0], ℂ^2 ← ℂ^2)
 Z = TensorMap(T[1 0; 0 -1], ℂ^2 ← ℂ^2)
 
@@ -36,4 +36,4 @@
 
 [:, :, 2, 1] =
  1.0 + 0.0im  0.0 + 0.0im
-
+
diff --git a/dev/man/parallelism/index.html b/dev/man/parallelism/index.html index 452e4c96..d731f7e3 100644 --- a/dev/man/parallelism/index.html +++ b/dev/man/parallelism/index.html @@ -37,4 +37,4 @@ ┌ Warning: blasthreads_per_jlthread > cputhreads_per_jlthread. You should decrease the number of MKL threads, i.e. BLAS.set_num_threads(4). └ @ ThreadPinning ~/.julia/packages/ThreadPinning/qV2Cd/src/threadinfo.jl:256 -[ Info: jlthreads < cputhreads. Perhaps increase number of Julia threads to 16?

MPSKit multithreading

Within MPSKit, when Julia is started with multiple threads, by default the Threads.@spawn machinery will be used to parallelize the code as much as possible. In particular, there are three main places where this is happening, which can be disabled separately through a preference-based system.

  1. During the process of some algorithms (e.g. VUMPS), local updates can take place at each site in parallel. This can be controlled by the parallelize_sites preference.

  2. During the calculation of the environments, when the MPO is block-sparse, it is possible to parallelize over these blocks. This can be enabled or disabled by the parallelize_transfers preference. (Note that left- and right environments will always be computed in parallel)

  3. During the calculation of the derivatives, when the MPO is block-sparse, it is possible to parallelize over these blocks. This can be enabled or disabled by the parallelize_derivatives preference.

For convenience, these preferences can be set via MPSKit.Defaults.set_parallelization, which takes as input pairs of preferences and booleans. For example, to disable all parallelization, one can call

Defaults.set_parallelization("sites" => false, "transfers" => false, "derivatives" => false)
Warning

These settings are statically set at compile-time, and for changes to take effect the Julia session must be restarted.

TensorKit multithreading

Finally, when dealing with tensors that have some internal symmetry, it is also possible to parallelize over the symmetry sectors. This is handled by TensorKit, and more information can be found in its documentation (Soon TM).

Memory management

Because of the way julia threads work, it is possible that the total memory usage of your program becomes rather high. This seems to be because of the fact that MPSKit spawns several tasks (in a nested way), which each allocate and deallocate quite a bit of memory in a tight loop. This seems to lead to a situation where the garbage collector is not able to keep up, and can even fail to clear the garbage before an OutOfMemory error occurs. In this case, often the best thing to do is disable the multithreading of MPSKit, specifically for the derivatives, as this seems to be the most memory intensive part. This is something that is under investigation, and hopefully will be fixed in the future.

+[ Info: jlthreads < cputhreads. Perhaps increase number of Julia threads to 16?

MPSKit multithreading

Within MPSKit, when Julia is started with multiple threads, by default the Threads.@spawn machinery will be used to parallelize the code as much as possible. In particular, there are three main places where this is happening, which can be disabled separately through a preference-based system.

  1. During the process of some algorithms (e.g. VUMPS), local updates can take place at each site in parallel. This can be controlled by the parallelize_sites preference.

  2. During the calculation of the environments, when the MPO is block-sparse, it is possible to parallelize over these blocks. This can be enabled or disabled by the parallelize_transfers preference. (Note that left- and right environments will always be computed in parallel)

  3. During the calculation of the derivatives, when the MPO is block-sparse, it is possible to parallelize over these blocks. This can be enabled or disabled by the parallelize_derivatives preference.

For convenience, these preferences can be set via MPSKit.Defaults.set_parallelization, which takes as input pairs of preferences and booleans. For example, to disable all parallelization, one can call

Defaults.set_parallelization("sites" => false, "transfers" => false, "derivatives" => false)
Warning

These settings are statically set at compile-time, and for changes to take effect the Julia session must be restarted.

TensorKit multithreading

Finally, when dealing with tensors that have some internal symmetry, it is also possible to parallelize over the symmetry sectors. This is handled by TensorKit, and more information can be found in its documentation (Soon TM).

Memory management

Because of the way julia threads work, it is possible that the total memory usage of your program becomes rather high. This seems to be because of the fact that MPSKit spawns several tasks (in a nested way), which each allocate and deallocate quite a bit of memory in a tight loop. This seems to lead to a situation where the garbage collector is not able to keep up, and can even fail to clear the garbage before an OutOfMemory error occurs. In this case, often the best thing to do is disable the multithreading of MPSKit, specifically for the derivatives, as this seems to be the most memory intensive part. This is something that is under investigation, and hopefully will be fixed in the future.

diff --git a/dev/man/states/index.html b/dev/man/states/index.html index fd1c2d2f..e9afb430 100644 --- a/dev/man/states/index.html +++ b/dev/man/states/index.html @@ -25,4 +25,4 @@ state.AR[row,collumn] state.CR[row,collumn]

Behind the scenes, we have a type called Multiline, defined as:

struct Multiline{T}
     data::PeriodicArray{T,1}
-end

MPSMultiline/MPOMultiline are then defined as ```julia const MPSMultiline = Multiline{<:InfiniteMPS} const MPOMultiline = Multiline{<:DenseMPO}

+end

MPSMultiline/MPOMultiline are then defined as ```julia const MPSMultiline = Multiline{<:InfiniteMPS} const MPOMultiline = Multiline{<:DenseMPO}