Skip to content

Commit 81570d6

Browse files
committed
Add new relaxation superoperators
1 parent 9fced96 commit 81570d6

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

src/radicalpy/relaxation.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,60 @@ def init(self, sim: LiouvilleSimulation):
8888
+ np.kron(self.QTm, self.QT0)
8989
+ np.kron(self.QT0, self.QTm)
9090
)
91+
92+
93+
def g_tensor_anisotropy_term(sim: LiouvilleSimulation, idx, g, omega, tau_c):
94+
giso = np.mean(g)
95+
SAx, SAy, SAz = [sim.spin_operator(idx, ax) for ax in "xyz"]
96+
H = 0.5 * np.eye(len(SAx) * len(SAx), dtype=complex)
97+
H -= np.kron(SAx, SAx.T)
98+
H -= np.kron(SAy, SAy.T)
99+
H *= 3 * spectral_density(omega, tau_c)
100+
H += (
101+
2
102+
* spectral_density(0, tau_c)
103+
* (0.5 * np.eye(len(SAx) * len(SAx)) - 2 * np.kron(SAz, SAz.T))
104+
)
105+
H *= 1 / 15 * sum([((gj - giso) / giso) ** 2 for gj in g]) * omega**2
106+
return H
107+
108+
109+
# !!!!!!!!!! omega depends on B, which changes in every step (MARY loop)
110+
# See note below
111+
# Instead of omega1 & omega2 use B and calculate omegas inside
112+
class GTensorAnisotropy(LiouvilleKineticsRelaxationBase):
113+
def __init__(self, g1, g2, omega1, omega2, tau_c1, tau_c2):
114+
self.g1 = g1
115+
self.g2 = g2
116+
self.omega1 = omega1
117+
self.omega2 = omega2
118+
self.tau_c1 = tau_c1
119+
self.tau_c2 = tau_c2
120+
121+
def init(self, sim: LiouvilleSimulation):
122+
self.subH = g_tensor_anisotropy_term(sim, 0, self.g1, self.omega1, self.tau_c1)
123+
self.subH += g_tensor_anisotropy_term(sim, 1, self.g2, self.omega2, self.tau_c2)
124+
125+
126+
class T1Relaxation(LiouvilleKineticsRelaxationBase):
127+
def init(self, sim: LiouvilleSimulation):
128+
SAz = sim.spin_operator(0, "z")
129+
SBz = sim.spin_operator(1, "z")
130+
131+
self.subH = self.rate * (
132+
np.eye(len(SAz) * len(SAz)) - np.kron(SAz, SAz.T) - np.kron(SBz, SBz.T)
133+
)
134+
135+
136+
class T2Relaxation(LiouvilleKineticsRelaxationBase):
137+
def init(self, sim: LiouvilleSimulation):
138+
SAx, SAy = sim.spin_operator(0, "x"), sim.spin_operator(0, "y")
139+
SBx, SBy = sim.spin_operator(1, "x"), sim.spin_operator(1, "y")
140+
141+
self.subH = self.rate * (
142+
np.eye(len(SAx) * len(SAx))
143+
- np.kron(SAx, SAx.T)
144+
- np.kron(SBx, SBx.T)
145+
- np.kron(SAy, SAy.T)
146+
- np.kron(SBy, SBy.T)
147+
)

0 commit comments

Comments
 (0)