qtdf 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qtdf-0.3.0/LICENSE +202 -0
- qtdf-0.3.0/NOTICE +11 -0
- qtdf-0.3.0/PKG-INFO +194 -0
- qtdf-0.3.0/README.md +175 -0
- qtdf-0.3.0/pyproject.toml +34 -0
- qtdf-0.3.0/qtdf/__init__.py +34 -0
- qtdf-0.3.0/qtdf/cli.py +217 -0
- qtdf-0.3.0/qtdf/core.py +151 -0
- qtdf-0.3.0/qtdf/demo.py +171 -0
- qtdf-0.3.0/qtdf/executive/__init__.py +24 -0
- qtdf-0.3.0/qtdf/executive/adapters.py +97 -0
- qtdf-0.3.0/qtdf/executive/backends.py +100 -0
- qtdf-0.3.0/qtdf/executive/plan.py +107 -0
- qtdf-0.3.0/qtdf/executive/run.py +152 -0
- qtdf-0.3.0/qtdf/store.py +124 -0
- qtdf-0.3.0/qtdf/touchstone.py +115 -0
- qtdf-0.3.0/qtdf/validate.py +199 -0
- qtdf-0.3.0/qtdf/vfridge/__init__.py +23 -0
- qtdf-0.3.0/qtdf/vfridge/measure.py +211 -0
- qtdf-0.3.0/qtdf/vfridge/wafer.py +253 -0
- qtdf-0.3.0/qtdf.egg-info/PKG-INFO +194 -0
- qtdf-0.3.0/qtdf.egg-info/SOURCES.txt +29 -0
- qtdf-0.3.0/qtdf.egg-info/dependency_links.txt +1 -0
- qtdf-0.3.0/qtdf.egg-info/entry_points.txt +2 -0
- qtdf-0.3.0/qtdf.egg-info/top_level.txt +1 -0
- qtdf-0.3.0/setup.cfg +4 -0
- qtdf-0.3.0/tests/test_cli.py +97 -0
- qtdf-0.3.0/tests/test_executive.py +155 -0
- qtdf-0.3.0/tests/test_qtdf.py +117 -0
- qtdf-0.3.0/tests/test_store_v02.py +140 -0
- qtdf-0.3.0/tests/test_vfridge.py +193 -0
qtdf-0.3.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
qtdf-0.3.0/NOTICE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
qtdf — Quantum Test Data Format and known-good-qubit test stack
|
|
2
|
+
Copyright 2026 Zubin Birnbach
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0.
|
|
5
|
+
|
|
6
|
+
Measured-data provenance: records with data_source "measured" produced by
|
|
7
|
+
ingest_ibm_snapshots.py derive from static calibration snapshots of IBM
|
|
8
|
+
Quantum devices bundled with the qiskit-ibm-runtime package (Apache-2.0,
|
|
9
|
+
(c) IBM). This repository ships the ingester, not the ingested data; run the
|
|
10
|
+
ingester to regenerate the fleet locally. IBM device names appear factually
|
|
11
|
+
as data provenance and imply no affiliation or endorsement.
|
qtdf-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: qtdf
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Quantum Test Data Format and the known-good-qubit test stack: schema, hashed store, cross-fridge test executive, virtual fridge, CLI. Zero dependencies.
|
|
5
|
+
Author-email: Zubin Birnbach <zubin.birnbach@yale.edu>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Keywords: quantum,qubit,test-data,known-good-die,yield,STDF,cryogenic
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
14
|
+
Requires-Python: >=3.10
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
License-File: NOTICE
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# QTDF — Quantum Test Data Format
|
|
21
|
+
|
|
22
|
+
An open, versioned record for qubit/device test data — the STDF analog for
|
|
23
|
+
quantum. This repo is the v0.1 reference: the spec, a zero-dependency Python
|
|
24
|
+
library, and the first real record (a full-wave RF launch qualification).
|
|
25
|
+
|
|
26
|
+
QTDF is the wedge in the "known-good-qubit" stack: free to adopt, works with any
|
|
27
|
+
fridge, and feeds the yield-learning / dispositioning layer above it. The cassette
|
|
28
|
+
makes the data better (automatic socket→device genealogy, a qualified RF
|
|
29
|
+
environment) but is never required — a hand-wired setup emits valid QTDF too.
|
|
30
|
+
|
|
31
|
+
## Layout
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
qtdf/
|
|
35
|
+
SCHEMA.md # the human-readable v0.2 spec (start here)
|
|
36
|
+
verify.sh # THE entry point: tests + store + demo, PASS/FAIL
|
|
37
|
+
AGENTS.md # guidance for AI agents (don't explore store/)
|
|
38
|
+
qtdf/ # everything importable lives under qtdf.*
|
|
39
|
+
core.py # schema version, canonical hashing, io, migration
|
|
40
|
+
validate.py # structural + semantic validator, quantity profiles
|
|
41
|
+
touchstone.py # minimal .s2p ingest + S-parameter helpers
|
|
42
|
+
store.py # append-only record store with index + query
|
|
43
|
+
cli.py / demo.py # the qtdf CLI and packaged end-to-end demo
|
|
44
|
+
vfridge/ # virtual fridge: wafer truth model + cooldown measurement
|
|
45
|
+
wafer.py # correlated variation, TLS bath, labeled defects
|
|
46
|
+
measure.py # cooldown fluctuation, meas noise, QTDF emission
|
|
47
|
+
executive/ # the cross-fridge test executive
|
|
48
|
+
plan.py # declarative JSON plans, content-hashed
|
|
49
|
+
adapters.py # CarrierProvider (cassette/manual), FridgeProfile
|
|
50
|
+
backends.py # vfridge + replay backends, capture I/O
|
|
51
|
+
run.py # execute/replay with deterministic record identity
|
|
52
|
+
disposition/ # specs + policies, priced exactly [commercial layer]
|
|
53
|
+
policy.py # Spec (a view over records), 5 screening policies
|
|
54
|
+
engine.py # multi-round evaluation vs truth, economics
|
|
55
|
+
analytics/ # the yield-learning layer [commercial layer]
|
|
56
|
+
wafermap.py # spatial yield from device.wafer coords
|
|
57
|
+
spc.py # x-bar control charts, drift detection
|
|
58
|
+
gauge.py # gauge R&R across fridges (%GRR, culprit)
|
|
59
|
+
mcm.py # P(module ok | dies): margins MC + collision rule
|
|
60
|
+
plans/ # versioned test plans (JSON)
|
|
61
|
+
captures/ # replayable run captures (generated)
|
|
62
|
+
seed_from_eng_rf_002.py # ingest the real ENG-RF-002 s2p -> record #1
|
|
63
|
+
ingest_ibm_snapshots.py # real IBM calibration snapshots -> store (needs venv)
|
|
64
|
+
calibrate_emulator.py # fit vfridge distributions to the measured fleet
|
|
65
|
+
fleet_report.py # fleet-level yield analytics over the store
|
|
66
|
+
phase2_demo.py # closed loop: emulated lot -> exact escape/overkill
|
|
67
|
+
records/ # record #1 standalone copy
|
|
68
|
+
store/ # measured fleet store: 3,649 records (generated)
|
|
69
|
+
truth/ # truth sidecars — NEVER inside a store
|
|
70
|
+
tests/ # 7 suites; each runs standalone
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Install
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install . # zero dependencies, Python 3.10+ (pkg 0.3.0, schema 0.2.0)
|
|
77
|
+
qtdf demo # the whole pipeline on a virtual lot, ~2 s
|
|
78
|
+
qtdf validate my_record.json # validate any QTDF record
|
|
79
|
+
qtdf show my_record.json # summary + hash verification
|
|
80
|
+
qtdf query store --verdict pass --count
|
|
81
|
+
qtdf verify store # re-hash every record
|
|
82
|
+
qtdf diff a.json b.json # semantic diff
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Quickstart (repo checkout)
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# core is stdlib only, Python 3.10+
|
|
89
|
+
python tests/test_qtdf.py # v0.1 invariants -> 7/7
|
|
90
|
+
python tests/test_store_v02.py # v0.2 store/profiles -> 7/7
|
|
91
|
+
python seed_from_eng_rf_002.py # record #1 from the openEMS result
|
|
92
|
+
|
|
93
|
+
# the real-data fleet (one-time venv for the ingester only)
|
|
94
|
+
python3 -m venv .venv && .venv/bin/pip install qiskit-ibm-runtime
|
|
95
|
+
.venv/bin/python ingest_ibm_snapshots.py # 3,648 real qubit records, 68 chips
|
|
96
|
+
python fleet_report.py # yield, T1/T2 stats, bin pareto
|
|
97
|
+
|
|
98
|
+
# the closed loop (no venv needed)
|
|
99
|
+
python calibrate_emulator.py # fit emulator to the measured fleet
|
|
100
|
+
python tests/test_vfridge.py # emulator invariants -> 9/9
|
|
101
|
+
python phase2_demo.py # exact escape/overkill vs truth
|
|
102
|
+
|
|
103
|
+
# the executive (no venv needed)
|
|
104
|
+
python tests/test_executive.py # plans, carriers, replay -> 7/7
|
|
105
|
+
python phase3_demo.py # cassette load -> capture -> replay
|
|
106
|
+
|
|
107
|
+
# the disposition engine
|
|
108
|
+
python tests/test_disposition.py # specs, policies, exact eval -> 8/8
|
|
109
|
+
python phase4_demo.py # 5 policies priced on one lot
|
|
110
|
+
|
|
111
|
+
# yield analytics + MCM scorer
|
|
112
|
+
python tests/test_analytics.py # maps, SPC, R&R, scorer -> 7/7
|
|
113
|
+
python phase5_demo.py # wafer map, drift, R&R, assembly
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
import qtdf
|
|
118
|
+
st = qtdf.Store("store")
|
|
119
|
+
st.count(record_type="qubit_coherence_screen", verdict="pass")
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Status
|
|
123
|
+
|
|
124
|
+
Phase 1 ✓ — QTDF v0.2, coherence vocabulary grounded on real measured IBM
|
|
125
|
+
calibration data (3,528 qubits, 67 chips), append-only store, quantity
|
|
126
|
+
profiles, wafer/run genealogy. v0.1 records load unchanged (tested).
|
|
127
|
+
|
|
128
|
+
Phase 2 ✓ — vfridge: virtual wafer with spatially-correlated variation, TLS
|
|
129
|
+
bath, labeled defects, calibrated against the measured fleet; cooldown
|
|
130
|
+
measurement with TLS-telegraph fluctuation + fit/shot noise; truth kept in a
|
|
131
|
+
sidecar the pipeline cannot see. The closed loop computes EXACT escape and
|
|
132
|
+
overkill for any screen policy. Byte-identical across processes
|
|
133
|
+
(golden-pinned); measurement noise is keyed per (cooldown, die, qubit) so
|
|
134
|
+
values are independent of batch composition — fair cross-policy comparison.
|
|
135
|
+
|
|
136
|
+
Phase 3 ✓ — qtdf-exec: declarative content-hashed JSON plans (hash stamped
|
|
137
|
+
into run.plan_hash), CarrierProvider adapters (cassette with per-die socket
|
|
138
|
+
assignment + capacity enforcement; manual as the degenerate case), swappable
|
|
139
|
+
measurement backends, and record/replay with deterministic identity
|
|
140
|
+
(record_id = uuid5(run_id, device_id)): a replayed capture reproduces the
|
|
141
|
+
live run byte-for-byte — verified down to file bytes in tests. Any captured
|
|
142
|
+
run, virtual today or a real fridge later, is a CI fixture.
|
|
143
|
+
|
|
144
|
+
Phase 4 ✓ — the disposition engine. Specs are frozen objects and disposition
|
|
145
|
+
is a VIEW: the engine re-bins stored measurement values under any spec
|
|
146
|
+
without remeasuring. Five screening policies (single-pass, best-of-N,
|
|
147
|
+
confirm-Nx, guard-band, gray-zone retest) evaluated multi-round through the
|
|
148
|
+
executive and priced exactly against truth. Demo lot at illustrative MCM
|
|
149
|
+
economics: confirm-2x wins ($105k) — retesting passers is cheap when the
|
|
150
|
+
pass population is small; best-of-2 is worst ($379k, adverse selection
|
|
151
|
+
quantified). Known gap (deliberate): Spec expresses per-qubit limits only;
|
|
152
|
+
die-level pairwise rules (freq_collision) belong to the Phase 5 MCM scorer.
|
|
153
|
+
|
|
154
|
+
Phase 5 ✓ — the yield-learning layer. Wafer maps from device.wafer coords
|
|
155
|
+
(dispositioned as a view, any spec). SPC x-bar charts: an injected 15% T1
|
|
156
|
+
process drift at lot 4 is flagged at exactly lots 4-6. Gauge R&R across
|
|
157
|
+
three virtual fridges with within-cooldown repeats (the emulator gained a
|
|
158
|
+
`repeat` axis: fit noise redraws, TLS telegraph stays fixed — across-cooldown
|
|
159
|
+
"repeats" would confound gauge noise with device telegraph) correctly
|
|
160
|
+
isolates the secretly-noisy fridge; fridge-to-fridge AV physically includes
|
|
161
|
+
per-cooldown telegraph. The MCM scorer answers the money question:
|
|
162
|
+
P(module meets spec | measured dies) = margin Monte Carlo x deterministic
|
|
163
|
+
interface-collision filter, with derating (screen at 140 us what must hold
|
|
164
|
+
110 us at operation). Demo: scorer-assembled modules predicted 0.94 ->
|
|
165
|
+
realized 2/2; random grouping predicted ~0 -> realized 0/2.
|
|
166
|
+
|
|
167
|
+
Phase 6 ✓ — packaging. `pip install` with zero dependencies; `qtdf` CLI
|
|
168
|
+
(validate / show / query / verify / diff / demo / version); `qtdf demo` runs
|
|
169
|
+
the entire pipeline — virtual lot -> executive screen -> wafer map -> policies
|
|
170
|
+
priced vs truth -> MCM assembly — self-contained (embedded plan) in ~2 s on a
|
|
171
|
+
clean machine. Verified: fresh venv, install, run from an unrelated cwd. The
|
|
172
|
+
demo's finale is the thesis in one line: from a 100-die lot with 7 true
|
|
173
|
+
MCM-grade dies, the best 3-die chain scores P(meets spec) = 0.10 — known-good-
|
|
174
|
+
die infrastructure is the difference between that and shipping modules.
|
|
175
|
+
|
|
176
|
+
Release pass (pkg 0.3.0, July 2026) ✓ — everything folded under the
|
|
177
|
+
`qtdf.*` namespace (imports changed, schema/records did not: schema stays
|
|
178
|
+
0.2.0 and v0.1/v0.2 records load unchanged); user paths scrubbed from all
|
|
179
|
+
shipped artifacts (record #1 re-finalized, store index rebuilt); Apache-2.0
|
|
180
|
+
LICENSE + NOTICE (with IBM data provenance); `verify.sh` single-command
|
|
181
|
+
verification; `AGENTS.md` so AI agents run instead of "architecting"; git +
|
|
182
|
+
CI (Linux/macOS × Python 3.10–3.14). Independent reproduction: confirmed
|
|
183
|
+
July 2026 on a non-macOS OS and non-3.14 Python (details to be recorded).
|
|
184
|
+
|
|
185
|
+
Deferred: JSON Schema export for other languages (first non-Python partner).
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
Apache-2.0 (see LICENSE, NOTICE) on this repository: the QTDF schema,
|
|
190
|
+
validator, store, executive, virtual fridge, and CLI — open because a test
|
|
191
|
+
-data standard is only useful if everyone can adopt it. The dispositioning
|
|
192
|
+
engine and yield analytics (`qtdf/disposition/`, `qtdf/analytics/`) are the
|
|
193
|
+
commercial layer and are not part of the public distribution; this working
|
|
194
|
+
repository contains them for development.
|
qtdf-0.3.0/README.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# QTDF — Quantum Test Data Format
|
|
2
|
+
|
|
3
|
+
An open, versioned record for qubit/device test data — the STDF analog for
|
|
4
|
+
quantum. This repo is the v0.1 reference: the spec, a zero-dependency Python
|
|
5
|
+
library, and the first real record (a full-wave RF launch qualification).
|
|
6
|
+
|
|
7
|
+
QTDF is the wedge in the "known-good-qubit" stack: free to adopt, works with any
|
|
8
|
+
fridge, and feeds the yield-learning / dispositioning layer above it. The cassette
|
|
9
|
+
makes the data better (automatic socket→device genealogy, a qualified RF
|
|
10
|
+
environment) but is never required — a hand-wired setup emits valid QTDF too.
|
|
11
|
+
|
|
12
|
+
## Layout
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
qtdf/
|
|
16
|
+
SCHEMA.md # the human-readable v0.2 spec (start here)
|
|
17
|
+
verify.sh # THE entry point: tests + store + demo, PASS/FAIL
|
|
18
|
+
AGENTS.md # guidance for AI agents (don't explore store/)
|
|
19
|
+
qtdf/ # everything importable lives under qtdf.*
|
|
20
|
+
core.py # schema version, canonical hashing, io, migration
|
|
21
|
+
validate.py # structural + semantic validator, quantity profiles
|
|
22
|
+
touchstone.py # minimal .s2p ingest + S-parameter helpers
|
|
23
|
+
store.py # append-only record store with index + query
|
|
24
|
+
cli.py / demo.py # the qtdf CLI and packaged end-to-end demo
|
|
25
|
+
vfridge/ # virtual fridge: wafer truth model + cooldown measurement
|
|
26
|
+
wafer.py # correlated variation, TLS bath, labeled defects
|
|
27
|
+
measure.py # cooldown fluctuation, meas noise, QTDF emission
|
|
28
|
+
executive/ # the cross-fridge test executive
|
|
29
|
+
plan.py # declarative JSON plans, content-hashed
|
|
30
|
+
adapters.py # CarrierProvider (cassette/manual), FridgeProfile
|
|
31
|
+
backends.py # vfridge + replay backends, capture I/O
|
|
32
|
+
run.py # execute/replay with deterministic record identity
|
|
33
|
+
disposition/ # specs + policies, priced exactly [commercial layer]
|
|
34
|
+
policy.py # Spec (a view over records), 5 screening policies
|
|
35
|
+
engine.py # multi-round evaluation vs truth, economics
|
|
36
|
+
analytics/ # the yield-learning layer [commercial layer]
|
|
37
|
+
wafermap.py # spatial yield from device.wafer coords
|
|
38
|
+
spc.py # x-bar control charts, drift detection
|
|
39
|
+
gauge.py # gauge R&R across fridges (%GRR, culprit)
|
|
40
|
+
mcm.py # P(module ok | dies): margins MC + collision rule
|
|
41
|
+
plans/ # versioned test plans (JSON)
|
|
42
|
+
captures/ # replayable run captures (generated)
|
|
43
|
+
seed_from_eng_rf_002.py # ingest the real ENG-RF-002 s2p -> record #1
|
|
44
|
+
ingest_ibm_snapshots.py # real IBM calibration snapshots -> store (needs venv)
|
|
45
|
+
calibrate_emulator.py # fit vfridge distributions to the measured fleet
|
|
46
|
+
fleet_report.py # fleet-level yield analytics over the store
|
|
47
|
+
phase2_demo.py # closed loop: emulated lot -> exact escape/overkill
|
|
48
|
+
records/ # record #1 standalone copy
|
|
49
|
+
store/ # measured fleet store: 3,649 records (generated)
|
|
50
|
+
truth/ # truth sidecars — NEVER inside a store
|
|
51
|
+
tests/ # 7 suites; each runs standalone
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install . # zero dependencies, Python 3.10+ (pkg 0.3.0, schema 0.2.0)
|
|
58
|
+
qtdf demo # the whole pipeline on a virtual lot, ~2 s
|
|
59
|
+
qtdf validate my_record.json # validate any QTDF record
|
|
60
|
+
qtdf show my_record.json # summary + hash verification
|
|
61
|
+
qtdf query store --verdict pass --count
|
|
62
|
+
qtdf verify store # re-hash every record
|
|
63
|
+
qtdf diff a.json b.json # semantic diff
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Quickstart (repo checkout)
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# core is stdlib only, Python 3.10+
|
|
70
|
+
python tests/test_qtdf.py # v0.1 invariants -> 7/7
|
|
71
|
+
python tests/test_store_v02.py # v0.2 store/profiles -> 7/7
|
|
72
|
+
python seed_from_eng_rf_002.py # record #1 from the openEMS result
|
|
73
|
+
|
|
74
|
+
# the real-data fleet (one-time venv for the ingester only)
|
|
75
|
+
python3 -m venv .venv && .venv/bin/pip install qiskit-ibm-runtime
|
|
76
|
+
.venv/bin/python ingest_ibm_snapshots.py # 3,648 real qubit records, 68 chips
|
|
77
|
+
python fleet_report.py # yield, T1/T2 stats, bin pareto
|
|
78
|
+
|
|
79
|
+
# the closed loop (no venv needed)
|
|
80
|
+
python calibrate_emulator.py # fit emulator to the measured fleet
|
|
81
|
+
python tests/test_vfridge.py # emulator invariants -> 9/9
|
|
82
|
+
python phase2_demo.py # exact escape/overkill vs truth
|
|
83
|
+
|
|
84
|
+
# the executive (no venv needed)
|
|
85
|
+
python tests/test_executive.py # plans, carriers, replay -> 7/7
|
|
86
|
+
python phase3_demo.py # cassette load -> capture -> replay
|
|
87
|
+
|
|
88
|
+
# the disposition engine
|
|
89
|
+
python tests/test_disposition.py # specs, policies, exact eval -> 8/8
|
|
90
|
+
python phase4_demo.py # 5 policies priced on one lot
|
|
91
|
+
|
|
92
|
+
# yield analytics + MCM scorer
|
|
93
|
+
python tests/test_analytics.py # maps, SPC, R&R, scorer -> 7/7
|
|
94
|
+
python phase5_demo.py # wafer map, drift, R&R, assembly
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
import qtdf
|
|
99
|
+
st = qtdf.Store("store")
|
|
100
|
+
st.count(record_type="qubit_coherence_screen", verdict="pass")
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Status
|
|
104
|
+
|
|
105
|
+
Phase 1 ✓ — QTDF v0.2, coherence vocabulary grounded on real measured IBM
|
|
106
|
+
calibration data (3,528 qubits, 67 chips), append-only store, quantity
|
|
107
|
+
profiles, wafer/run genealogy. v0.1 records load unchanged (tested).
|
|
108
|
+
|
|
109
|
+
Phase 2 ✓ — vfridge: virtual wafer with spatially-correlated variation, TLS
|
|
110
|
+
bath, labeled defects, calibrated against the measured fleet; cooldown
|
|
111
|
+
measurement with TLS-telegraph fluctuation + fit/shot noise; truth kept in a
|
|
112
|
+
sidecar the pipeline cannot see. The closed loop computes EXACT escape and
|
|
113
|
+
overkill for any screen policy. Byte-identical across processes
|
|
114
|
+
(golden-pinned); measurement noise is keyed per (cooldown, die, qubit) so
|
|
115
|
+
values are independent of batch composition — fair cross-policy comparison.
|
|
116
|
+
|
|
117
|
+
Phase 3 ✓ — qtdf-exec: declarative content-hashed JSON plans (hash stamped
|
|
118
|
+
into run.plan_hash), CarrierProvider adapters (cassette with per-die socket
|
|
119
|
+
assignment + capacity enforcement; manual as the degenerate case), swappable
|
|
120
|
+
measurement backends, and record/replay with deterministic identity
|
|
121
|
+
(record_id = uuid5(run_id, device_id)): a replayed capture reproduces the
|
|
122
|
+
live run byte-for-byte — verified down to file bytes in tests. Any captured
|
|
123
|
+
run, virtual today or a real fridge later, is a CI fixture.
|
|
124
|
+
|
|
125
|
+
Phase 4 ✓ — the disposition engine. Specs are frozen objects and disposition
|
|
126
|
+
is a VIEW: the engine re-bins stored measurement values under any spec
|
|
127
|
+
without remeasuring. Five screening policies (single-pass, best-of-N,
|
|
128
|
+
confirm-Nx, guard-band, gray-zone retest) evaluated multi-round through the
|
|
129
|
+
executive and priced exactly against truth. Demo lot at illustrative MCM
|
|
130
|
+
economics: confirm-2x wins ($105k) — retesting passers is cheap when the
|
|
131
|
+
pass population is small; best-of-2 is worst ($379k, adverse selection
|
|
132
|
+
quantified). Known gap (deliberate): Spec expresses per-qubit limits only;
|
|
133
|
+
die-level pairwise rules (freq_collision) belong to the Phase 5 MCM scorer.
|
|
134
|
+
|
|
135
|
+
Phase 5 ✓ — the yield-learning layer. Wafer maps from device.wafer coords
|
|
136
|
+
(dispositioned as a view, any spec). SPC x-bar charts: an injected 15% T1
|
|
137
|
+
process drift at lot 4 is flagged at exactly lots 4-6. Gauge R&R across
|
|
138
|
+
three virtual fridges with within-cooldown repeats (the emulator gained a
|
|
139
|
+
`repeat` axis: fit noise redraws, TLS telegraph stays fixed — across-cooldown
|
|
140
|
+
"repeats" would confound gauge noise with device telegraph) correctly
|
|
141
|
+
isolates the secretly-noisy fridge; fridge-to-fridge AV physically includes
|
|
142
|
+
per-cooldown telegraph. The MCM scorer answers the money question:
|
|
143
|
+
P(module meets spec | measured dies) = margin Monte Carlo x deterministic
|
|
144
|
+
interface-collision filter, with derating (screen at 140 us what must hold
|
|
145
|
+
110 us at operation). Demo: scorer-assembled modules predicted 0.94 ->
|
|
146
|
+
realized 2/2; random grouping predicted ~0 -> realized 0/2.
|
|
147
|
+
|
|
148
|
+
Phase 6 ✓ — packaging. `pip install` with zero dependencies; `qtdf` CLI
|
|
149
|
+
(validate / show / query / verify / diff / demo / version); `qtdf demo` runs
|
|
150
|
+
the entire pipeline — virtual lot -> executive screen -> wafer map -> policies
|
|
151
|
+
priced vs truth -> MCM assembly — self-contained (embedded plan) in ~2 s on a
|
|
152
|
+
clean machine. Verified: fresh venv, install, run from an unrelated cwd. The
|
|
153
|
+
demo's finale is the thesis in one line: from a 100-die lot with 7 true
|
|
154
|
+
MCM-grade dies, the best 3-die chain scores P(meets spec) = 0.10 — known-good-
|
|
155
|
+
die infrastructure is the difference between that and shipping modules.
|
|
156
|
+
|
|
157
|
+
Release pass (pkg 0.3.0, July 2026) ✓ — everything folded under the
|
|
158
|
+
`qtdf.*` namespace (imports changed, schema/records did not: schema stays
|
|
159
|
+
0.2.0 and v0.1/v0.2 records load unchanged); user paths scrubbed from all
|
|
160
|
+
shipped artifacts (record #1 re-finalized, store index rebuilt); Apache-2.0
|
|
161
|
+
LICENSE + NOTICE (with IBM data provenance); `verify.sh` single-command
|
|
162
|
+
verification; `AGENTS.md` so AI agents run instead of "architecting"; git +
|
|
163
|
+
CI (Linux/macOS × Python 3.10–3.14). Independent reproduction: confirmed
|
|
164
|
+
July 2026 on a non-macOS OS and non-3.14 Python (details to be recorded).
|
|
165
|
+
|
|
166
|
+
Deferred: JSON Schema export for other languages (first non-Python partner).
|
|
167
|
+
|
|
168
|
+
## License
|
|
169
|
+
|
|
170
|
+
Apache-2.0 (see LICENSE, NOTICE) on this repository: the QTDF schema,
|
|
171
|
+
validator, store, executive, virtual fridge, and CLI — open because a test
|
|
172
|
+
-data standard is only useful if everyone can adopt it. The dispositioning
|
|
173
|
+
engine and yield analytics (`qtdf/disposition/`, `qtdf/analytics/`) are the
|
|
174
|
+
commercial layer and are not part of the public distribution; this working
|
|
175
|
+
repository contains them for development.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "qtdf"
|
|
7
|
+
version = "0.3.0"
|
|
8
|
+
description = "Quantum Test Data Format and the known-good-qubit test stack: schema, hashed store, cross-fridge test executive, virtual fridge, CLI. Zero dependencies."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
|
+
authors = [{ name = "Zubin Birnbach", email = "zubin.birnbach@yale.edu" }]
|
|
13
|
+
keywords = ["quantum", "qubit", "test-data", "known-good-die", "yield", "STDF", "cryogenic"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Intended Audience :: Science/Research",
|
|
17
|
+
"License :: OSI Approved :: Apache Software License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
21
|
+
]
|
|
22
|
+
# Zero runtime dependencies — the whole stack is stdlib-only by design.
|
|
23
|
+
# (The IBM snapshot ingester needs qiskit-ibm-runtime; deliberately NOT a dep.)
|
|
24
|
+
dependencies = []
|
|
25
|
+
|
|
26
|
+
[project.scripts]
|
|
27
|
+
qtdf = "qtdf.cli:main"
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.packages.find]
|
|
30
|
+
include = ["qtdf*"]
|
|
31
|
+
|
|
32
|
+
# Package version (0.3.0) is decoupled from the QTDF SCHEMA version (0.2.0,
|
|
33
|
+
# qtdf.QTDF_VERSION): the 0.2->0.3 package bump is the qtdf.* namespace
|
|
34
|
+
# consolidation — imports changed, records did not.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""QTDF — Quantum Test Data Format (v0.1 reference implementation)."""
|
|
2
|
+
from .core import (
|
|
3
|
+
QTDF_VERSION,
|
|
4
|
+
content_hash,
|
|
5
|
+
finalize,
|
|
6
|
+
migrate,
|
|
7
|
+
new_record_id,
|
|
8
|
+
read_record,
|
|
9
|
+
utc_now,
|
|
10
|
+
verify_hash,
|
|
11
|
+
write_record,
|
|
12
|
+
)
|
|
13
|
+
from .store import Store
|
|
14
|
+
from .validate import errors_only, is_valid, validate
|
|
15
|
+
|
|
16
|
+
# package (distribution) version — distinct from QTDF_VERSION, the schema
|
|
17
|
+
# version stamped into records. 0.3.0 = the qtdf.* namespace consolidation.
|
|
18
|
+
__version__ = "0.3.0"
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"QTDF_VERSION",
|
|
22
|
+
"content_hash",
|
|
23
|
+
"finalize",
|
|
24
|
+
"migrate",
|
|
25
|
+
"new_record_id",
|
|
26
|
+
"read_record",
|
|
27
|
+
"utc_now",
|
|
28
|
+
"verify_hash",
|
|
29
|
+
"write_record",
|
|
30
|
+
"validate",
|
|
31
|
+
"errors_only",
|
|
32
|
+
"is_valid",
|
|
33
|
+
"Store",
|
|
34
|
+
]
|