Skip to content

Commit

Permalink
adds energy_transitions function to NVNegative class. Adds new notebo…
Browse files Browse the repository at this point in the history
…ok for ODMR spectrum of 15N
  • Loading branch information
gadamc committed Mar 22, 2023
1 parent ec4edbe commit c4bf6dc
Show file tree
Hide file tree
Showing 3 changed files with 1,654 additions and 89 deletions.
1,610 changes: 1,610 additions & 0 deletions notebooks/15NVNeg_full_H_Zeeman_ESR_spectrum.ipynb

Large diffs are not rendered by default.

113 changes: 25 additions & 88 deletions notebooks/NVNeg_full_H_Zeeman_ESR_spectrum.ipynb

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion src/nvmodels/hamiltonians/nvnegative.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, isotope: int = 14, temperature: float = 290):
if isotope == 15:
self.nitrogen_spin = 1/2

self.nitrogen_spin_op_dims = 2*self.nitrogen_spin + 1
self.nitrogen_spin_op_dims = int(2*self.nitrogen_spin + 1)


def zero_field_splitting(self):
Expand Down Expand Up @@ -162,3 +162,21 @@ def nitrogen_electric_quadrupole_hamiltonian(self):
h = qt.tensor(qt.qeye(3), h)

return h

def electron_spin_resonances(self, hamiltonian):
"""
Returns the electron spin resonances from the m_s = 0
the the m_s = +-1 states for all of the nuclear_states in
this NV center and a given hamiltonian.
"""
energy_transitions = []
for nucl_state in range(self.nitrogen_spin_op_dims):
for elec_state in [0, 2]:
psi_gs = qt.tensor(qt.basis(3,1), qt.basis(self.nitrogen_spin_op_dims,nucl_state))
psi_elec_spin = qt.tensor(qt.basis(3,elec_state), qt.basis(self.nitrogen_spin_op_dims,nucl_state))
gs_e = hamiltonian.matrix_element(psi_gs, psi_gs)
assert gs_e.imag == 0
elec_spin_e = hamiltonian.matrix_element(psi_elec_spin, psi_elec_spin)
assert elec_spin_e.imag == 0
energy_transitions.append(elec_spin_e.real - gs_e.real)
return energy_transitions

0 comments on commit c4bf6dc

Please sign in to comment.