Python scripts for generating, converting, and analyzing the circuits and results used around
the Rust puremagic/transpile/compile_cliffordt pipeline. Everything here is a standalone
script (run with -h/--help for its options); shared logic lives in the *_common.py modules
they import. Generated *.png/*.out files in this directory are gitignored, not tracked.
compile_cliffordt.py-- Compiles an arbitrary OpenQASM circuit to the Clifford+T gate set via Qiskit or bqskit (--backend). Deliberately naive (no exact-rewrite optimization), kept as a baseline to compare against the Rustcompile_cliffordtbinary described in the top-level README.
generate_rnd_layout.py-- Generates random sequences of Pauli products directly in.transformat, for scheduler testing without a full compile pipeline.convert_lss_to_qasm.py/convert_lss_to_trans.py-- Convert the verbose "LSS" rotation/measurement format (e.g. fromdata/lssp-data-silva-et-al/) to OpenQASM 2 or directly to.trans. Shared parsing lives inlss_common.py.remove_y_gates.py-- Rewritesygates out of a Clifford+T circuit, needed because wisq's GUOQ optimizer backend can't process them.
flasq_lower_bound.py-- Computes the FLASQ conservative and optimistic spacetime-volume estimates (Huggins et al., arXiv:2511.08508) for a Clifford+T circuit in OpenQASM 2 format. The cultivation volume per T state comes fromcultivation_model.py: FLASQ's own definition by default, or a whole patch for the mean cultivation time with--whole-patch.dascot_qubit_count.py-- Computes the total logical qubits required by the DASCOT Square Sparse and Compact architectures for a given number of data qubits.mcmc_cultivation.py-- MCMC simulation of the magic-state cultivation time distribution (survival fractions from Gidney et al.).analyze_wisq.py-- Counts steps and IDs (total and per-step average) in wisq JSON output.
plot_puremagic.py-- The unifiedpuremagicresults plotter; readspuremagicstdout logs and plots scheduling metrics (efficiency, volume, lcycles, ...) against a chosen x-axis.plot_all.shdrives it across the standard set of comparison plots.plot_cultivation_dist.py-- Plots cultivation-time distributions from one or more directories'*.cultivation_distfiles.plot_volume_vs_layers.py-- Plots scheduled volume vs. pre-scheduling DAG layer count across a max-weight sweep (out-pm-trans0..out-pm-transN), one point per (circuit, weight).circuit_table.py-- Generates a LaTeX table of circuit statistics from QASM files.scheduling_table.py-- Generates a LaTeX table comparing two scheduling results.table_common.py-- Shared LaTeX table helpers forcircuit_table.py/scheduling_table.py.puremagic_log.py-- Regex patterns shared by the scripts that parsepuremagicstdout (plot_puremagic.py,scheduling_table.py,circuit_table.py).