PMZ Product Operators (Any Spin Half)

[1]:
# Define the source path
SourcePath = '/media/HD2/Vineeth/PostDoc_Simulations/Github/PyOR_V1/PyOR_Combined/PyOR/Source_Doc'

# Add source path
import sys
sys.path.append(SourcePath)
import time
%matplotlib ipympl

# Import PyOR package
from PyOR_QuantumSystem import QuantumSystem as QunS
from PyOR_Hamiltonian import Hamiltonian
from PyOR_DensityMatrix import DensityMatrix
from PyOR_QuantumObject import QunObj
from PyOR_HardPulse import HardPulse
from PyOR_Basis import Basis
from PyOR_Evolution import Evolutions
from PyOR_Plotting import Plotting
import PyOR_SignalProcessing as Spro
from PyOR_Commutators import Commutators
from PyOR_QuantumLibrary import QuantumLibrary
from PyOR_Relaxation import RelaxationProcess
[2]:
# Define the spin system
#Spin_list = {"A" : "H1","B" : "H1","C" : "H1"}
Spin_list = {"A" : "H1","B" : "H1"}

QS = QunS(Spin_list,PrintDefault=False)

# initialize the system
QS.Initialize()

Product Operator Basis: Spherical Tensors

[3]:
BS = Basis(QS)

Basis_PMZ, coherence_PMZ, Dic_PMZ = BS.ProductOperators_SpinHalf_PMZ()
[4]:
print(coherence_PMZ)
[-2, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2]
[5]:
print(Dic_PMZ)
['Im1 Im2 ', 'Im1 Iz2 ', 'Im1 Id2 ', 'Iz1 Im2 ', 'Id1 Im2 ', 'Im1 Ip2 ', 'Iz1 Iz2 ', 'Iz1 Id2 ', 'Id1 Iz2 ', 'Id1 Id2 ', 'Ip1 Im2 ', 'Iz1 Ip2 ', 'Id1 Ip2 ', 'Ip1 Iz2 ', 'Ip1 Id2 ', 'Ip1 Ip2 ']
[6]:
Basis_PMZ[0].matrix
[6]:
$\displaystyle \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\1.0 & 0 & 0 & 0\end{matrix}\right]$
[7]:
Basis_PMZ[1].matrix
[7]:
$\displaystyle \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0.707106781186547 & 0 & 0 & 0\\0 & -0.707106781186547 & 0 & 0\end{matrix}\right]$
[8]:
Basis_PMZ[2].matrix
[8]:
$\displaystyle \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0.707106781186547 & 0 & 0 & 0\\0 & 0.707106781186547 & 0 & 0\end{matrix}\right]$
[9]:
Basis_PMZ[3].matrix
[9]:
$\displaystyle \left[\begin{matrix}0 & 0 & 0 & 0\\0.707106781186547 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & -0.707106781186547 & 0\end{matrix}\right]$

String Index

[10]:
B_PMZ = BS.String_to_Matrix(Dic_PMZ, Basis_PMZ)
['Im1Im2', 'Im1Iz2', 'Im1', 'Iz1Im2', 'Im2', 'Im1Ip2', 'Iz1Iz2', 'Iz1', 'Iz2', '', 'Ip1Im2', 'Iz1Ip2', 'Ip2', 'Ip1Iz2', 'Ip1', 'Ip1Ip2']
[11]:
B_PMZ[''].matrix
[11]:
$\displaystyle \left[\begin{matrix}0.5 & 0 & 0 & 0\\0 & 0.5 & 0 & 0\\0 & 0 & 0.5 & 0\\0 & 0 & 0 & 0.5\end{matrix}\right]$
[12]:
B_PMZ['Im1Im2'].matrix
[12]:
$\displaystyle \left[\begin{matrix}0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\0 & 0 & 0 & 0\\1.0 & 0 & 0 & 0\end{matrix}\right]$
[ ]: