Wonderful work!
I’d like to explore the Lindblad equation you implemented a bit further. In your code the T₁, T_φ and T₂ channels all behave as expected—especially the T₂ channel, which visibly shrinks the Bloch-vector projection in the xy-plane. However, in real experiments we can interrupt pure T₂ decay by applying a π-pulse that flips the spin; the subsequent “time-reversed” precession refocuses the dephasing and the original Bloch-vector length is recovered. This Hahn echo is a work-horse technique across many experimental platforms.
At the moment your Lindblad solver does not seem to capture this effect: even if I explicitly insert a π-pulse into the Hamiltonian, the coherence still decays monotonically and no echo appears. Could you suggest a way to modify the simulation so that a Hahn echo can be reproduced? Thank you very much!