Skip to content

Commit

Permalink
Update docs to ITensorMPS
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlevy committed Nov 25, 2024
1 parent 795042b commit eaf0c54
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
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

0 comments on commit eaf0c54

Please sign in to comment.