Ramsey Interferometry Quantum Sensor Simulator

This simulator reproduces the actual pulse sequence behind atomic clocks and quantum magnetometers: a π/2 pulse prepares a qubit in superposition, a real free-evolution time T lets it accumulate phase φ = ΔT proportional to the field being sensed, and a closing π/2 pulse reads that phase out as the Ramsey fringe P = cos²(φ/2). Sweep the detuning and evolution time to watch the fringes emerge, tune the coherence time T2 to see real decoherence erode the contrast, and increase the number of repetitions N to watch shot noise shrink as the standard quantum limit 1/√N predicts.