<jupyter_start><jupyter_text>HW 9.14:A redo opportunity, to get the full problem right and study this specific Hamiltonian.<jupyter_code>from qutip import *
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
Γ1 = 0.5
Γ2 = 0.25
α = 0.1 + 0.2j
H = Qobj([[Γ1, α, 0], [np.conj(α), Γ1, 0], [0, 0, Γ2]])
H
# Make sure this is Hermitian:
H.isherm
energies, [E1, E2, E3] = H.eigenstates()
energies
print(Γ2)
print(Γ1 + np.abs(α))
print(Γ1 - np.abs(α))<jupyter_output>0.25
0.72360679775
0.27639320225<jupyter_text>These agree with$\Gamma_2$ and $\Gamma_1 \pm |\alpha|$<jupyter_code>E1
E2
E3<jupyter_output><empty_output><jupyter_text>Now write the state $\big|a\big\rangle$ in terms of the energy eigenstates<jupyter_code>a = Qobj([[1],[0],[0]])
a
a.dag()*E1
a.dag()*E2
a.dag()*E3<jupyter_output><empty_output><jupyter_text>And write  $\big|b\big\rangle$ in terms of the energy eigenstates<jupyter_code>b = Qobj([[0],[1],[0]])
b.dag()*E1
b.dag()*E2
b.dag()*E3<jupyter_output><empty_output><jupyter_text>Solve for the time dynamics<jupyter_code>N = 100
T = 2*np.pi/np.abs(α)   # period of oscillation
tlist = np.linspace(0,T,N)
proj_b = b.dag()*b
solution = sesolve(H, a, tlist, proj_b)
plt.plot(tlist/T,solution.expect[0],".")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17061611374407584, 'fraction_numerical': 0.060821484992101105, 'mean_word_length': 6.0, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '359911', 'license': 'MIT', 'n_tokens_mistral': 611, 'n_tokens_neox': 579, 'n_words': 119, 'path': 'HW 9 Redo.ipynb', 'repo_name': 'Ashardalon125/Quantum-Resources', 'size': '1266'}