open-standards/wai/wai-quantum-py/python/wai_quantum/static/widgets.css
Transaction Science 22fdc7a3cb wai-quantum-py: WAI Quantum in Python and notebooks, in-process
A new crate, wai/wai-quantum-py, built by maturin 1.15.0 into one abi3 wheel
per platform (pyo3 0.29.3, Python 3.9 on), module wai_quantum. Its extension
module wraps the shared job engine and nothing else: run, plan, lint, draw
(text and the engine SVG), layout, critique, improve, shortcuts,
equivalent, verify, seal, canonical, digest, methods, accuracy_classes and
history, values crossing one to one with JSON (NaN, integers past 64 bits
and non-string keys refused). A job is the service form as a plain dict
with helpers (counts, probabilities, expectations, amplitudes, method,
accuracy, receipt); Key reads and writes the command line key files and
finds the same user key; bloch gives each qubit reduced state from the
engine expectation values. A refusal raises EngineError with the engine
message, its line, and a code slot for the engine diagnostic codes.

Service is a client in the standard library alone for the job service
(submit, status, result, cancel, run), naming itself
wai-quantum-python/<version>, its receipts checked here offline.

Widgets (the widgets extra): Circuit (the engine drawing, gates clickable,
authorship marks from a history), Result, Receipt (the engine verdict) and
Bloch (drag to turn), each a plain ES module, each with static HTML (and
SVG) fallbacks that render without the widget library.

Five doc notebooks run in CI and are held to their stored outputs.
ci/check.sh is the whole check; 62 pytest tests hold the package to the
command line (same results, plans, lints, critiques, drawings, methods,
equivalence verdicts; receipts verified both ways; the same user key; the
digest recomputed from Python canonical bytes), to the service run locally,
and run the front ends under node on the payloads; Python 3.9 smoke with
the wheel alone. Workflow wai-quantum-py.yml runs it on linux and macos.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 19:51:08 -04:00

37 lines
2 KiB
CSS

/* The widgets' shared look: the notebook's own colours where it names them, plain
ones where it does not. */
.wq {
font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
font-size: 13px;
line-height: 1.45;
color: var(--jp-ui-font-color1, inherit);
border: 1px solid var(--jp-border-color2, rgba(127, 127, 127, 0.35));
border-radius: 8px;
padding: 10px 12px;
margin: 2px 0;
max-width: 100%;
}
.wq .wq-scroll { overflow-x: auto; }
.wq .wq-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.wq .wq-check { display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.wq .wq-muted { opacity: 0.7; }
.wq .wq-small { font-size: 11px; }
.wq .wq-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; fill: currentColor; }
.wq .wq-break { word-break: break-all; }
.wq .wq-line { margin-top: 6px; }
.wq .wq-num { width: 4.5em; }
.wq .wq-table { border-collapse: collapse; margin-top: 6px; }
.wq .wq-table th { text-align: left; padding: 1px 10px 1px 0; font-weight: 600; }
.wq .wq-table td { padding: 1px 10px 1px 0; }
.wq .wq-badge { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 600; color: #fff; }
.wq .wq-good { background: #10b981; }
.wq .wq-bad { background: #ef4444; }
.wq .wq-histogram text, .wq .wq-bloch text { fill: currentColor; }
.wq .wq-axis { font-size: 10px; opacity: 0.65; }
.wq .wq-title { font-size: 11px; font-weight: 600; }
.wq .wq-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; cursor: grab; touch-action: none; user-select: none; }
.wq .wq-bloch-cell { text-align: center; }
.wq .wq-pick { cursor: pointer; }
.wq .wq-selected .qc-box, .wq .wq-selected .qc-ring { stroke: #7aa0ff; stroke-width: 2.8; }
.wq .wq-unmarked .qc-item .qc-box, .wq .wq-unmarked .qc-item .qc-ring { stroke: currentColor; stroke-width: 1.3; stroke-dasharray: none; }
.wq .wq-unmarked .qc-item.qc-cond .qc-box, .wq .wq-unmarked .qc-cond .qc-box { stroke-dasharray: 3 2; }