States
States of (ensembles) of closed and open quantum systems can be expressed in various formalisms
and spaces (e.g. Hilbert, Liouville or higher dimensional).
In SimOS we support four distinct state representations as summarized in the table below.
In analogy to Qutips Quantum Object, each quantum object in SimOS has a dims
attribute, which indicates
the dimensionality and separable substructure of the associated vector space.
Here, we illustrate the quantum dimensionality of the state objects for a composite two-member system
with individual Hilbert space dimensions \(n\) and \(m\) . For the Fokker-Planck space state representation,
\(x\) indicates the dimensionality of the classical subspace.
State Type |
Structured Dimensionality (2 Spin System Example) |
Shape |
Remarks |
---|---|---|---|
Ket \(\ket{\psi}\) |
|
\((1, n \cdot m)\) |
A pure state in Hilbert space (state vector, unit vector in Hilbert space). |
Density Matrix \(\rho\) |
|
\((n \cdot m , n \cdot m)\) |
A pure or mixed state in Hilbert space. |
Vectorized Density Matrix \(\vec{\rho}\) |
|
\(( (n \cdot m)^2 , 1)\) |
Density matrix liouville space representation, allowing for direct multiplication with a superoperator. |
Fokker Planck Vectorized Density Matrix \(\vec{\rho}_{\mathrm{FP}}\) |
|
\(( (n \cdot m)^2 \cdot x , 1)\) |
Density matrix fokker planck space representation. |
The figure below further illustrates the characteristics of the Hilbert and Liouville
space quantum state representations and their interconversion.
To transform kets and density matrices, users can utilize the ket2dm()
and dm2ket()
methods.
Density matrices can be interconverted with their vecotrized Liouville space representations with the
dm2vec()
and vec2dm()
methods.
Although not shown here explicity, conversion to the Fokker-Planck space representation is further
supported in the dm2fp()
and fp2dm
methods.

Initialising States
SimOS provides a series of methods to facilitate initialisation of states as documented below.
Pure States
To facilitate the initialisation of pure states of multipartite quantum systems, SimOS provides
the state()
method. The scheme below illustrates initialisation of a pure state
for the example of a simple 2-spin system. The desired state is defined as a string which contains all
member names and, in the case of spins, magnetic sublevels in square parentheses.

The obtained state vectors can succesively be transformed to density matrices with the ket2dm()
method; mixed states can be prepared as weighted superpositions of “pure”
density matrices.
Warning
We strongly recommend to explicitly specify the spin-state of all spin-members (i.e. members with val
\(> 1/2\)) when creating an initial state with the state()
method.
If the spin-state of a relevant spin member (i.e. a spin that is coupled to one or multiple of the selected electronic levels) is not explicitly specified, the created state is a coherent superposition in the Zeeman basis.
The state()
routine does currently not permit omitting spins (for performance reasons), however, this functionality might be deprecated in future releases.
Thermal and Polarized States
Magnetic resonance experiments often assume an initial state with thermal or otherwise well-defined non-equilibrium polarizations of individual
system members. SimOS provides a method thermal_dm()
that returns the thermal density matrix for a given temperature and system Hamiltonian. The method pol_spin()
returns the
density matrix for a spin S= 1/2
with a well-defined polarization, i.e.
Syntax Reference
- pol_spin(polarization, method='qutip')[source]
Density matrix for a (partially) polarized spin 1/2.
- Params polarization:
Polarization -1 .. 0 .. 1. Negative polarization values correspond to a polarization in the opposite spin state than positive polarization values.
- Returns:
Density matrix for the (partially) polarized spin 1/2.
- state(system, statename: str)[source]
Generates an initial state (pure state).
- Parameters:
system (System) – An instance of the System class.
statename (str) – A string specifying the initial state.
- Returns:
The initial state (ket state vector).
- state_product(*states, method='qutip')[source]
Returns the tensor product of a list of quantum objects (states or density matrices).
If the list contains at least one density matrix, the return object will be a density matrix (state vectors will be automatically converted). All states are normalized before tensor product is being executed.
- Parameters:
*states –
List of quantum objects, supports state vectors and density matrices.
- Keyword Arguments:
method (‘’str’’) – Backend.
- Returns:
Tensor product of all states.
- thermal_state(H, T=300, unit='Kelvin')[source]
Density matrix for a thermal state at a temperature T under a given Hamiltonian H.
- Parameters:
H – System Hamiltonian.
T – Temperature.
- Keyword Arguments:
unit (‘’str’’) – Specifies temperature unit. Can be Kelvin or Degree Celcius.
- Returns:
Thermal density matrix.