Skip to main content

QuantPlan

Migration Decision Stability under Joint Temporal and Operational Uncertainty

Measuring when migration decisions remain valid, and when they become invalid.

PyPI Version Python Zenodo DOI Figshare DOI OSF Preregistration Tests License: CC BY 4.0 License: MIT ORCID Status

Website · Paper (PDF) · LaTeX source · PyPI · Zenodo · Figshare · OSF · QuantGuard · ChronoCert


Contents


Overview

QuantPlan studies how stable migration decisions remain when the assumptions behind them change, with a specific focus on the post-quantum transition of PKI. It is the third paper in a research series:

# Paper Measures Identifier
1 QuantGuard (v0.2.0) The cost of migration: CPU, bytes, latency, QUIC, 0-RTT, hybrid security 10.5281/zenodo.24766430
2 ChronoCert (v0.1.0) The timing of migration: T_cert, Y_data, Mosca margin, chain analysis, sector classification 10.5281/zenodo.24852108
3 QuantPlan (v0.1.0) The stability of migration decisions under joint temporal and operational uncertainty 10.5281/zenodo.24856394

The series is independent, not layered: each paper stands on its own and cross-references the others by DOI only.

QuantPlan does not propose a new scheduling algorithm. It proposes a formal framework for testing whether a migration decision survives perturbation.

Central question

To what extent do migration decisions remain valid and stable when assumptions (X, Z, cost, dependencies) change?

Core contribution: Migration Decision Stability under Joint Temporal and Operational Uncertainty.

  • A migration-ordering method asks: what is the best migration order?
  • QuantPlan asks: does this order remain optimal when the data changes, and when does it become invalid?

Five foundational decisions

The framework is defined by five decisions, recorded in docs/decisions/log.md:

  1. Unified symbols: T_cert, Y_data, X, Z, and two margins (M_cert, M_refined).
  2. Refined identity condition: M_refined = min(client_trust_horizon, T_cert) − Z, which captures key continuity.
  3. Aleatory vs. epistemic uncertainty: natural randomness is separated from lack of knowledge.
  4. Six stability metrics: Kendall's τ, Top-k overlap, Decision Flip Probability, Expected Regret, Sensitivity Threshold, Value of Information.
  5. Four experiments: Nominal, Parameter, Joint, Comparative Grid.

Scope

In scope

  • Post-quantum migration decision stability.
  • Two margin formulations: classical M_cert and refined M_refined.
  • Aleatory and epistemic uncertainty, kept separate.
  • Six stability metrics.
  • Four experiments on synthetic assets (n = 10, seed 20261205).
  • Five publication figures.

Out of scope

  • Real-world validation on live TLS certificates (deferred to v0.2.0).
  • Figure 6, Value of Information (deferred).
  • Figure 7, Tranco Top 200 validation (deferred).
  • A new scheduling algorithm.
  • CRQC date forecasts (Z is a swept parameter).
  • Production deployment.

What is measured vs. what is claimed

Measured in v0.1.0

  • 10 synthetic assets generated with make_default_assets(n=10, seed=20261205).
  • Exp 1: nominal margins and ranking (10 assets).
  • Exp 2: parameter sensitivity for Z, X and T_cert (30 values each).
  • Exp 3: Monte Carlo (10,000 simulations).
  • Exp 4: comparative grid (20 × 20 = 400 cells over Z × X).
  • 107 automated tests passing.

Analytical (computed, not measured)

  • Pairwise ranking probabilities and instabilities (derived from Exp 3).
  • Sensitivity boundaries per asset (EXP4-SB-01).
  • All six stability metrics.

Not claimed

  • Real-world validation on live TLS certificates.
  • Value of Information (Figure 6, deferred).
  • Tranco Top 200 validation (Figure 7, deferred).
  • Production deployment or operational readiness.
  • CRQC date forecasts (Z is a swept parameter).

Key results

Across 400 grid cells (Z ∈ [5, 20], X ∈ [1, 10]) and 10,000 Monte Carlo simulations on 10 synthetic assets:

Result Value
Nominal ordering A10, A4, A7, A9, A1, A3, A5, A8, A6, A2
Assets exposed at the nominal point 8 of 10
Z sensitivity of τ No variation in [5, 20] (τ = 0.822)
X sensitivity of τ No variation in [1, 10] (τ = 0.867)
T_cert sensitivity of τ 0.689 → 0.822 (threshold at T_cert = 1.0)
Monte Carlo mean τ 0.751
Monte Carlo mean top-3 overlap 0.759
P(ranking unchanged) 0.0023 (0.23%)
Max pairwise instability 0.454 (between A7 and A9)
Ranking invariance within each model τ = 1.000 (all 400 grid cells)
Model disagreement on ranking 400 of 400 cells
Classification flips (classical) 889 / 4,000 (22.2%)
Classification flips (refined) 1,000 / 4,000 (25.0%)
Model disagreement on classification 1,937 / 4,000 (48.4%)

The central empirical claim: ranking stability and classification stability are distinct properties, and the choice of margin formulation matters for classification even when it does not matter for ranking.

Figures

All figures are stored in results/figures/.

Figure 1: Nominal margin comparison (classical vs. refined)

Figure 1: Nominal margin comparison

Figure 1. Nominal margin comparison. Each asset shows its classical margin M_cert and refined margin M_refined. The white marker is the minimum across all three margins (including M_data) and is the metric used for ranking. The horizontal dashed line is the exposure boundary M = 0. The ordering is A10, A4, A7, A9, A1, A3, A5, A8, A6, A2.

Figure 2: Sensitivity of Kendall's τ

Figure 2: Sensitivity of Kendall's tau

Figure 2. Sensitivity of Kendall's τ to Z (left), X (middle) and T_cert (right). The dashed green line marks τ = 0.8, the stability threshold. Z and X produced no variation in τ within the tested ranges; T_cert did vary τ and crossed the threshold at T_cert = 1.0.

Figure 3: Pairwise ranking probability matrix

Figure 3: Pairwise ranking probability matrix

Figure 3. Pairwise ranking probability matrix P_ij = P(A_i precedes A_j) across 10,000 Monte Carlo simulations. Blue means the row asset precedes the column asset; red means the column asset precedes the row asset; white is 0.5. The diagonal is 0.5 by convention.

Figure 4: Pairwise ranking instability

Figure 4: Pairwise ranking instability

Figure 4. Pairwise ranking instability F_ij = min(P_ij, P_ji) across the same simulations. Dark means stable preferences; yellow means maximum pairwise uncertainty. The maximum value is 0.454 (between A7 and A9). The pair (A2, A10) has instability close to 0.

Figure 5: Joint temporal-operational stability map

Figure 5: Joint temporal-operational stability map

Figure 5. Joint temporal-operational stability map. Panel A: classical Kendall's τ across the (Z, X) grid; the value is 1.000 in every cell. Panel B: refined Kendall's τ across the same grid; the value is 1.000 in every cell. Panel C1: exposed count per cell under the classical model (mean 7.56 of 10). Panel C2: exposed count per cell under the refined model (mean 7.60 of 10). Panel D: classification disagreement per cell (mean 4.84 of 10); across all cells and assets the disagreement rate is 48.4% (1,937 of 4,000 asset-cells).

Methodological choices

Assets

Parameter Value
Count 10 synthetic assets (A1 to A10)
Seed 20261205
Generator make_default_assets in src/quantplan/monte_carlo.py
T_cert range [1, 25] years
Y_data range [2, 25] years
X range [1, 10] years
Z range [5, 20] years
client_trust_horizon [0.6, 0.8] × T_cert

Statistical protocol

Step Method
Central tendency Median (not mean; heavy tail)
Rank correlation Kendall's τ (concordant/discordant pairs)
Monte Carlo 10,000 simulations with correlated draws (Gaussian copula)
Grid 20 × 20 = 400 cells
Seed Fixed (20261205) throughout

Experimental programme

Experiment Focus Sample Status
Exp 1 Nominal margins and ranking 10 assets ✅ Executed
Exp 2 Parameter sensitivity (Z, X, T_cert) 30 values per parameter ✅ Executed
Exp 3 Monte Carlo joint uncertainty 10,000 simulations ✅ Executed
Exp 4 Comparative grid (classical vs. refined) 400 cells × 2 models ✅ Executed
EXP4-SB-01 Per-asset sensitivity boundaries 10 assets × 2 models ✅ Executed

Reproducibility snapshot

Check Result
Test suite 107 / 107 passed
Figure scripts Deterministic (seed 20261205)
Paper PDF Generated from LaTeX source
DOI 10.5281/zenodo.24856394

Installation

Requires Python 3.10+.

From PyPI

pip install quantplan

From source (development)

git clone https://github.com/gitdeeper16/QuantPlan.git
cd QuantPlan
pip install -e ".[dev]"

Quickstart

from quantplan.mosca_stability import (
    mosca_margin,
    mosca_margin_refined,
    rank_assets,
    AssetRisk,
)

# 1. Classical Mosca margin
m_cert = mosca_margin(T_cert=8.0, X=2.0, Z=8.0)
print(f"M_cert = {m_cert:+.2f} years  (exposed = {m_cert < 0})")

# 2. Refined Mosca margin
m_ref = mosca_margin_refined(T_cert=8.0, X=2.0, Z=8.0, client_trust_horizon=5.0)
print(f"M_refined = {m_ref:+.2f} years")

# 3. Rank assets by min_margin
assets = [
    AssetRisk(name="A1", T_cert=8.0, Y_data=10.0, X=2.0, Z=8.0),
    AssetRisk(name="A2", T_cert=15.0, Y_data=20.0, X=2.0, Z=8.0),
]
ranking = rank_assets(assets)
print(f"Ranking: {ranking}")

Reproduce the experiments and figures

# Run all four experiments (deterministic)
PYTHONPATH=src python -c "from quantplan.experiments import run_all_experiments; run_all_experiments()"

# Regenerate Figures 1-5
PYTHONPATH=src python scripts/plot_all_figures.py
PYTHONPATH=src python scripts/plot_figure_5.py

# Sensitivity boundaries
PYTHONPATH=src python scripts/analyze_sensitivity.py
PYTHONPATH=src python scripts/plot_sensitivity_boundaries.py

Repository structure

QuantPlan/
├── README.md
├── CHANGELOG.md
├── CITATION.cff
├── LICENSE                      # CC-BY-4.0 docs, MIT code
├── AUTHORS.md
├── CONTRIBUTING.md
├── INSTALL.md
├── SECURITY.md
├── DEPLOY.md
├── NOTICE
├── pyproject.toml
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
├── .gitlab-ci.yml
├── .readthedocs.yaml
├── .pre-commit-config.yaml
├── upload_quantplan.py
│
├── docs/
│   ├── decisions/
│   │   └── log.md               # 5 foundational decisions
│   └── manuscript/
│       ├── QuantPlan_Research_Paper_v0.1.0.pdf
│       ├── section_7_results.md
│       └── tex/                 # LaTeX source (15 files)
│           ├── main.tex
│           ├── abstract.tex
│           ├── s1.tex ... s10.tex
│           ├── apps.tex
│           └── refs.tex
│
├── figures/
│   ├── conceptual/              # Conceptual figures
│   └── Figure_05b_Sensitivity_Boundaries_Per_Asset.png
│
├── results/
│   ├── exp1/                    # Nominal
│   ├── exp2/                    # Parameter sensitivity
│   ├── exp3/                    # Monte Carlo
│   ├── exp4/                    # Comparative grid + sensitivity
│   └── figures/                 # Figures 1-5 (PNG)
│
├── data/
│   └── artifacts/               # P.npy, F.npy, C1.npy, C2.npy, D.npy
│
├── src/quantplan/               # Python package (import name)
│   ├── __init__.py
│   ├── uncertainty.py           # Aleatory vs. epistemic
│   ├── metrics.py               # Six stability metrics
│   ├── mosca_stability.py       # M_cert, M_refined, ranking
│   ├── monte_carlo.py           # Monte Carlo engine
│   ├── experiments.py           # Exp 1-4
│   └── py.typed
│
├── scripts/
│   ├── plot_all_figures.py      # Figures 1-4
│   ├── plot_figure_5.py         # Figure 5 (multi-panel)
│   ├── analyze_sensitivity.py   # EXP4-SB-01
│   ├── plot_sensitivity_boundaries.py  # Figure 5b
│   ├── generate_figures.py
│   ├── digitize.py
│   └── figs_qp.py
│
└── tests/                       # 107 automated tests
    ├── test_uncertainty.py      # 26 tests
    ├── test_metrics.py          # 29 tests
    ├── test_mosca_stability.py  # 23 tests
    ├── test_monte_carlo.py      # 16 tests
    └── test_experiments.py      # 13 tests

This is a research framework with executed experiments and a paper. It is not a general-purpose PQC library.

Testing and verification

Element Status
Problem formulation ✅ Complete
Mathematical model ✅ Complete
Uncertainty modelling (aleatory vs. epistemic) ✅ Complete
Six stability metrics ✅ Complete
Exp 1 (Nominal) ✅ Executed
Exp 2 (Parameter sensitivity) ✅ Executed
Exp 3 (Monte Carlo, 10,000) ✅ Executed
Exp 4 (Comparative grid) ✅ Executed
Sensitivity boundaries (EXP4-SB-01) ✅ Executed
Automated tests ✅ 107 / 107 passed
Figures 1 to 5 ✅ Generated
Paper (PDF + LaTeX) ✅ Published
DOI ✅ 10.5281/zenodo.24856394
pytest tests/ -q
# 107 passed

What this repository does not claim

  • ✖ That real-world validation has been done (deferred to v0.2.0).
  • ✖ That Figure 6 (Value of Information) is finished (deferred).
  • ✖ That Figure 7 (Tranco Top 200) is finished (deferred).
  • ✖ That QuantPlan proposes a new scheduling algorithm.
  • ✖ A CRQC date forecast (Z is a swept parameter).
  • ✖ Production deployment or operational readiness.
  • ✖ A general-purpose PQC library.

Threats to validity

# Threat Description
T1 Synthetic assets 10 assets generated with a fixed seed; not real certificates.
T2 Fixed seed seed=20261205; different seeds may shift metrics marginally.
T3 Single-machine execution No replication on other hardware.
T4 No network-level measurement Model outputs only.
T5 Author-on-author reasoning The hypothesis and the protocol were written by the same author.
T6 Ranking invariance A mathematical property of the tested formulation, not a universal empirical fact.
T7 Deferred validations Real-world validation, Figure 6 and Figure 7 are v0.2.0 targets.
Area References Role
Post-quantum cryptography Shor (1994); NIST FIPS 203/204/205 Primitive background
Mosca margin Mosca (2018); Mosca & Piani (2024) Migration timing
Harvest-now-decrypt-later Mosca (2018); NIST IR 8547 Threat framing
Constraint-aware PQC migration GridPQC-Graph (Springer, 2026) Prior work
Supported is not protected ePrint 2026/2318 (Fall, 2026) Prior work
Migration methodology ETSI TR 104 016 Standards
Uncertainty quantification Monte Carlo methods Methodology
Rank correlation Kendall's τ Metric

Citation

Machine-readable metadata is in CITATION.cff.

APA

Baladi, S. (2026). QuantPlan: Migration Decision Stability under Joint Temporal and Operational Uncertainty (Version 0.1.0). Zenodo. https://doi.org/10.5281/zenodo.24856394

Alternative DOI (Figshare): https://doi.org/10.6084/m9.figshare.35233930 OSF preregistration: https://doi.org/10.17605/OSF.IO/NMFH3

BibTeX (paper)
@misc{baladi2026quantplan,
  author    = {Baladi, Samir},
  title     = {QuantPlan: Migration Decision Stability under Joint Temporal and Operational Uncertainty},
  year      = {2026},
  version   = {0.1.0},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.24856394},
  url       = {https://doi.org/10.5281/zenodo.24856394},
  note      = {Third paper in the PQC migration series. QuantGuard: 10.5281/zenodo.24766430. ChronoCert: 10.5281/zenodo.24852108. Alternative DOI (Figshare): 10.6084/m9.figshare.35233930. OSF Preregistration: 10.17605/OSF.IO/NMFH3}
}
BibTeX (Python package)
@misc{baladi2026quantplan_pypi,
  author       = {Baladi, Samir},
  title        = {{quantplan}: Python Package for QuantPlan},
  year         = {2026},
  month        = dec,
  howpublished = {Python Package Index (PyPI)},
  url          = {https://pypi.org/project/quantplan/},
  note         = {Install: pip install quantplan. Import name: quantplan. MIT License.}
}

Related identifiers

Resource Identifier Type
Zenodo (QuantPlan) 10.5281/zenodo.24856394 DOI
Figshare (QuantPlan) 10.6084/m9.figshare.35233930 DOI
OSF preregistration 10.17605/OSF.IO/NMFH3 DOI
Zenodo (ChronoCert) 10.5281/zenodo.24852108 DOI
Zenodo (QuantGuard) 10.5281/zenodo.24766430 DOI
PyPI quantplan Package
ORCID 0009-0003-8903-0029 ORCID

Author

Samir Baladi, Interdisciplinary AI Researcher, Ronin Institute / Rite of Renaissance

Email gitdeeper@gmail.com
ORCID 0009-0003-8903-0029
Website quantplan.netlify.app
Mirrors GitHub · GitLab · Gitea · Codeberg · Bitbucket

License

Documentation and papers: CC BY 4.0. Code: MIT (see LICENSE).


QuantPlan v0.1.0: migration decision stability under joint temporal and operational uncertainty.

© 2026 Samir Baladi · Ronin Institute / Rite of Renaissance

DOI: 10.5281/zenodo.24856394 · Figshare: 10.6084/m9.figshare.35233930 · OSF: 10.17605/OSF.IO/NMFH3 · PyPI: quantplan · ORCID: 0009-0003-8903-0029

Metadata

Release files for quantplan 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quantplan 0.1.0
File Size Uploaded Provenance Actions
quantplan-0.1.0.tar.gz 36.2 kB Without provenance Details for quantplan-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for quantplan 0.1.0
File Interpreter ABI Platform Actions
quantplan-0.1.0-py3-none-any.whl Python 3 none any Details for quantplan-0.1.0-py3-none-any.whl

Total release size: 64.0 kB

Release files / quantplan-0.1.0.tar.gz

Download URL quantplan-0.1.0.tar.gz
Size 36.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0627579464a59978aa3ad0d330dbfd7409a863321e7352a8a17af51a39d3c4be
BLAKE2b-256 checksum
How to use checksums
3247ef7354e77b25e614eb28fc1b3949550565846e78ce79b0d222aea224e323
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via QuantPlan-Uploader/0.1.0

Release files / quantplan-0.1.0-py3-none-any.whl

Download URL quantplan-0.1.0-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbe9eb8a7cc03f58183f6ce12ad9263c36558ae4aedf15b22f8db5cb151a1f02
BLAKE2b-256 checksum
How to use checksums
af5c8422f862047b7fe19f3811390714f0467786efc9f86b2cc75a6c397aa137
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via QuantPlan-Uploader/0.1.0

Security for quantplan 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page