SIMULATION PACKAGE (RIGOROUS, REPRODUCIBLE)

WHAT THIS DOES
- Stage A (QuTiP GKSL): simulates dephasing for a qubit and outputs |rho01(t)| for several Gamma.
- Stage B (1D PDE): integrates the C-field equation with a Gaussian source and logs snapshots and R_eff.
- All outputs go to ./sims_real/

FILES
- requirements.txt           -> pip dependencies
- stage_a_gksl.py            -> QuTiP simulation (writes CSV + PNG)
- stage_b_pde.py             -> PDE solver (writes CSV + PNG + params.json)
- run_all.sh                 -> convenience script to install & run both stages

HOW TO RUN (LOCAL OR COLAB)
1) Python 3.10+ recommended.
2) In a terminal:
   pip install -r requirements.txt
   python stage_a_gksl.py
   python stage_b_pde.py
3) Outputs are in sims_real/. Upload sims_real/*.png to Overleaf under a folder sims_real/.

LATEX INCLUSION
Add these blocks where appropriate:

\begin{figure}[t]
  \centering
  \includegraphics[width=.8\linewidth]{sims_real/fig2_coherence_vs_time.png}
  \caption{Stage A: coherence decay |\rho_{01}(t)| for several \(\Gamma\) (QuTiP).}
  \label{fig:coh_time}
\end{figure}

\begin{figure}[t]
  \centering
  \includegraphics[width=.8\linewidth]{sims_real/fig3_C_profiles.png}
  \caption{Stage B: coherence field profiles C(x,t) at representative snapshots.}
  \label{fig:C_profiles}
\end{figure}

\begin{figure}[t]
  \centering
  \includegraphics[width=.8\linewidth]{sims_real/fig4_R_eff_profile.png}
  \caption{Stage B: effective curvature profile R_{\text{eff}}(x) \(\propto \alpha\nabla^2 C\) at final time.}
  \label{fig:R_profile}
\end{figure}

DATA PROVENANCE
- stageA_coherence.csv  -> t, gamma, |rho01|
- stageB_C_profiles.csv -> t, x, C(x,t)
- params.json           -> domain, PDE params, timing, seed

RIGOR NOTES
- Deterministic seed for reproducibility.
- Explicit parameter logs (params.json).
- You can change parameters at the top of each script and re-run; filenames stay the same so LaTeX does not change.
