Superoperator Unity

Class representing unity superoperator

Class Details

class quantarhei.qm.liouvillespace.supopunity.SOpUnity(dim=None, data=None)[source]

Class representing a unity superoperator

Parameters:
  • dim (int) – Dimension of the unity superoperator
  • data (array) – If data is specified, only their first dimension is used to construct a unity superoperator

Examples

Creation of an empty operator is not allowed

>>> empty = SOpUnity()
Traceback (most recent call last):
    ...
Exception: Dimension of the superoperator has to be defined

Creating unity superoperator of defined dimensions

>>> SU = SOpUnity(dim=3)
>>> print(SU.data.shape)
(3, 3, 3, 3)
>>> import numpy
>>> A = numpy.array([[0,    1.0, 2.0],
...                  [1.0, -3.0, 0.0],
...                  [-2.0, 0.0, 1.0]])

Application of SU on A should not change the matrix, because it corresponds to multiplication by unity

>>> B = SU.apply(A)
>>> numpy.allclose(A,B)
True

Knowing the dimension of A, we can create corresponding unity superoperator using A as the data argument:

>>> SU2 = SOpUnity(data=A)
>>> C = SU2.apply(A)
>>> numpy.allclose(A,C)
True
Attributes:
data

Methods

apply(oper[, copy]) Applies superoperator to an operator
transform(SS[, inv]) Transforms the superoperator to a new basis
get_current_basis  
protect_basis  
set_current_basis  
unprotect_basis