PyOR Quantum
Author: Vineeth Thalakottoor
Introduction to Hamiltonians (Zeeman, B1, J coupling and Dipolar coupling)
[2]:
# 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 PyOR package
from PyOR_QuantumSystem import QuantumSystem as QunS
from PyOR_Hamiltonian import Hamiltonian
[3]:
# Define the spin system
Spin_list = {"A" : "H1", "B" : "H1"}
QS = QunS(Spin_list,PrintDefault=False)
# initialize the system
QS.Initialize()
Set parameters
[4]:
# Master Equation
QS.PropagationSpace = "Hilbert"
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 paris of spins coupled by dipolar interaction
QS.DipoleAngle = [(45,45)]
QS.Dipole_Pairs = [("A","B")]
QS.Dipole_DipolarAlpabet = ["All"]
QS.DipolebIS = [25.0e3]
# 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
# Relaxation Process
QS.Rprocess = "Phenomenological"
QS.R1 = 1
QS.R2 = 2
QS.Update()
Rotating frame frequencies: {'A': -2514706800.0, 'B': -2514706800.0}
Offset frequencies: {'A': 10.0, 'B': 50.0}
Initial spin temperatures: {'A': 300.0, 'B': 300.0}
Final spin temperatures: {'A': 300.0, 'B': 300.0}
Radiation damping gain: {'A': 0, 'B': 0}
Radiation damping phase: {'A': 0, 'B': 0}
Rprocess = Phenomenological
RelaxParDipole_tau = 0.0
DipolePairs = [('A', 'B')]
RelaxParDipole_bIS = []
Generate Hamiltonians
[5]:
# generate Larmor Frequencies
QS.print_Larmor = True
Ham = Hamiltonian(QS)
Larmor Frequency in MHz: [-400.22802765 -400.22806765]
[6]:
# Lab Frame Hamiltonian
Hz_lab = Ham.Zeeman()
Hz_lab.Inverse2PI().matrix
[6]:
$\displaystyle \left[\begin{matrix}-400228040.565114 & 0 & 0 & 0\\0 & 20.3718327157626 & 0 & 0\\0 & 0 & -20.3718327157626 & 0\\0 & 0 & 0 & 400228040.565114\end{matrix}\right]$
[7]:
# Rotating Frame Hamiltonian
Hz = Ham.Zeeman_RotFrame()
Hz.Inverse2PI().matrix
[7]:
$\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]$
[8]:
# B1 Hamiltonian
Omega1 = 1.0
Omega1Phase = 0.0
HB1 = Ham.Zeeman_B1(Omega1,Omega1Phase)
HB1.Inverse2PI().matrix
[8]:
$\displaystyle \left[\begin{matrix}0 & 0.500000013913768 & 0.500000013913768 & 0\\0.500000013913768 & 0 & 0 & 0.500000013913768\\0.500000013913768 & 0 & 0 & 0.500000013913768\\0 & 0.500000013913768 & 0.500000013913768 & 0\end{matrix}\right]$
[9]:
# J coupling Hamiltonian
Hj = Ham.Jcoupling()
Hj.Inverse2PI().matrix
[9]:
$\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]$
[10]:
# Weak J coupling Hamiltonian
Hj_week = Ham.Jcoupling_Weak()
Hj_week.Inverse2PI().matrix
[10]:
$\displaystyle \left[\begin{matrix}1.24999997786618 & 0 & 0 & 0\\0 & -1.24999997786618 & 0 & 0\\0 & 0 & -1.24999997786618 & 0\\0 & 0 & 0 & 1.24999997786618\end{matrix}\right]$
[11]:
# Dipole coupling Hamiltonian
Hd = Ham.DDcoupling()
Hd.Inverse2PI().matrix
[11]:
$\displaystyle \left[\begin{matrix}-3124.99984722141 & -6629.1254198576 + 6629.1254198576 i & -6629.1254198576 + 6629.1254198576 i & 9374.99954166422 i\\-6629.1254198576 - 6629.1254198576 i & 3124.99984722141 & 3124.99984722141 & 6629.1254198576 - 6629.1254198576 i\\-6629.1254198576 - 6629.1254198576 i & 3124.99984722141 & 3124.99984722141 & 6629.1254198576 - 6629.1254198576 i\\- 9374.99954166422 i & 6629.1254198576 + 6629.1254198576 i & 6629.1254198576 + 6629.1254198576 i & -3124.99984722141\end{matrix}\right]$