dofile("../definitions.Quanty") -- define an Hamiltonian (in this case a magnetic field of 6 tesla in the z direction) H1 = 6 * EnergyUnits.Tesla.value * (2*OppSz + OppLz) -- define a second Hamiltonian (in this case a magnetic field of 6 tesla in the z direction) H2 = 6 * EnergyUnits.Tesla.value * (2*OppSz + OppLz) -- define a transition operator (in this case a pulsed magnetic field of 20 tesla in the x direction) T1 = 20 * EnergyUnits.Tesla.value * (2*OppSx + OppLx) -- define a ground-state (in this case a p electron with spin and angular momentum down) psigrd = psim1dn -- define a feritale operator to be able to calculate resonant spectroscopy T2 = (2*OppSy + OppLy) -- calculate < psigrd | T1^dag 1/(w1-i*G1/2+E0-H1^dag) T2^dag 1/(w2+i*G2/2+E0-H2) T2 1/(w1+i*G1/2+E0-H1) T1 | psigrd > -- with E0 = spec = CreateResonantSpectra(H1, H2, T1, T2, psigrd, {{"NE1",2} , {"NE2",10}}) -- the real and imaginary=0 part on a fixed energy grid print(spec)