Zeeman basis and Singlet Triplet basis

[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"}
QS = QunS(Spin_list,PrintDefault=False)

# initialize the system
QS.Initialize()

Set parameters

[3]:
# Master Equation
QS.PropagationSpace = "Liouville"
QS.MasterEquation = "Redfield"

# B0 Field in Tesla, Static Magnetic field (B0) along Z
QS.B0 = 9.4

# Offset Frequency in rotating frame (Hz)
QS.OFFSET["A"] = 10.0
QS.OFFSET["B"] = 50.0

# Define J coupling between Spins
QS.JcoupleValue("A","B",5.0)

# Define initial and final Spin Temperature
QS.I_spintemp["A"] = 300.0
QS.I_spintemp["B"] = 300.0
QS.F_spintemp["A"] = 300.0
QS.F_spintemp["B"] = 300.0

# Define paris of spins coupled by dipolar interaction
QS.Dipole_Pairs = [("A","B")]

# Relaxation Process
QS.Rprocess = "Auto-correlated Dipolar Homonuclear"
QS.RelaxParDipole_tau = 10.0e-12
QS.RelaxParDipole_bIS = [30.0e3]

QS.Update()
Larmor Frequency in MHz:  [-400.22802765 -400.22806765]

Generate Hamiltonians

[4]:
# generate Larmor Frequencies
QS.print_Larmor = True
Ham = Hamiltonian(QS)
COMM = Commutators()
Hz = Ham.Zeeman_RotFrame()

# J coupling Hamiltonian
Hj = Ham.Jcoupling()

# Generating the commutation superoperator
QS.RowColOrder = 'C'
QLib = QuantumLibrary(QS)

Hz_L = QLib.CommutationSuperoperator(Hz+Hj)
Larmor Frequency in MHz:  [-400.22802765 -400.22806765]
[5]:
Hz.Inverse2PI().matrix
[5]:
$\displaystyle \left[\begin{matrix}-30.0000000759161 & 0 & 0 & 0\\0 & 20.0000008601147 & 0 & 0\\0 & 0 & -20.0000008601147 & 0\\0 & 0 & 0 & 30.0000000759161\end{matrix}\right]$
[6]:
Hj.Inverse2PI().matrix
[6]:
$\displaystyle \left[\begin{matrix}1.24999997786618 & 0 & 0 & 0\\0 & -1.24999997786618 & 2.49999995573235 & 0\\0 & 2.49999995573235 & -1.24999997786618 & 0\\0 & 0 & 0 & 1.24999997786618\end{matrix}\right]$

Zeeman Basis Kets

[7]:
QS.ZeemanBasis_Ket()
[7]:
['|1/2,1/2⟩|1/2,1/2⟩',
 '|1/2,1/2⟩|1/2,-1/2⟩',
 '|1/2,-1/2⟩|1/2,1/2⟩',
 '|1/2,-1/2⟩|1/2,-1/2⟩']

Zeeman Basis Bras

[8]:
QS.ZeemanBasis_Bra()
[8]:
['⟨1/2,1/2|⟨1/2,1/2|',
 '⟨1/2,1/2|⟨1/2,-1/2|',
 '⟨1/2,-1/2|⟨1/2,1/2|',
 '⟨1/2,-1/2|⟨1/2,-1/2|']

Zeeman Basis states

[9]:
BS = Basis(QS)
Zstates, DicZ = BS.Zeeman_Basis()
[10]:
print(DicZ)
['|1/2,1/2⟩|1/2,1/2⟩', '|1/2,1/2⟩|1/2,-1/2⟩', '|1/2,-1/2⟩|1/2,1/2⟩', '|1/2,-1/2⟩|1/2,-1/2⟩']
[11]:
Zstates[0].matrix
[11]:
$\displaystyle \left[\begin{matrix}1.0\\0\\0\\0\end{matrix}\right]$
[12]:
BS.KetState_Components(Zstates[0], Zstates, DicZ )
Ket State = 1.0 |1/2,1/2⟩|1/2,1/2⟩
[13]:
Zstates[1].matrix
[13]:
$\displaystyle \left[\begin{matrix}0\\1.0\\0\\0\end{matrix}\right]$
[14]:
BS.KetState_Components(Zstates[1], Zstates, DicZ)
Ket State = 1.0 |1/2,1/2⟩|1/2,-1/2⟩
[15]:
Zstates[2].matrix
[15]:
$\displaystyle \left[\begin{matrix}0\\0\\1.0\\0\end{matrix}\right]$
[16]:
BS.KetState_Components(Zstates[2], Zstates, DicZ)
Ket State = 1.0 |1/2,-1/2⟩|1/2,1/2⟩
[17]:
Zstates[3].matrix
[17]:
$\displaystyle \left[\begin{matrix}0\\0\\0\\1.0\end{matrix}\right]$
[18]:
BS.KetState_Components(Zstates[3], Zstates, DicZ)
Ket State = 1.0 |1/2,-1/2⟩|1/2,-1/2⟩
[19]:
STstates, DicST = BS.SingletTriplet_Basis()
[20]:
print(DicST)
['S0 ', 'Tp ', 'T0 ', 'Tm ']
[21]:
STstates[0].matrix
[21]:
$\displaystyle \left[\begin{matrix}0\\0.707106781186547\\-0.707106781186547\\0\end{matrix}\right]$
[22]:
BS.KetState_Components(STstates[0], Zstates, DicZ)
Ket State = 0.70711 |1/2,1/2⟩|1/2,-1/2⟩ + -0.70711 |1/2,-1/2⟩|1/2,1/2⟩
[23]:
STstates[1].matrix
[23]:
$\displaystyle \left[\begin{matrix}1.0\\0\\0\\0\end{matrix}\right]$
[24]:
BS.KetState_Components(STstates[1], Zstates, DicZ)
Ket State = 1.0 |1/2,1/2⟩|1/2,1/2⟩
[25]:
STstates[2].matrix
[25]:
$\displaystyle \left[\begin{matrix}0\\0.707106781186547\\0.707106781186547\\0\end{matrix}\right]$
[26]:
BS.KetState_Components(STstates[2], Zstates, DicZ)
Ket State = 0.70711 |1/2,1/2⟩|1/2,-1/2⟩ + 0.70711 |1/2,-1/2⟩|1/2,1/2⟩
[27]:
STstates[3].matrix
[27]:
$\displaystyle \left[\begin{matrix}0\\0\\0\\1.0\end{matrix}\right]$
[28]:
BS.KetState_Components(STstates[3], Zstates, DicZ)
Ket State = 1.0 |1/2,-1/2⟩|1/2,-1/2⟩
[29]:
U_Z_ST = BS.BasisChange_TransformationMatrix(Zstates,STstates)
[30]:
U_Z_ST.matrix
[30]:
$\displaystyle \left[\begin{matrix}0 & 1.0 & 0 & 0\\0.707106781186547 & 0 & 0.707106781186547 & 0\\-0.707106781186547 & 0 & 0.707106781186547 & 0\\0 & 0 & 0 & 1.0\end{matrix}\right]$
[31]:
Hj_ST = BS.BasisChange_Operator(Hj,U_Z_ST)
Hz_ST = BS.BasisChange_Operator(Hz,U_Z_ST)
[32]:
Hj_ST.Inverse2PI().matrix
[32]:
$\displaystyle \left[\begin{matrix}-3.74999993359853 & 0 & 4.99168987337528 \cdot 10^{-17} & 0\\0 & 1.24999997786618 & 0 & 0\\6.78409585029909 \cdot 10^{-17} & 0 & 1.24999997786618 & 0\\0 & 0 & 0 & 1.24999997786618\end{matrix}\right]$
[33]:
# Alternate way
Hj.BasisChange(U_Z_ST).Inverse2PI().matrix
[33]:
$\displaystyle \left[\begin{matrix}-3.74999993359853 & 0 & 4.99168987337528 \cdot 10^{-17} & 0\\0 & 1.24999997786618 & 0 & 0\\6.78409585029909 \cdot 10^{-17} & 0 & 1.24999997786618 & 0\\0 & 0 & 0 & 1.24999997786618\end{matrix}\right]$
[34]:
# Another alternate way
Hj.Basis("singlettriplet").Inverse2PI().matrix
[34]:
$\displaystyle \left[\begin{matrix}-3.74999993359853 & 0 & 4.99168987337528 \cdot 10^{-17} & 0\\0 & 1.24999997786618 & 0 & 0\\6.78409585029909 \cdot 10^{-17} & 0 & 1.24999997786618 & 0\\0 & 0 & 0 & 1.24999997786618\end{matrix}\right]$
[35]:
Hz_ST.Inverse2PI().matrix
[35]:
$\displaystyle \left[\begin{matrix}2.8102595185518 \cdot 10^{-16} & 0 & 20.0000008601147 & 0\\0 & -30.0000000759161 & 0 & 0\\20.0000008601147 & 0 & 2.8102595185518 \cdot 10^{-16} & 0\\0 & 0 & 0 & 30.0000000759161\end{matrix}\right]$
[36]:
# Alternate way
Hz.BasisChange(U_Z_ST).Inverse2PI().matrix
[36]:
$\displaystyle \left[\begin{matrix}2.8102595185518 \cdot 10^{-16} & 0 & 20.0000008601147 & 0\\0 & -30.0000000759161 & 0 & 0\\20.0000008601147 & 0 & 2.8102595185518 \cdot 10^{-16} & 0\\0 & 0 & 0 & 30.0000000759161\end{matrix}\right]$
[37]:
# Another alternate way
Hz.Basis("singlettriplet").Inverse2PI().matrix
[37]:
$\displaystyle \left[\begin{matrix}2.8102595185518 \cdot 10^{-16} & 0 & 20.0000008601147 & 0\\0 & -30.0000000759161 & 0 & 0\\20.0000008601147 & 0 & 2.8102595185518 \cdot 10^{-16} & 0\\0 & 0 & 0 & 30.0000000759161\end{matrix}\right]$

Eigen values and Eigen Vectors of Hj

[38]:
QLib = QuantumLibrary()
[39]:
eigenvalues, eigenvectors = QLib.Eigen_Split(Hj)
[40]:
eigenvalues.Inverse2PI().matrix
[40]:
$\displaystyle \left[\begin{matrix}1.24999997786618 & -3.74999993359853 & 1.24999997786618 & 1.24999997786618\end{matrix}\right]$
[41]:
BS.KetState_Components(eigenvectors[0], Zstates, DicZ)
Ket State = 0.70711 |1/2,1/2⟩|1/2,-1/2⟩ + 0.70711 |1/2,-1/2⟩|1/2,1/2⟩
[42]:
BS.KetState_Components(eigenvectors[1], Zstates, DicZ)
Ket State = 0.70711 |1/2,1/2⟩|1/2,-1/2⟩ + -0.70711 |1/2,-1/2⟩|1/2,1/2⟩
[43]:
BS.KetState_Components(eigenvectors[2], Zstates, DicZ)
Ket State = 1.0 |1/2,1/2⟩|1/2,1/2⟩
[44]:
BS.KetState_Components(eigenvectors[3], Zstates, DicZ)
Ket State = 1.0 |1/2,-1/2⟩|1/2,-1/2⟩
[45]:
BS.BasisChange_TransformationMatrix(Zstates,eigenvectors).matrix
[45]:
$\displaystyle \left[\begin{matrix}0 & 0 & 1.0 & 0\\0.707106781186548 & 0.707106781186548 & 0 & 0\\0.707106781186547 & -0.707106781186547 & 0 & 0\\0 & 0 & 0 & 1.0\end{matrix}\right]$