Metadata-Version: 2.4
Name: rozier-quantum
Version: 1.3.0
Summary: Structural diagnostic reader for multi-chip quantum computing systems
Author-email: Rozier Quantum LLC <contact@rozierquantum.com>
License: Proprietary
Project-URL: Homepage, https://rozierquantum.com
Project-URL: GitHub, https://github.com/catrozier08-gif
Keywords: quantum computing,qubit placement,quantum diagnostics,multi-chip quantum,quantum hardware,qiskit
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: qiskit>=1.0.0
Requires-Dist: networkx>=3.0
Requires-Dist: numpy>=1.24
Provides-Extra: server
Requires-Dist: fastapi>=0.110.0; extra == "server"
Requires-Dist: uvicorn>=0.29.0; extra == "server"
Requires-Dist: python-multipart>=0.0.9; extra == "server"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: httpx>=0.27; extra == "dev"

# Rozier Quantum — SystemReader

**Structural diagnostic tool for multi-chip quantum computing systems.**

Reads, names, diagnoses, and prescribes for any quantum topology —
in seconds, at scale.

---

## What It Does

SystemReader works like an OBD2 scanner for quantum hardware.
Plug it into any circuit and topology, and it tells you:

- **What shape** the workload has and whether it matches the hardware
- **Where the stress is** — which links, which qubits, which corridors
- **Which qubits are at risk** — overloaded, decoherence-exposed, isolated
- **What to do about it** — structural prescription before you commit
  to expensive compilation or optimization

It does this for 100,000 qubits across a 200-chip system in **under 5 seconds.**

---

## Quick Start

```bash
pip install rozier-quantum

from rozier import SystemReader, build_line_topology
from qiskit import QuantumCircuit
import random

# Build a test circuit
qc = QuantumCircuit(1000)
random.seed(0)
for _ in range(5000):
    q1, q2 = random.sample(range(1000), 2)
    qc.cx(q1, q2)

# Build topology
topology = build_line_topology(num_chips=8, qubits_per_chip=127)

# Read the system
reader = SystemReader(topology)
print(reader.generate_report(qc))

Scale Benchmark
Qubits	Gates	Chips	Time
1,000	5,000	8	<0.1s
10,000	50,000	20	~0.4s
100,000	200,000	200	~4.5s
Tested on standard cloud hardware. No GPU required.

Vendor Support
SystemReader speaks the language of your platform:
from rozier import export_markdown

# IBM-specific terminology and baseline thresholds
export_markdown(report, "report.md", vendor="ibm")

# Also supported: google, ionq, rigetti, generic
Supported platforms:

Vendor	Topology	Terminology
IBM Quantum	Heavy-Hex	Qiskit native
Google Quantum AI	Sycamore	Cirq compatible
IonQ	All-to-all / Trapped ion	Native gate sets
Rigetti	Aspen	PyQuil compatible
Rozier Quantum	
Report Output
Every analysis produces:

Structural Diagnosis
Alignment:          hub_on_sparse_topology
Stress Risk:        HIGH
Recommended Action: placement_required
Confidence:         high (1.0)

Qubit Health Scan
Scanned: 100,000 qubits
Healthy:  61,432  |  Warning: 28,901  |  Critical: 9,667
Q-001 Overloaded:            9,667
Q-002 Decoherence Risk:     38,421
Q-003 Entanglement Isolation: 891

Corridor Load Map
C0 ══[0.48 HOT]══ C1 ──[0.21 MOD]── C2 ──[0.11 LTE]── C3

Exportable Reports
export_json(report, "analysis.json", vendor="ibm")
export_markdown(report, "analysis.md", vendor="ibm")

Clinical Cycle — Pre/Post Treatment
# Full read -> treat -> assess loop
result = reader.run_clinical_cycle(circuit)

# Returns pre and post qubit health differential:
#   Improved:  1,204 qubits
#   Regressed: 87 qubits
#   Net:       +1,117

Architecture
SystemReader
    PerceptionEngine     — shape classification
    DiagnosisEngine      — stress, corridor, concurrency projection
    QubitHealthScanner   — per-qubit OBD2 health codes
    PathMapper           — interaction path visualization
    StablePlacementOptimizer — structural treatment

About
Built by Rozier Quantum LLC

Founder background: union carpenter, lead layout operator,
systems thinker. The same intuition that finds a moved control
point on a construction site finds a decoherence bottleneck
in a quantum topology.

.

rozierquantum.com |
contact@rozierquantum.com

"Read the system before you run the system."

---

## Step 3 — `demo.py`

One file anyone can download and run without installing anything except dependencies. This is what you attach to an email or link from your website:

```python
# demo.py
# =========================================================
# ROZIER QUANTUM — SystemReader Demo
#
# Run this file to see a full structural analysis of a
# simulated quantum workload.
#
# Requirements:
#   pip install rozier-quantum
#
# Usage:
#   python demo.py
#   python demo.py --qubits 1000 --depth 5000 --chips 8
#   python demo.py --vendor ibm --export
#
# rozierquantum.com
# =========================================================

import argparse
import time
import random
from qiskit import QuantumCircuit


def parse_args():
    parser = argparse.ArgumentParser(
        description="Rozier Quantum SystemReader Demo",
        formatter_class=argparse.RawDescriptionHelpFormatter,
        epilog="""
Examples:
  python demo.py
  python demo.py --qubits 1000 --depth 5000 --chips 8
  python demo.py --vendor ibm --export
  python demo.py --qubits 10000 --depth 50000 --chips 20 --vendor ibm --export
        """
    )
    parser.add_argument(
        "--qubits", type=int, default=500,
        help="Number of qubits (default: 500)"
    )
    parser.add_argument(
        "--depth", type=int, default=2000,
        help="Circuit depth / gate count (default: 2000)"
    )
    parser.add_argument(
        "--chips", type=int, default=4,
        help="Number of chips in topology (default: 4)"
    )
    parser.add_argument(
        "--qubits-per-chip", type=int, default=None,
        help="Qubits per chip (default: qubits / chips)"
    )
    parser.add_argument(
        "--vendor", type=str, default="generic",
        choices=["ibm", "google", "ionq", "rigetti", "rozier", "generic"],
        help="Vendor profile for report terminology (default: generic)"
    )
    parser.add_argument(
        "--seed", type=int, default=42,
        help="Random seed for reproducibility (default: 42)"
    )
    parser.add_argument(
        "--export", action="store_true",
        help="Export JSON and Markdown reports"
    )
    parser.add_argument(
        "--clinical", action="store_true",
        help="Run full clinical cycle (includes optimization)"
    )
    return parser.parse_args()


def build_circuit(num_qubits, depth, seed):
    """Builds a random two-qubit gate circuit."""
    random.seed(seed)
    qc = QuantumCircuit(num_qubits)
    for _ in range(depth):
        q1, q2 = random.sample(range(num_qubits), 2)
        qc.cx(q1, q2)
    return qc


def main():
    args = parse_args()

    # Resolve qubits per chip
    qpc = args.qubits_per_chip or max(1, args.qubits // args.chips)

    print()
    print("=" * 56)
    print("  ROZIER QUANTUM — SystemReader")
    print("  rozierquantum.com")
    print("=" * 56)
    print()
    print(f"  Qubits:          {args.qubits:,}")
    print(f"  Gate depth:      {args.depth:,}")
    print(f"  Chips:           {args.chips}")
    print(f"  Qubits/chip:     {qpc}")
    print(f"  Vendor profile:  {args.vendor}")
    print(f"  Seed:            {args.seed}")
    print()

    # --- Imports ---
    try:
        from rozier import SystemReader, build_line_topology
        from rozier import list_vendors
    except ImportError:
        print("ERROR: rozier-quantum not installed.")
        print("  pip install rozier-quantum")
        return

    # --- Build ---
    print("Building circuit...")
    t0 = time.time()
    circuit = build_circuit(args.qubits, args.depth, args.seed)
    t1 = time.time()
    print(f"  Done in {t1-t0:.2f}s")
    print()

    topology = build_line_topology(
        num_chips=args.chips,
        qubits_per_chip=qpc
    )

    reader = SystemReader(topology)

    # --- Analysis ---
    print("Running structural analysis...")
    t2 = time.time()
    report = reader.prescribe(circuit)
    t3 = time.time()

    print(f"  Done in {t3-t2:.3f}s")
    print()

    # --- Report ---
    print(reader.generate_report(circuit))

    # --- Export ---
    if args.export:
        from rozier import export_json, export_markdown

        json_path = f"rozier_report_{args.qubits}q_{args.vendor}.json"
        md_path   = f"rozier_report_{args.qubits}q_{args.vendor}.md"

        export_json(
            report,
            json_path,
            vendor=args.vendor
        )
        export_markdown(
            report,
            md_path,
            vendor=args.vendor,
            circuit_name=(
                f"{args.qubits:,} Qubit / "
                f"{args.depth:,} Gate Demo Circuit"
            ),
            max_flagged_qubits=15,
        )
        print()
        print(f"Reports saved:")
        print(f"  {json_path}")
        print(f"  {md_path}")

    # --- Clinical Cycle ---
    if args.clinical:
        print()
        print("Running clinical cycle (optimization included)...")
        result = reader.run_clinical_cycle(circuit)

    print()
    print("=" * 56)
    print("  Analysis complete.")
    print("  rozierquantum.com | contact@rozierquantum.com")
    print("=" * 56)
    print()


if __name__ == "__main__":
    main()
        
