Menu

Reference.Variables.Main

Burkhard Schmidt

Variables used in MATLAB/Octave version of WavePacket

The programming strategy followed throughout the Matlab/Octave version of WavePacket is to use rather few but highly structured variables. These variables are made globally visible to all parts of the codes. This avoids passing them through argument lists since - at least in some older versions - Matlab/Octave uses to pass variables by value which causes an overly large memory consumption. Hence, care should be taken when changing any global variables; there is always a risk of unwanted side effects.

Settable global variables

The fields of these structures have to be - at least partly - assigned by the user before running WavePacket simulations. Typically, this is done through a qm_init function.

  • control: (Optimal) control problems and algorithms

  • hamilt: Hamiltonian operator governing the dynamics

  • plots: Graphical output including animation

  • reduce: Dimension reduction / model order reduction

  • space: Spatial discretization (grid setup)

  • state: Quantum or classical or hybrid object (from main classes)

  • time: Temporal discretization, initial states and propagators, external fields

Other global variables

  • atomic: Conversion from/to atomic units, along with masses of the most important isotopes

  • expect: Expectation values of important quantum operators, along with their uncertainties

  • info: General information about simulation setup (hard- and software)


Related

Wiki: Reference.Classes.Main
Wiki: Reference.Main
Wiki: Reference.Programs.qm_init
Wiki: Reference.Variables.atomic
Wiki: Reference.Variables.control
Wiki: Reference.Variables.expect
Wiki: Reference.Variables.hamilt
Wiki: Reference.Variables.info
Wiki: Reference.Variables.plots
Wiki: Reference.Variables.reduce
Wiki: Reference.Variables.space
Wiki: Reference.Variables.state
Wiki: Reference.Variables.time

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.