Sweeps

ITensorMPS.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
ITensorMPS.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
1cutoff = 1.0E-12, maxdim = 50, mindim = 10, noise = 1.0E-07
2cutoff = 1.0E-12, maxdim = 100, mindim = 20, noise = 1.0E-08
3cutoff = 1.0E-12, maxdim = 200, mindim = 20, noise = 1.0E-10
4cutoff = 1.0E-12, maxdim = 400, mindim = 20, noise = 0.0E+00
5cutoff = 1.0E-12, maxdim = 800, mindim = 20, noise = 1.0E-11
6cutoff = 1.0E-12, maxdim = 800, mindim = 20, noise = 0.0E+00

Modifying Sweeps Objects

ITensorMPS.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.

ITensorMPS.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.

ITensorMPS.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.

ITensorMPS.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.

Getting Sweeps Object Data

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

Obtain the number of sweeps parameterized by this sweeps object.

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

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

ITensorMPS.cutoffMethod
cutoff(sw::Sweeps,n::Int)

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

ITensorMPS.noiseMethod
noise(sw::Sweeps,n::Int)

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

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

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