High level interface

TensorMixedStates.runTMSFunction
runTMS(::SimData)
runTMS(::SimData; clean = true)
runTMS(::SimData; restart = true)
runTMS(::SimData; output = myoutput)

run the given simulation (see SimData for details), write the output to file and return a Simulation object containing the result. clean (default false) remove the simulation directory and exit, restart (default false) remove the simulation directory and run the simulation, output redirect all output to the given IO channel (no output directory created), usefull values are stdout or devnull (to suppress all output).

source
TensorMixedStates.SimDataType
SimData(name = "my_simulation", phases::Vector{Phases} = [phase1, phase2...])

A type for describing a simulation to use with runTMS

Fields

  • name: the name of the simulation used as the name of the directory to store the results
  • phases: the list of phases of the simulation (see Phases for a list of possible values)
  • descritpion: text put in the description file of the simulation (default "")
  • time_start: initial simulation time (default 0.)
  • final_measures: measures to make at the end of simulation (default []) see measure and output
  • time_format: C like format for output of simulation time (default "%8.4g")
  • data_format: C like format for output of simulation data (default "%12.6g")
source
TensorMixedStates.DataToFrameFunction
DataToFrame(data)

return a DataFrame object corresponding to the data. The DataFrames package must be imported before using this function.

source
TensorMixedStates.PhasesType
Phases = Union{CreateState, SaveState, LoadState, ToMixed, Evolve, Gates, GroundState, PartialTrace, SteadyState}

A type that contains all possible phase types for SimData and runTMS. Each of the types contains at least the three following fields (like SimData).

  • name: the name of the phase
  • time_start: the simulation time to use at the start of the phase
  • final_measures: the measurements to make at the end of the phase see measure and output
source
TensorMixedStates.CreateStateType

A phase type to create the simulation state

Fields

  • name: the name of the phase
  • time_start: the initial simulation time
  • final_measures: the measurements to make at the end of the phase see measure and output
  • type: the type of state to create Pure() or Mixed()
  • system: a System object to describe the system (see System) (unused if a State object is given)
  • state: a description of the state (or a State object)
  • randomize: the link dimension for the random state to create (default 0 for no randomizing)
  • seed: set the random generator seed for randomize (default nothing)

Examples

CreateState(type = Pure(), system = System(10, Qubit()), state = "Up")
CreateState(type = Mixed(), system = System(3, Qubit()), state = ["Up", "Dn", "Up])
CreateState(type = Pure(), system = System(10, Qubit()), randomize = 50)
CreateState(type = Pure(), system = System(10, Qubit()), state = "Up", randomize = 50)
CreateState(Pure(), 10, Qubit(), "Up")                                      # simple form
CreateState(Mixed(), [Qubit(), Boson(4), Fermion()], ["Up", "2", "Occ"])    # other simple form
source
TensorMixedStates.ToMixedType

A phase type to switch to mixed representation

Fields

  • name: the name of the phase
  • time_start: the simulation time to use (no much use here)
  • final_measures: the measurements to make at the end of the phase see measure and output
  • limits : constraints on the final state

Examples

ToMixed()
ToMixed(limits = Limits(cutoff = 1e-10, maxdim = 10))
source
TensorMixedStates.TdvpType

An algorithm type for Evolve

Examples

Tdvp()
Tdvp(n_expand = 5)     tdvp with expansion steps every 5 steps
Tdvp(n_hermitianize = 3) tdvp, make hermitian every 3 steps
source
TensorMixedStates.ApproxWType

An algorithm type for Evolve

This corresponds to time evolution with exponential approximation WI or WII combined to obtained approximation of the given order

Examples

ApproxW(order = 2)                   order 2, WII
ApproxW(order = 4, w = 1)            order 4, WI
ApproxW(order = 4, n_hermitianize = 3) order 4, make hermitian every 3 steps
source
TensorMixedStates.EvolveType

A phase type for time evolution

Examples

Evolve(duration = 2., time_step = 0.1, algo = Tdvp(), evolver = -im*(Z(1)Z(2)+(Z(2)Z(3))), measures = [X, Y, Z])

Fields

  • limits: a Limits object to set cutoff and maxdim (see Limits)
  • duration: the duration of the time evolution
  • time_step: the time step
  • algo: the algorithm used (one of Tdvp() or ApproxW(...))
  • evolver: the hamiltonian (evolver = -im * H) with a possible dissipator (evolver = -im * H + D)
  • measures: the measurement to make (default [])
  • measures_period: number of time steps between measurments (default 1)
source
TensorMixedStates.GatesType

A phase type for applying gates

  • name: the name of the phase
  • time_start: the simulation time to use at the start of the phase
  • final_measures: the measurements to make at the end of the phase see measure and output
  • limits: constraints to enforce at each step of the computation
  • gates: the gates to apply

Examples

Gates(gates = CNOT(1, 3)*CZ(2,4), limits = Limits(cutoff=1e-10, maxdim = 20))
source
TensorMixedStates.GroundStateType

A phase type for computing the ground state using Dmrg

Examples

GroundState(hamiltonian = X(1)X(2), nsweeps = 10, limits = Limits(cutoff = 1e-10, maxdim = [10, 20, 30]), tolerance = 1e-6)
source
TensorMixedStates.SteadyStateType

a phase to compute the steady state of a Lindbladian

Examples

SteadyState(
    lindbladian = -im * hamiltonian + dissipators,
    limits = Limits(cutoff = 1e-20, maxdim = [10, 20, 50]),
    nsweeps = 10,
    tolerance = 1e-5,
)
source