Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Update docs for ITensorMPS #1603

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/HDF5FileFormats.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/src/Observer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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
Expand All @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions docs/src/examples/DMRG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand All @@ -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))
Expand Down
Loading