Sweeps

ITensors.SweepsType

A Sweeps objects holds information about the various parameters controlling a density matrix renormalization group (DMRG) or similar matrix product state (MPS) calculation.

For a Sweeps object sw the available parameters are:

  • nsweep(sw) – the number of sweeps to do
  • maxdim(sw,n) – maximum MPS bond dimension for sweep n
  • mindim(sw,n) – minimum MPS bond dimension for sweep n
  • cutoff(sw,n) – truncation error cutoff for sweep n
  • noise(sw,n) – noise term coefficient for sweep n
source
ITensors.SweepsMethod
Sweeps(d::AbstractMatrix)

Sweeps(nsweep::Int, d::AbstractMatrix)

Make a sweeps object from a matrix of input values. The first row should be strings that define which variables are being set ("maxdim", "cutoff", "mindim", and "noise").

If the number of sweeps are not specified, they are determined from the size of the input matrix.

Examples

julia> Sweeps([
         "maxdim" "mindim" "cutoff" "noise"
          50       10       1e-12    1E-7
          100      20       1e-12    1E-8
          200      20       1e-12    1E-10
          400      20       1e-12    0
          800      20       1e-12    1E-11
          800      20       1e-12    0
         ])
Sweeps
1 cutoff=1.0E-12, maxdim=50, mindim=10, noise=1.0E-07
2 cutoff=1.0E-12, maxdim=100, mindim=20, noise=1.0E-08
3 cutoff=1.0E-12, maxdim=200, mindim=20, noise=1.0E-10
4 cutoff=1.0E-12, maxdim=400, mindim=20, noise=0.0E+00
5 cutoff=1.0E-12, maxdim=800, mindim=20, noise=1.0E-11
6 cutoff=1.0E-12, maxdim=800, mindim=20, noise=0.0E+00
source

Modifying Sweeps Objects

ITensors.setmaxdim!Function
maxdim!(sw::Sweeps,maxdims::Int...)

Set the maximum MPS bond dimension for each sweep by providing up to nsweep(sw) values. If fewer values are provided, the last value is repeated for the remaining sweeps.

source
ITensors.setcutoff!Function
cutoff!(sw::Sweeps,maxdims::Int...)

Set the MPS truncation error used for each sweep by providing up to nsweep(sw) values. If fewer values are provided, the last value is repeated for the remaining sweeps.

source
ITensors.setnoise!Function
noise!(sw::Sweeps,maxdims::Int...)

Set the noise-term coefficient used for each sweep by providing up to nsweep(sw) values. If fewer values are provided, the last value is repeated for the remaining sweeps.

source
ITensors.setmindim!Function
mindim!(sw::Sweeps,maxdims::Int...)

Set the minimum MPS bond dimension for each sweep by providing up to nsweep(sw) values. If fewer values are provided, the last value is repeated for the remaining sweeps.

source

Getting Sweeps Object Data

ITensors.nsweepMethod
nsweep(sw::Sweeps)
length(sw::Sweeps)

Obtain the number of sweeps parameterized by this sweeps object.

source
NDTensors.maxdimMethod
maxdim(sw::Sweeps,n::Int)

Maximum MPS bond dimension allowed by the Sweeps object sw during sweep n

source
ITensors.cutoffMethod
cutoff(sw::Sweeps,n::Int)

Truncation error cutoff setting of the Sweeps object sw during sweep n

source
ITensors.noiseMethod
noise(sw::Sweeps,n::Int)

Noise term coefficient setting of the Sweeps object sw during sweep n

source
NDTensors.mindimMethod
mindim(sw::Sweeps,n::Int)

Minimum MPS bond dimension allowed by the Sweeps object sw during sweep n

source