From eaf0c541325769b8c7a2d5e6b5f7302a1ab6975e Mon Sep 17 00:00:00 2001 From: Ryan Levy Date: Mon, 25 Nov 2024 20:17:53 +0100 Subject: [PATCH] Update docs to ITensorMPS --- docs/src/HDF5FileFormats.md | 4 ++-- docs/src/Observer.md | 8 ++++---- docs/src/examples/DMRG.md | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/src/HDF5FileFormats.md b/docs/src/HDF5FileFormats.md index d09c7277ae..47cf26ea8f 100644 --- a/docs/src/HDF5FileFormats.md +++ b/docs/src/HDF5FileFormats.md @@ -156,7 +156,7 @@ Datasets and Subgroups: ## [MPS](@id mps_hdf5) -HDF5 file format for `ITensors.MPS` +HDF5 file format for `ITensorMPS.MPS` Attributes: * "version" = 1 @@ -171,7 +171,7 @@ Datasets and Subgroups: ## [MPO](@id mpo_hdf5) -HDF5 file format for `ITensors.MPO` +HDF5 file format for `ITensorMPS.MPO` Attributes: * "version" = 1 diff --git a/docs/src/Observer.md b/docs/src/Observer.md index fd50d96817..66affcfaa1 100644 --- a/docs/src/Observer.md +++ b/docs/src/Observer.md @@ -70,7 +70,7 @@ In our example, we will just compare the `energy` keyword argument to the `last_energy` variable held inside the `DemoObserver`: ```julia -function ITensors.checkdone!(o::DemoObserver;kwargs...) +function ITensorMPS.checkdone!(o::DemoObserver;kwargs...) sw = kwargs[:sweep] energy = kwargs[:energy] if abs(energy-o.last_energy)/abs(energy) < o.energy_tol @@ -110,7 +110,7 @@ that prints out some of the information above, but in a more realistic setting o could use the MPS `psi` to perform essentially arbitrary measurements. ```julia -function ITensors.measure!(o::DemoObserver; kwargs...) +function ITensorMPS.measure!(o::DemoObserver; kwargs...) energy = kwargs[:energy] sweep = kwargs[:sweep] bond = kwargs[:bond] @@ -148,7 +148,7 @@ mutable struct DemoObserver <: AbstractObserver DemoObserver(energy_tol=0.0) = new(energy_tol,1000.0) end -function ITensors.checkdone!(o::DemoObserver;kwargs...) +function ITensorMPS.checkdone!(o::DemoObserver;kwargs...) sw = kwargs[:sweep] energy = kwargs[:energy] if abs(energy-o.last_energy)/abs(energy) < o.energy_tol @@ -160,7 +160,7 @@ function ITensors.checkdone!(o::DemoObserver;kwargs...) return false end -function ITensors.measure!(o::DemoObserver; kwargs...) +function ITensorMPS.measure!(o::DemoObserver; kwargs...) energy = kwargs[:energy] sweep = kwargs[:sweep] bond = kwargs[:bond] diff --git a/docs/src/examples/DMRG.md b/docs/src/examples/DMRG.md index 250ad474f0..48d51feb11 100644 --- a/docs/src/examples/DMRG.md +++ b/docs/src/examples/DMRG.md @@ -383,7 +383,7 @@ using ITensors, ITensorMPS mutable struct EntanglementObserver <: AbstractObserver end -function ITensors.measure!(o::EntanglementObserver; bond, psi, half_sweep, kwargs...) +function ITensorMPS.measure!(o::EntanglementObserver; bond, psi, half_sweep, kwargs...) wf_center, other = half_sweep==1 ? (psi[bond+1],psi[bond]) : (psi[bond],psi[bond+1]) U,S,V = svd(wf_center, uniqueinds(wf_center,other)) SvN = 0.0 @@ -406,7 +406,7 @@ using ITensors, ITensorMPS mutable struct EntanglementObserver <: AbstractObserver end -function ITensors.measure!(o::EntanglementObserver; bond, psi, half_sweep, kwargs...) +function ITensorMPS.measure!(o::EntanglementObserver; bond, psi, half_sweep, kwargs...) wf_center, other = half_sweep==1 ? (psi[bond+1],psi[bond]) : (psi[bond],psi[bond+1]) U,S,V = svd(wf_center, uniqueinds(wf_center,other)) SvN = 0.0 @@ -481,7 +481,7 @@ using ITensors, ITensorMPS mutable struct SizeObserver <: AbstractObserver end -function ITensors.measure!(o::SizeObserver; bond, half_sweep, psi, projected_operator, kwargs...) +function ITensorMPS.measure!(o::SizeObserver; bond, half_sweep, psi, projected_operator, kwargs...) if bond==1 && half_sweep==2 psi_size = Base.format_bytes(Base.summarysize(psi)) PH_size = Base.format_bytes(Base.summarysize(projected_operator)) @@ -503,7 +503,7 @@ using ITensors, ITensorMPS mutable struct SizeObserver <: AbstractObserver end -function ITensors.measure!(o::SizeObserver; bond, sweep, half_sweep, psi, projected_operator, kwargs...) +function ITensorMPS.measure!(o::SizeObserver; bond, sweep, half_sweep, psi, projected_operator, kwargs...) if bond==1 && half_sweep==2 psi_size = Base.format_bytes(Base.summarysize(psi)) PH_size = Base.format_bytes(Base.summarysize(projected_operator))