UI speaks the field's language: precision correspondence + cost anchor
Browse files* Glossary precisionTarget: adds the documented-practice
correspondence (IBM Estimator `precision`, default 0.0156 ~ ±3.1pp
at 95% two-sided; Quantum Volume's 97.5% one-sided gate). Our 95%
two-sided Wilson semantics stay unchanged -- comment explains why
(system-wide convention; QV mapping documented in doc 1.2, no
convention switcher). Flows into the toolbar select tooltip, the
theater target tags and the tour TipIcon via the shared gloss.
* Evidence Theater (marker cost-anchor): under "evidence spent", a
secondary estimate line translating the run's wall-clock duration
into IBM pay-as-you-go dollars ($1.60/s) and percent of the Open
Plan's 10 min/28d grant, labeled "simulator wall-time as proxy;
hardware timing differs"; only rendered when a duration is known.
Bottom margin 66->80 to make room. Shorter twin appended to the
cost chip tooltip. Constants + source in lib/costModel.ts.
* Claims map: "grounded in:" mini-line per contribution group.
* Tour slide 3: "a precision target -- the same knob IBM's Estimator
API exposes -- turns optional stopping into a visual decision."
tsc + build (anon and default) + 86 backend tests + svg_paper /
difference_funnel / export_python node lanes green.
|
@@ -28,6 +28,10 @@ interface ClaimRow {
|
|
| 28 |
interface ClaimSection {
|
| 29 |
id: string;
|
| 30 |
label: string;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
rows: ClaimRow[];
|
| 32 |
}
|
| 33 |
|
|
@@ -35,6 +39,7 @@ const SECTIONS: ClaimSection[] = [
|
|
| 35 |
{
|
| 36 |
id: "C1",
|
| 37 |
label: "C1 — one funnel grammar, three scales (evidence steering)",
|
|
|
|
| 38 |
rows: [
|
| 39 |
{
|
| 40 |
claim: "Scale 1, within a run — the 95% interval narrows live; a precision target stops the run",
|
|
@@ -61,6 +66,8 @@ const SECTIONS: ClaimSection[] = [
|
|
| 61 |
{
|
| 62 |
id: "C2",
|
| 63 |
label: "C2 — stochastic-provenance substrate",
|
|
|
|
|
|
|
| 64 |
rows: [
|
| 65 |
{
|
| 66 |
claim: "Seeded replay — every run is archived with its root seed and replays bit-exactly",
|
|
@@ -82,6 +89,7 @@ const SECTIONS: ClaimSection[] = [
|
|
| 82 |
{
|
| 83 |
id: "C3",
|
| 84 |
label: "C3 — honesty devices",
|
|
|
|
| 85 |
rows: [
|
| 86 |
{
|
| 87 |
claim: "Honest comparison — intervals instead of scalars; overlap is called out as not-evidence",
|
|
@@ -169,6 +177,9 @@ export function ClaimsMapButton() {
|
|
| 169 |
className="pt-3 pb-1 text-[10px] uppercase tracking-wider text-accent"
|
| 170 |
>
|
| 171 |
{sec.label}
|
|
|
|
|
|
|
|
|
|
| 172 |
</td>
|
| 173 |
</tr>
|
| 174 |
{sec.rows.map((r) => (
|
|
|
|
| 28 |
interface ClaimSection {
|
| 29 |
id: string;
|
| 30 |
label: string;
|
| 31 |
+
/** Documented-practice grounding for the group — the corpus behind
|
| 32 |
+
* the claim (docs/EVIDENCE_WORKBENCH.md §1.2). One terse line;
|
| 33 |
+
* full citations live in the doc, not here. */
|
| 34 |
+
grounding: string;
|
| 35 |
rows: ClaimRow[];
|
| 36 |
}
|
| 37 |
|
|
|
|
| 39 |
{
|
| 40 |
id: "C1",
|
| 41 |
label: "C1 — one funnel grammar, three scales (evidence steering)",
|
| 42 |
+
grounding: "QV protocol · Estimator precision · iCANS/Rosalin",
|
| 43 |
rows: [
|
| 44 |
{
|
| 45 |
claim: "Scale 1, within a run — the 95% interval narrows live; a precision target stops the run",
|
|
|
|
| 66 |
{
|
| 67 |
id: "C2",
|
| 68 |
label: "C2 — stochastic-provenance substrate",
|
| 69 |
+
grounding:
|
| 70 |
+
"documented irreproducibility (Dasgupta & Humble; stochastic transpiler)",
|
| 71 |
rows: [
|
| 72 |
{
|
| 73 |
claim: "Seeded replay — every run is archived with its root seed and replays bit-exactly",
|
|
|
|
| 89 |
{
|
| 90 |
id: "C3",
|
| 91 |
label: "C3 — honesty devices",
|
| 92 |
+
grounding: "benchmark-lottery critique",
|
| 93 |
rows: [
|
| 94 |
{
|
| 95 |
claim: "Honest comparison — intervals instead of scalars; overlap is called out as not-evidence",
|
|
|
|
| 177 |
className="pt-3 pb-1 text-[10px] uppercase tracking-wider text-accent"
|
| 178 |
>
|
| 179 |
{sec.label}
|
| 180 |
+
<span className="block normal-case tracking-normal text-mute">
|
| 181 |
+
grounded in: {sec.grounding}
|
| 182 |
+
</span>
|
| 183 |
</td>
|
| 184 |
</tr>
|
| 185 |
{sec.rows.map((r) => (
|
|
@@ -97,6 +97,7 @@ import {
|
|
| 97 |
type PooledEvidence,
|
| 98 |
} from "../lib/stats";
|
| 99 |
import { hashHue, hueCss } from "../lib/hues";
|
|
|
|
| 100 |
import { GLOSSARY } from "../lib/glossary";
|
| 101 |
import { FigureExportButton } from "./FigureExportButton";
|
| 102 |
import { TipIcon } from "./TipIcon";
|
|
@@ -306,7 +307,7 @@ function tickStep(span: number): number {
|
|
| 306 |
// ---------------------------------------------------------------------------
|
| 307 |
|
| 308 |
const W = 1000;
|
| 309 |
-
const M = { l: 66, r: 208, t: 40, b:
|
| 310 |
|
| 311 |
/** Vertical label dodging for the right-margin readouts.
|
| 312 |
*
|
|
@@ -397,6 +398,7 @@ function Panel({
|
|
| 397 |
? (last.at - first.at) / 1000
|
| 398 |
: null;
|
| 399 |
const totalSeconds = s.serverSeconds ?? clientSpan;
|
|
|
|
| 400 |
|
| 401 |
const stopX = s.stoppedEarly && s.shotsExecuted != null ? x(s.shotsExecuted) : null;
|
| 402 |
const shotsSaved =
|
|
@@ -452,7 +454,7 @@ function Panel({
|
|
| 452 |
// and on a band shorter than the pile it lets the pile rise
|
| 453 |
// above the band top while KEEPING the separations, so labels
|
| 454 |
// never overprint and never loop. Multi-node panels (plotH ≈
|
| 455 |
-
//
|
| 456 |
// no target ⇒ 2 blocks; no archive pool ⇒ ≤ 2 blocks; both
|
| 457 |
// absent ⇒ the final readout alone, clamp-only.
|
| 458 |
//
|
|
@@ -680,6 +682,30 @@ function Panel({
|
|
| 680 |
{s.shotsRequested > (s.shotsExecuted ?? last.shots) ? ` of ${fmtShots(s.shotsRequested)}` : ""} shots
|
| 681 |
{totalSeconds != null ? ` · ${totalSeconds.toFixed(1)} s` : ""}
|
| 682 |
</text>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 683 |
</g>
|
| 684 |
);
|
| 685 |
}
|
|
|
|
| 97 |
type PooledEvidence,
|
| 98 |
} from "../lib/stats";
|
| 99 |
import { hashHue, hueCss } from "../lib/hues";
|
| 100 |
+
import { costAnchor } from "../lib/costModel";
|
| 101 |
import { GLOSSARY } from "../lib/glossary";
|
| 102 |
import { FigureExportButton } from "./FigureExportButton";
|
| 103 |
import { TipIcon } from "./TipIcon";
|
|
|
|
| 307 |
// ---------------------------------------------------------------------------
|
| 308 |
|
| 309 |
const W = 1000;
|
| 310 |
+
const M = { l: 66, r: 208, t: 40, b: 80 };
|
| 311 |
|
| 312 |
/** Vertical label dodging for the right-margin readouts.
|
| 313 |
*
|
|
|
|
| 398 |
? (last.at - first.at) / 1000
|
| 399 |
: null;
|
| 400 |
const totalSeconds = s.serverSeconds ?? clientSpan;
|
| 401 |
+
const anchor = costAnchor(totalSeconds);
|
| 402 |
|
| 403 |
const stopX = s.stoppedEarly && s.shotsExecuted != null ? x(s.shotsExecuted) : null;
|
| 404 |
const shotsSaved =
|
|
|
|
| 454 |
// and on a band shorter than the pile it lets the pile rise
|
| 455 |
// above the band top while KEEPING the separations, so labels
|
| 456 |
// never overprint and never loop. Multi-node panels (plotH ≈
|
| 457 |
+
// 130 px) fit the worst-case ~68 px pile with room to spare;
|
| 458 |
// no target ⇒ 2 blocks; no archive pool ⇒ ≤ 2 blocks; both
|
| 459 |
// absent ⇒ the final readout alone, clamp-only.
|
| 460 |
//
|
|
|
|
| 682 |
{s.shotsRequested > (s.shotsExecuted ?? last.shots) ? ` of ${fmtShots(s.shotsRequested)}` : ""} shots
|
| 683 |
{totalSeconds != null ? ` · ${totalSeconds.toFixed(1)} s` : ""}
|
| 684 |
</text>
|
| 685 |
+
|
| 686 |
+
{/* cost-anchor (marker: cost-anchor): the same duration in the
|
| 687 |
+
field's hard cost numbers — IBM Pay-As-You-Go $1.60/s and
|
| 688 |
+
the Open Plan's 10 min/28d grant (constants + source in
|
| 689 |
+
lib/costModel.ts; grounding: doc §1.2, T2). Honesty label
|
| 690 |
+
inline: the duration is SIMULATOR wall-time, a coarse proxy
|
| 691 |
+
— hardware timing differs. Rendered only when a duration is
|
| 692 |
+
actually known, so archived traces without timing show no
|
| 693 |
+
made-up price. */}
|
| 694 |
+
{anchor != null && (
|
| 695 |
+
<text
|
| 696 |
+
data-marker="cost-anchor"
|
| 697 |
+
x={M.l}
|
| 698 |
+
y={axisY + (gaps.length > 0 ? 73 : 58)}
|
| 699 |
+
fontSize={9}
|
| 700 |
+
fill="rgb(var(--color-mute))"
|
| 701 |
+
opacity={0.9}
|
| 702 |
+
>
|
| 703 |
+
on IBM pay-as-you-go this evidence ≈ {anchor.usd} (est. at
|
| 704 |
+
$1.60/s hardware time) · ≈{anchor.freeTierPct} of a free-tier
|
| 705 |
+
month (10 min/28d) — simulator wall-time as proxy; hardware
|
| 706 |
+
timing differs
|
| 707 |
+
</text>
|
| 708 |
+
)}
|
| 709 |
</g>
|
| 710 |
);
|
| 711 |
}
|
|
@@ -63,6 +63,7 @@ import {
|
|
| 63 |
import { GLOSSARY } from "../lib/glossary";
|
| 64 |
import { hashHue, hueCss } from "../lib/hues";
|
| 65 |
import {
|
|
|
|
| 66 |
estimatePipeline,
|
| 67 |
formatSeconds,
|
| 68 |
replicateExtraS,
|
|
@@ -230,6 +231,15 @@ export function FlowCanvas() {
|
|
| 230 |
`Estimated from ${costEst.sampleRuns} archived run(s) in this ` +
|
| 231 |
`browser's own run history — median duration per block kind, ` +
|
| 232 |
`cache hits excluded.`;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
if (unknownN > 0) {
|
| 234 |
title += ` No history yet for: ${costEst.unknownKinds.join(", ")}.`;
|
| 235 |
}
|
|
|
|
| 63 |
import { GLOSSARY } from "../lib/glossary";
|
| 64 |
import { hashHue, hueCss } from "../lib/hues";
|
| 65 |
import {
|
| 66 |
+
costAnchor,
|
| 67 |
estimatePipeline,
|
| 68 |
formatSeconds,
|
| 69 |
replicateExtraS,
|
|
|
|
| 231 |
`Estimated from ${costEst.sampleRuns} archived run(s) in this ` +
|
| 232 |
`browser's own run history — median duration per block kind, ` +
|
| 233 |
`cache hits excluded.`;
|
| 234 |
+
// cost-anchor, chip edition (shorter twin of the theater's line;
|
| 235 |
+
// constants + source in lib/costModel.ts, grounding: doc §1.2 T2).
|
| 236 |
+
const anchor = costAnchor(costEst.knownS);
|
| 237 |
+
if (anchor) {
|
| 238 |
+
title +=
|
| 239 |
+
` On IBM pay-as-you-go ≈ ${anchor.usd} (at $1.60/s) · ` +
|
| 240 |
+
`≈${anchor.freeTierPct} of a free-tier month (10 min/28d); ` +
|
| 241 |
+
`simulator wall-time as proxy — hardware timing differs.`;
|
| 242 |
+
}
|
| 243 |
if (unknownN > 0) {
|
| 244 |
title += ` No history yet for: ${costEst.unknownKinds.join(", ")}.`;
|
| 245 |
}
|
|
@@ -359,13 +359,13 @@ function EvidenceSlide() {
|
|
| 359 |
>
|
| 360 |
<p>
|
| 361 |
Inside a run (scale 1), the interval narrows as shot batches
|
| 362 |
-
stream in — the funnel.
|
| 363 |
<TipIcon
|
| 364 |
className="mx-0.5 align-text-top"
|
| 365 |
hint={gloss("precisionTarget")}
|
| 366 |
/>{" "}
|
| 367 |
-
|
| 368 |
-
replicates
|
| 369 |
<TipIcon className="mx-0.5 align-text-top" hint={gloss("replicate")} />{" "}
|
| 370 |
(scale 2), <span className="text-ink font-medium">This
|
| 371 |
configuration</span> becomes a lineage: hue = configuration
|
|
|
|
| 359 |
>
|
| 360 |
<p>
|
| 361 |
Inside a run (scale 1), the interval narrows as shot batches
|
| 362 |
+
stream in — the funnel. A precision target
|
| 363 |
<TipIcon
|
| 364 |
className="mx-0.5 align-text-top"
|
| 365 |
hint={gloss("precisionTarget")}
|
| 366 |
/>{" "}
|
| 367 |
+
— the same knob IBM's Estimator API exposes — turns optional
|
| 368 |
+
stopping into a visual decision. Across ×N replicates
|
| 369 |
<TipIcon className="mx-0.5 align-text-top" hint={gloss("replicate")} />{" "}
|
| 370 |
(scale 2), <span className="text-ink font-medium">This
|
| 371 |
configuration</span> becomes a lineage: hue = configuration
|
|
@@ -119,6 +119,39 @@ export function replicateExtraS(
|
|
| 119 |
return (n - 1) * stochasticS;
|
| 120 |
}
|
| 121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
/** "12s" / "3.4s" / "2m 05s" — compact duration for the toolbar chip. */
|
| 123 |
export function formatSeconds(s: number): string {
|
| 124 |
if (s >= 90) {
|
|
|
|
| 119 |
return (n - 1) * stochasticS;
|
| 120 |
}
|
| 121 |
|
| 122 |
+
// ---------------------------------------------------------------------------
|
| 123 |
+
// cost-anchor: translate wall-clock seconds into the field's hard cost
|
| 124 |
+
// numbers (docs/EVIDENCE_WORKBENCH.md §1.2, T2). Source: IBM Quantum
|
| 125 |
+
// plans docs (quantum.cloud.ibm.com/docs/en/guides/plans-overview):
|
| 126 |
+
// Pay-As-You-Go bills $1.60 per second of quantum hardware time; the
|
| 127 |
+
// Open Plan grants 10 minutes per 28-day window. The translation is a
|
| 128 |
+
// COARSE anchor, not a quote — callers feed it SIMULATOR wall-time as
|
| 129 |
+
// a proxy, and every surface that renders it must say so ("simulator
|
| 130 |
+
// wall-time as proxy; hardware timing differs").
|
| 131 |
+
// ---------------------------------------------------------------------------
|
| 132 |
+
|
| 133 |
+
export const IBM_USD_PER_SECOND = 1.6;
|
| 134 |
+
export const FREE_TIER_SECONDS = 600; // Open Plan: 10 min per 28 days
|
| 135 |
+
|
| 136 |
+
export interface CostAnchor {
|
| 137 |
+
/** "$5.12" — estimated pay-as-you-go price of this many seconds. */
|
| 138 |
+
usd: string;
|
| 139 |
+
/** "0.9%" (or "<0.1%") of the Open Plan's 10-minute monthly grant. */
|
| 140 |
+
freeTierPct: string;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
/** null when the duration is unknown or non-positive — the anchor is
|
| 144 |
+
* only shown when there is a real measured duration to translate. */
|
| 145 |
+
export function costAnchor(seconds: number | null | undefined): CostAnchor | null {
|
| 146 |
+
if (seconds == null || !Number.isFinite(seconds) || seconds <= 0) return null;
|
| 147 |
+
const usd = seconds * IBM_USD_PER_SECOND;
|
| 148 |
+
const pct = (seconds / FREE_TIER_SECONDS) * 100;
|
| 149 |
+
return {
|
| 150 |
+
usd: usd >= 0.005 ? `$${usd.toFixed(2)}` : "<$0.01",
|
| 151 |
+
freeTierPct: pct < 0.1 ? "<0.1%" : `${pct.toFixed(1)}%`,
|
| 152 |
+
};
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
/** "12s" / "3.4s" / "2m 05s" — compact duration for the toolbar chip. */
|
| 156 |
export function formatSeconds(s: number): string {
|
| 157 |
if (s >= 90) {
|
|
@@ -37,8 +37,16 @@ export const GLOSSARY = {
|
|
| 37 |
"Pruning = deleting parameters/operations that contribute little, producing a smaller circuit that is less exposed to noise.",
|
| 38 |
errorBound:
|
| 39 |
"Predicted upper limit on how much error today's machine noise adds to this circuit. Lower is better.",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
precisionTarget:
|
| 41 |
-
"Optional stopping rule: keep measuring in batches and stop as soon as the uncertainty interval is at most this wide (± percentage points). Because stopping depends on the data, interval coverage is approximate under early stopping.",
|
| 42 |
replicate:
|
| 43 |
"Replicate = run the identical configuration again with a fresh random draw. The spread across replicates is the real uncertainty.",
|
| 44 |
configuration:
|
|
|
|
| 37 |
"Pruning = deleting parameters/operations that contribute little, producing a smaller circuit that is less exposed to noise.",
|
| 38 |
errorBound:
|
| 39 |
"Predicted upper limit on how much error today's machine noise adds to this circuit. Lower is better.",
|
| 40 |
+
// Grounding note (evidence-grounding wave): the second sentence of
|
| 41 |
+
// the precisionTarget gloss cites the field's own precision knobs so
|
| 42 |
+
// the control speaks the practitioner's language. Our semantics stay
|
| 43 |
+
// a 95% TWO-SIDED Wilson interval — the system-wide convention every
|
| 44 |
+
// funnel, pooled band and difference interval shares — so we note the
|
| 45 |
+
// Quantum Volume correspondence (97.5% ONE-SIDED) without adding a
|
| 46 |
+
// convention switcher; the full mapping lives in
|
| 47 |
+
// docs/EVIDENCE_WORKBENCH.md §1.2 "Grounding in documented practice".
|
| 48 |
precisionTarget:
|
| 49 |
+
"Optional stopping rule: keep measuring in batches and stop as soon as the uncertainty interval is at most this wide (± percentage points). Because stopping depends on the data, interval coverage is approximate under early stopping. IBM's Estimator API exposes the same knob (`precision`, default 0.0156 \u2248 \u00b13.1pp at 95% two-sided); Quantum Volume gates decisions at a 97.5% one-sided interval \u2014 precision-gated evidence is codified practice, this control makes it visible and interactive.",
|
| 50 |
replicate:
|
| 51 |
"Replicate = run the identical configuration again with a fresh random draw. The spread across replicates is the real uncertainty.",
|
| 52 |
configuration:
|