Release QAdapt v1 with paired Ising-fast baseline
Browse files- .gitattributes +5 -34
- LICENSE +203 -0
- NOTICE +422 -0
- README.md +237 -0
- REPRODUCTION_VALIDATION.json +180 -0
- SHA256SUMS +8 -0
- assets/figure2_qadapt_pipeline.png +3 -0
- assets/figure3_htnet_architecture.png +3 -0
- assets/figure5_synthetic_ood.png +3 -0
- assets/figure6_willow_results.png +3 -0
- baselines/ising-fast-t0-e100/config.json +16 -0
- baselines/ising-fast-t0-e100/model.safetensors +3 -0
- config.json +27 -0
- configs/config_qadapt_t0_base.yaml +40 -0
- configs/config_qadapt_t1_meas_1p5.yaml +40 -0
- configs/config_qadapt_t2_cnot_1p5.yaml +40 -0
- configs/config_qadapt_t3_idle_1p5.yaml +40 -0
- configs/config_qadapt_t4_z_bias_1p5.yaml +40 -0
- evaluation.json +97 -0
- examples/infer_ood.py +123 -0
- examples/infer_t0_t4.py +109 -0
- examples/infer_willow.py +115 -0
- model.safetensors +3 -0
- qadapt-minimal.patch +0 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,6 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
|
| 3 |
+
assets/figure2_qadapt_pipeline.png filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
assets/figure3_htnet_architecture.png filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
assets/figure5_synthetic_ood.png filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
assets/figure6_willow_results.png filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LICENSE
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
|
| 3 |
+
Apache License
|
| 4 |
+
Version 2.0, January 2004
|
| 5 |
+
http://www.apache.org/licenses/
|
| 6 |
+
|
| 7 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 8 |
+
|
| 9 |
+
1. Definitions.
|
| 10 |
+
|
| 11 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 12 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 13 |
+
|
| 14 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 15 |
+
the copyright owner that is granting the License.
|
| 16 |
+
|
| 17 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 18 |
+
other entities that control, are controlled by, or are under common
|
| 19 |
+
control with that entity. For the purposes of this definition,
|
| 20 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 21 |
+
direction or management of such entity, whether by contract or
|
| 22 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 23 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 24 |
+
|
| 25 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 26 |
+
exercising permissions granted by this License.
|
| 27 |
+
|
| 28 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 29 |
+
including but not limited to software source code, documentation
|
| 30 |
+
source, and configuration files.
|
| 31 |
+
|
| 32 |
+
"Object" form shall mean any form resulting from mechanical
|
| 33 |
+
transformation or translation of a Source form, including but
|
| 34 |
+
not limited to compiled object code, generated documentation,
|
| 35 |
+
and conversions to other media types.
|
| 36 |
+
|
| 37 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 38 |
+
Object form, made available under the License, as indicated by a
|
| 39 |
+
copyright notice that is included in or attached to the work
|
| 40 |
+
(an example is provided in the Appendix below).
|
| 41 |
+
|
| 42 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 43 |
+
form, that is based on (or derived from) the Work and for which the
|
| 44 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 45 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 46 |
+
of this License, Derivative Works shall not include works that remain
|
| 47 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 48 |
+
the Work and Derivative Works thereof.
|
| 49 |
+
|
| 50 |
+
"Contribution" shall mean any work of authorship, including
|
| 51 |
+
the original version of the Work and any modifications or additions
|
| 52 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 53 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 54 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 55 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 56 |
+
means any form of electronic, verbal, or written communication sent
|
| 57 |
+
to the Licensor or its representatives, including but not limited to
|
| 58 |
+
communication on electronic mailing lists, source code control systems,
|
| 59 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 60 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 61 |
+
excluding communication that is conspicuously marked or otherwise
|
| 62 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 63 |
+
|
| 64 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 65 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 66 |
+
subsequently incorporated within the Work.
|
| 67 |
+
|
| 68 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 69 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 70 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 71 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 72 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 73 |
+
Work and such Derivative Works in Source or Object form.
|
| 74 |
+
|
| 75 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 76 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 77 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 78 |
+
(except as stated in this section) patent license to make, have made,
|
| 79 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 80 |
+
where such license applies only to those patent claims licensable
|
| 81 |
+
by such Contributor that are necessarily infringed by their
|
| 82 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 83 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 84 |
+
institute patent litigation against any entity (including a
|
| 85 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 86 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 87 |
+
or contributory patent infringement, then any patent licenses
|
| 88 |
+
granted to You under this License for that Work shall terminate
|
| 89 |
+
as of the date such litigation is filed.
|
| 90 |
+
|
| 91 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 92 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 93 |
+
modifications, and in Source or Object form, provided that You
|
| 94 |
+
meet the following conditions:
|
| 95 |
+
|
| 96 |
+
(a) You must give any other recipients of the Work or
|
| 97 |
+
Derivative Works a copy of this License; and
|
| 98 |
+
|
| 99 |
+
(b) You must cause any modified files to carry prominent notices
|
| 100 |
+
stating that You changed the files; and
|
| 101 |
+
|
| 102 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 103 |
+
that You distribute, all copyright, patent, trademark, and
|
| 104 |
+
attribution notices from the Source form of the Work,
|
| 105 |
+
excluding those notices that do not pertain to any part of
|
| 106 |
+
the Derivative Works; and
|
| 107 |
+
|
| 108 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 109 |
+
distribution, then any Derivative Works that You distribute must
|
| 110 |
+
include a readable copy of the attribution notices contained
|
| 111 |
+
within such NOTICE file, excluding those notices that do not
|
| 112 |
+
pertain to any part of the Derivative Works, in at least one
|
| 113 |
+
of the following places: within a NOTICE text file distributed
|
| 114 |
+
as part of the Derivative Works; within the Source form or
|
| 115 |
+
documentation, if provided along with the Derivative Works; or,
|
| 116 |
+
within a display generated by the Derivative Works, if and
|
| 117 |
+
wherever such third-party notices normally appear. The contents
|
| 118 |
+
of the NOTICE file are for informational purposes only and
|
| 119 |
+
do not modify the License. You may add Your own attribution
|
| 120 |
+
notices within Derivative Works that You distribute, alongside
|
| 121 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 122 |
+
that such additional attribution notices cannot be construed
|
| 123 |
+
as modifying the License.
|
| 124 |
+
|
| 125 |
+
You may add Your own copyright statement to Your modifications and
|
| 126 |
+
may provide additional or different license terms and conditions
|
| 127 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 128 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 129 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 130 |
+
the conditions stated in this License.
|
| 131 |
+
|
| 132 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 133 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 134 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 135 |
+
this License, without any additional terms or conditions.
|
| 136 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 137 |
+
the terms of any separate license agreement you may have executed
|
| 138 |
+
with Licensor regarding such Contributions.
|
| 139 |
+
|
| 140 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 141 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 142 |
+
except as required for reasonable and customary use in describing the
|
| 143 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 144 |
+
|
| 145 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 146 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 147 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 148 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 149 |
+
implied, including, without limitation, any warranties or conditions
|
| 150 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 151 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 152 |
+
appropriateness of using or redistributing the Work and assume any
|
| 153 |
+
risks associated with Your exercise of permissions under this License.
|
| 154 |
+
|
| 155 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 156 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 157 |
+
unless required by applicable law (such as deliberate and grossly
|
| 158 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 159 |
+
liable to You for damages, including any direct, indirect, special,
|
| 160 |
+
incidental, or consequential damages of any character arising as a
|
| 161 |
+
result of this License or out of the use or inability to use the
|
| 162 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 163 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 164 |
+
other commercial damages or losses), even if such Contributor
|
| 165 |
+
has been advised of the possibility of such damages.
|
| 166 |
+
|
| 167 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 168 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 169 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 170 |
+
or other liability obligations and/or rights consistent with this
|
| 171 |
+
License. However, in accepting such obligations, You may act only
|
| 172 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 173 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 174 |
+
defend, and hold each Contributor harmless for any liability
|
| 175 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 176 |
+
of your accepting any such warranty or additional liability.
|
| 177 |
+
|
| 178 |
+
END OF TERMS AND CONDITIONS
|
| 179 |
+
|
| 180 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 181 |
+
|
| 182 |
+
To apply the Apache License to your work, attach the following
|
| 183 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 184 |
+
replaced with your own identifying information. (Don't include
|
| 185 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 186 |
+
comment syntax for the file format. We also recommend that a
|
| 187 |
+
file or class name and description of purpose be included on the
|
| 188 |
+
same "printed page" as the copyright notice for easier
|
| 189 |
+
identification within third-party archives.
|
| 190 |
+
|
| 191 |
+
Copyright [yyyy] [name of copyright owner]
|
| 192 |
+
|
| 193 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 194 |
+
you may not use this file except in compliance with the License.
|
| 195 |
+
You may obtain a copy of the License at
|
| 196 |
+
|
| 197 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 198 |
+
|
| 199 |
+
Unless required by applicable law or agreed to in writing, software
|
| 200 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 201 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 202 |
+
See the License for the specific language governing permissions and
|
| 203 |
+
limitations under the License.
|
NOTICE
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Ising-Decoding
|
| 2 |
+
|
| 3 |
+
This product is released under the Apache License 2.0.
|
| 4 |
+
It includes software developed by NVIDIA Corporation and affiliates and includes
|
| 5 |
+
material from third parties released under the following licenses:
|
| 6 |
+
|
| 7 |
+
Stim - Apache 2.0
|
| 8 |
+
<https://github.com/quantumlib/Stim>
|
| 9 |
+
|
| 10 |
+
License at <https://github.com/quantumlib/Stim/blob/main/LICENSE>
|
| 11 |
+
Copyright 2021 Google LLC
|
| 12 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 13 |
+
you may not use this file except in compliance with the License.
|
| 14 |
+
You may obtain a copy of the License at
|
| 15 |
+
<http://www.apache.org/licenses/LICENSE-2.0>
|
| 16 |
+
Unless required by applicable law or agreed to in writing, software
|
| 17 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 18 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 19 |
+
See the License for the specific language governing permissions and
|
| 20 |
+
limitations under the License.
|
| 21 |
+
Apache License
|
| 22 |
+
Version 2.0, January 2004
|
| 23 |
+
<http://www.apache.org/licenses/>
|
| 24 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 25 |
+
|
| 26 |
+
1. Definitions.
|
| 27 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 28 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 29 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 30 |
+
the copyright owner that is granting the License.
|
| 31 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 32 |
+
other entities that control, are controlled by, or are under common
|
| 33 |
+
control with that entity. For the purposes of this definition,
|
| 34 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 35 |
+
direction or management of such entity, whether by contract or
|
| 36 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 37 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 38 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 39 |
+
exercising permissions granted by this License.
|
| 40 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 41 |
+
including but not limited to software source code, documentation
|
| 42 |
+
source, and configuration files.
|
| 43 |
+
"Object" form shall mean any form resulting from mechanical
|
| 44 |
+
transformation or translation of a Source form, including but
|
| 45 |
+
not limited to compiled object code, generated documentation,
|
| 46 |
+
and conversions to other media types.
|
| 47 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 48 |
+
Object form, made available under the License, as indicated by a
|
| 49 |
+
copyright notice that is included in or attached to the work
|
| 50 |
+
(an example is provided in the Appendix below).
|
| 51 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 52 |
+
form, that is based on (or derived from) the Work and for which the
|
| 53 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 54 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 55 |
+
of this License, Derivative Works shall not include works that remain
|
| 56 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 57 |
+
the Work and Derivative Works thereof.
|
| 58 |
+
"Contribution" shall mean any work of authorship, including
|
| 59 |
+
the original version of the Work and any modifications or additions
|
| 60 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 61 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 62 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 63 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 64 |
+
means any form of electronic, verbal, or written communication sent
|
| 65 |
+
to the Licensor or its representatives, including but not limited to
|
| 66 |
+
communication on electronic mailing lists, source code control systems,
|
| 67 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 68 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 69 |
+
excluding communication that is conspicuously marked or otherwise
|
| 70 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 71 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 72 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 73 |
+
subsequently incorporated within the Work.
|
| 74 |
+
2. Grant of Copyright 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 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 78 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 79 |
+
Work and such Derivative Works in Source or Object form.
|
| 80 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 81 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 82 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 83 |
+
(except as stated in this section) patent license to make, have made,
|
| 84 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 85 |
+
where such license applies only to those patent claims licensable
|
| 86 |
+
by such Contributor that are necessarily infringed by their
|
| 87 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 88 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 89 |
+
institute patent litigation against any entity (including a
|
| 90 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 91 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 92 |
+
or contributory patent infringement, then any patent licenses
|
| 93 |
+
granted to You under this License for that Work shall terminate
|
| 94 |
+
as of the date such litigation is filed.
|
| 95 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 96 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 97 |
+
modifications, and in Source or Object form, provided that You
|
| 98 |
+
meet the following conditions:
|
| 99 |
+
(a) You must give any other recipients of the Work or
|
| 100 |
+
Derivative Works a copy of this License; and
|
| 101 |
+
(b) You must cause any modified files to carry prominent notices
|
| 102 |
+
stating that You changed the files; and
|
| 103 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 104 |
+
that You distribute, all copyright, patent, trademark, and
|
| 105 |
+
attribution notices from the Source form of the Work,
|
| 106 |
+
excluding those notices that do not pertain to any part of
|
| 107 |
+
the Derivative Works; and
|
| 108 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 109 |
+
distribution, then any Derivative Works that You distribute must
|
| 110 |
+
include a readable copy of the attribution notices contained
|
| 111 |
+
within such NOTICE file, excluding those notices that do not
|
| 112 |
+
pertain to any part of the Derivative Works, in at least one
|
| 113 |
+
of the following places: within a NOTICE text file distributed
|
| 114 |
+
as part of the Derivative Works; within the Source form or
|
| 115 |
+
documentation, if provided along with the Derivative Works; or,
|
| 116 |
+
within a display generated by the Derivative Works, if and
|
| 117 |
+
wherever such third-party notices normally appear. The contents
|
| 118 |
+
of the NOTICE file are for informational purposes only and
|
| 119 |
+
do not modify the License. You may add Your own attribution
|
| 120 |
+
notices within Derivative Works that You distribute, alongside
|
| 121 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 122 |
+
that such additional attribution notices cannot be construed
|
| 123 |
+
as modifying the License.
|
| 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 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 138 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 139 |
+
except as required for reasonable and customary use in describing the
|
| 140 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 141 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 142 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 143 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 144 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 145 |
+
implied, including, without limitation, any warranties or conditions
|
| 146 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 147 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 148 |
+
appropriateness of using or redistributing the Work and assume any
|
| 149 |
+
risks associated with Your exercise of permissions under this License.
|
| 150 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 151 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 152 |
+
unless required by applicable law (such as deliberate and grossly
|
| 153 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 154 |
+
liable to You for damages, including any direct, indirect, special,
|
| 155 |
+
incidental, or exemplary damages of any character arising as a
|
| 156 |
+
result of this License or out of the use or inability to use the
|
| 157 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 158 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 159 |
+
other commercial damages or losses), even if such Contributor
|
| 160 |
+
has been advised of the possibility of such damages.
|
| 161 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 162 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 163 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 164 |
+
or other liability obligations and/or rights consistent with this
|
| 165 |
+
License. However, in accepting such obligations, You may act only
|
| 166 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 167 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 168 |
+
defend, and hold each Contributor harmless for any liability
|
| 169 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 170 |
+
of your accepting any such warranty or additional liability.
|
| 171 |
+
END OF TERMS AND CONDITIONS
|
| 172 |
+
|
| 173 |
+
----------------------------------------------------------------
|
| 174 |
+
|
| 175 |
+
PyMatching - Apache 2.0
|
| 176 |
+
<https://github.com/oscarhiggott/PyMatching>
|
| 177 |
+
|
| 178 |
+
License at <https://github.com/oscarhiggott/PyMatching/blob/master/LICENSE>
|
| 179 |
+
Copyright (c) 2020 Oscar Higgott
|
| 180 |
+
|
| 181 |
+
----------------------------------------------------------------
|
| 182 |
+
|
| 183 |
+
PyTorch - BSD-3-Clause
|
| 184 |
+
<https://github.com/pytorch/pytorch>
|
| 185 |
+
|
| 186 |
+
License at <https://github.com/pytorch/pytorch/blob/main/LICENSE>
|
| 187 |
+
Copyright (c) 2016- Facebook, Inc (Adam Paszke)
|
| 188 |
+
Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
|
| 189 |
+
Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
|
| 190 |
+
Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
|
| 191 |
+
Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
|
| 192 |
+
Copyright (c) 2011-2013 NYU (Clement Farabet)
|
| 193 |
+
Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou,
|
| 194 |
+
Iain Melvin, Jason Weston)
|
| 195 |
+
Copyright (c) 2006 Idiap Research Institute (Samy Bengio)
|
| 196 |
+
Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio,
|
| 197 |
+
Johnny Mariethoz)
|
| 198 |
+
|
| 199 |
+
Redistribution and use in source and binary forms, with or without
|
| 200 |
+
modification, are permitted provided that the following conditions are met:
|
| 201 |
+
|
| 202 |
+
1. Redistributions of source code must retain the above copyright notice, this
|
| 203 |
+
list of conditions and the following disclaimer.
|
| 204 |
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
| 205 |
+
this list of conditions and the following disclaimer in the documentation
|
| 206 |
+
and/or other materials provided with the distribution.
|
| 207 |
+
3. Neither the names of the copyright holders nor the names of its contributors
|
| 208 |
+
may be used to endorse or promote products derived from this software
|
| 209 |
+
without specific prior written permission.
|
| 210 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
| 211 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 212 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 213 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
| 214 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 215 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 216 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 217 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 218 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 219 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 220 |
+
|
| 221 |
+
----------------------------------------------------------------
|
| 222 |
+
|
| 223 |
+
NumPy - BSD-3-Clause
|
| 224 |
+
<https://github.com/numpy/numpy>
|
| 225 |
+
|
| 226 |
+
License at <https://github.com/numpy/numpy/blob/main/LICENSE.txt>
|
| 227 |
+
Copyright (c) 2005-2024, NumPy Developers.
|
| 228 |
+
All rights reserved.
|
| 229 |
+
|
| 230 |
+
Redistribution and use in source and binary forms, with or without
|
| 231 |
+
modification, are permitted provided that the following conditions are met:
|
| 232 |
+
|
| 233 |
+
* Redistributions of source code must retain the above copyright notice, this
|
| 234 |
+
list of conditions and the following disclaimer.
|
| 235 |
+
* Redistributions in binary form must reproduce the above copyright notice,
|
| 236 |
+
this list of conditions and the following disclaimer in the documentation
|
| 237 |
+
and/or other materials provided with the distribution.
|
| 238 |
+
* Neither the name of the NumPy Developers nor the names of any contributors
|
| 239 |
+
may be used to endorse or promote products derived from this software
|
| 240 |
+
without specific prior written permission.
|
| 241 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 242 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 243 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 244 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
| 245 |
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
| 246 |
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 247 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
| 248 |
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
| 249 |
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 250 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 251 |
+
|
| 252 |
+
----------------------------------------------------------------
|
| 253 |
+
|
| 254 |
+
Hydra - MIT License
|
| 255 |
+
<https://github.com/facebookresearch/hydra>
|
| 256 |
+
|
| 257 |
+
License at <https://github.com/facebookresearch/hydra/blob/main/LICENSE>
|
| 258 |
+
Copyright (c) Facebook, Inc. and its affiliates.
|
| 259 |
+
|
| 260 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 261 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 262 |
+
in the Software without restriction, including without limitation the rights
|
| 263 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 264 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 265 |
+
furnished to do so, subject to the following conditions:
|
| 266 |
+
The above copyright notice and this permission notice shall be included in all
|
| 267 |
+
copies or substantial portions of the Software.
|
| 268 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 269 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 270 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 271 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 272 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 273 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 274 |
+
SOFTWARE.
|
| 275 |
+
|
| 276 |
+
----------------------------------------------------------------
|
| 277 |
+
|
| 278 |
+
OmegaConf - BSD-3-Clause
|
| 279 |
+
<https://github.com/omry/omegaconf>
|
| 280 |
+
|
| 281 |
+
License at <https://github.com/omry/omegaconf/blob/master/LICENSE>
|
| 282 |
+
Copyright (c) 2019 Omry Yadan
|
| 283 |
+
|
| 284 |
+
----------------------------------------------------------------
|
| 285 |
+
|
| 286 |
+
SafeTensors - Apache 2.0
|
| 287 |
+
<https://github.com/huggingface/safetensors>
|
| 288 |
+
|
| 289 |
+
License at <https://github.com/huggingface/safetensors/blob/main/LICENSE>
|
| 290 |
+
Copyright 2022 The HuggingFace Team
|
| 291 |
+
|
| 292 |
+
----------------------------------------------------------------
|
| 293 |
+
|
| 294 |
+
ONNX Runtime - MIT License
|
| 295 |
+
<https://github.com/microsoft/onnxruntime>
|
| 296 |
+
|
| 297 |
+
License at <https://github.com/microsoft/onnxruntime/blob/main/LICENSE>
|
| 298 |
+
Copyright (c) Microsoft Corporation
|
| 299 |
+
|
| 300 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 301 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 302 |
+
in the Software without restriction, including without limitation the rights
|
| 303 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 304 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 305 |
+
furnished to do so, subject to the following conditions:
|
| 306 |
+
The above copyright notice and this permission notice shall be included in all
|
| 307 |
+
copies or substantial portions of the Software.
|
| 308 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 309 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 310 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 311 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 312 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 313 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 314 |
+
SOFTWARE.
|
| 315 |
+
|
| 316 |
+
----------------------------------------------------------------
|
| 317 |
+
|
| 318 |
+
NVIDIA ModelOpt - Apache 2.0
|
| 319 |
+
<https://github.com/NVIDIA/TensorRT-Model-Optimizer>
|
| 320 |
+
|
| 321 |
+
License at <https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/LICENSE>
|
| 322 |
+
Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.
|
| 323 |
+
|
| 324 |
+
----------------------------------------------------------------
|
| 325 |
+
|
| 326 |
+
TensorBoard - Apache 2.0
|
| 327 |
+
<https://github.com/tensorflow/tensorboard>
|
| 328 |
+
|
| 329 |
+
License at <https://github.com/tensorflow/tensorboard/blob/master/LICENSE>
|
| 330 |
+
Copyright 2015 The TensorFlow Authors
|
| 331 |
+
|
| 332 |
+
----------------------------------------------------------------
|
| 333 |
+
|
| 334 |
+
torchinfo - MIT License
|
| 335 |
+
<https://github.com/TylerYep/torchinfo>
|
| 336 |
+
|
| 337 |
+
License at <https://github.com/TylerYep/torchinfo/blob/main/LICENSE>
|
| 338 |
+
Copyright (c) 2020 Tyler Yep
|
| 339 |
+
|
| 340 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 341 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 342 |
+
in the Software without restriction, including without limitation the rights
|
| 343 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 344 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 345 |
+
furnished to do so, subject to the following conditions:
|
| 346 |
+
The above copyright notice and this permission notice shall be included in all
|
| 347 |
+
copies or substantial portions of the Software.
|
| 348 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 349 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 350 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 351 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 352 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 353 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 354 |
+
SOFTWARE.
|
| 355 |
+
|
| 356 |
+
----------------------------------------------------------------
|
| 357 |
+
|
| 358 |
+
Matplotlib - BSD-compatible (PSF-based)
|
| 359 |
+
<https://github.com/matplotlib/matplotlib>
|
| 360 |
+
|
| 361 |
+
License at <https://github.com/matplotlib/matplotlib/blob/main/LICENSE/LICENSE>
|
| 362 |
+
Copyright (c) 2012-2013 Matplotlib Development Team; All Rights Reserved
|
| 363 |
+
|
| 364 |
+
----------------------------------------------------------------
|
| 365 |
+
|
| 366 |
+
CuPy - MIT License
|
| 367 |
+
<https://github.com/cupy/cupy>
|
| 368 |
+
|
| 369 |
+
License at <https://github.com/cupy/cupy/blob/main/LICENSE>
|
| 370 |
+
Copyright (c) 2015 Preferred Infrastructure, Inc.
|
| 371 |
+
Copyright (c) 2015 Preferred Networks, Inc.
|
| 372 |
+
|
| 373 |
+
----------------------------------------------------------------
|
| 374 |
+
|
| 375 |
+
TensorRT - Apache 2.0
|
| 376 |
+
<https://github.com/NVIDIA/TensorRT>
|
| 377 |
+
|
| 378 |
+
License at <https://github.com/NVIDIA/TensorRT/blob/main/LICENSE>
|
| 379 |
+
Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
|
| 380 |
+
|
| 381 |
+
----------------------------------------------------------------
|
| 382 |
+
|
| 383 |
+
onnxscript - MIT License
|
| 384 |
+
<https://github.com/microsoft/onnxscript>
|
| 385 |
+
|
| 386 |
+
License at <https://github.com/microsoft/onnxscript/blob/main/LICENSE>
|
| 387 |
+
Copyright (c) Microsoft Corporation
|
| 388 |
+
|
| 389 |
+
----------------------------------------------------------------
|
| 390 |
+
|
| 391 |
+
SciPy - BSD-3-Clause
|
| 392 |
+
<https://pypi.org/project/scipy>
|
| 393 |
+
|
| 394 |
+
License at <https://github.com/scipy/scipy/blob/main/LICENSE.txt>
|
| 395 |
+
Copyright (c) 2001-2002 Enthought, Inc. 2003, SciPy Developers.
|
| 396 |
+
All rights reserved.
|
| 397 |
+
|
| 398 |
+
----------------------------------------------------------------
|
| 399 |
+
|
| 400 |
+
ldpc - MIT License
|
| 401 |
+
<https://pypi.org/project/ldpc>
|
| 402 |
+
|
| 403 |
+
License at <https://github.com/quantumgizmos/ldpc/blob/main/LICENSE>
|
| 404 |
+
Copyright (c) 2024 Joschka Roffe
|
| 405 |
+
|
| 406 |
+
----------------------------------------------------------------
|
| 407 |
+
|
| 408 |
+
BeliefMatching - Apache 2.0
|
| 409 |
+
<https://github.com/oscarhiggott/BeliefMatching>
|
| 410 |
+
|
| 411 |
+
License at <https://github.com/oscarhiggott/BeliefMatching/blob/main/LICENSE>
|
| 412 |
+
Copyright (c) Oscar Higgott
|
| 413 |
+
|
| 414 |
+
----------------------------------------------------------------
|
| 415 |
+
|
| 416 |
+
Chromobius - Apache 2.0
|
| 417 |
+
<https://github.com/quantumlib/chromobius>
|
| 418 |
+
|
| 419 |
+
License at <https://github.com/quantumlib/chromobius/blob/main/LICENSE>
|
| 420 |
+
Copyright 2023 Google LLC
|
| 421 |
+
|
| 422 |
+
----------------------------------------------------------------
|
README.md
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
tags:
|
| 5 |
+
- quantum-error-correction
|
| 6 |
+
- surface-code
|
| 7 |
+
- neural-decoder
|
| 8 |
+
- pre-decoding
|
| 9 |
+
- continual-learning
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# QAdapt v1
|
| 13 |
+
|
| 14 |
+
This repository contains the final QAdapt checkpoint and the exact
|
| 15 |
+
Ising-fast T0 e100 baseline used for paired evaluation in *QAdapt: Continual
|
| 16 |
+
Syndrome-Adaptive Neural Pre-Decoding for High-Noise Surface-Code Quantum
|
| 17 |
+
Error Correction*.
|
| 18 |
+
|
| 19 |
+
Release version: `v1`.
|
| 20 |
+
|
| 21 |
+
The arXiv link will be added after the paper is public. This is a research
|
| 22 |
+
checkpoint bundle, not a Transformers `AutoModel` repository. Use it with the
|
| 23 |
+
pinned NVIDIA/Ising-Decoding revision and the patch supplied here.
|
| 24 |
+
|
| 25 |
+
## Included models
|
| 26 |
+
|
| 27 |
+
| Role | File | Model ID | Architecture | Parameters | RF |
|
| 28 |
+
|---|---|---:|---|---:|---:|
|
| 29 |
+
| QAdapt | `model.safetensors` | 111 | HTNet | 650,374 | 9 |
|
| 30 |
+
| Paired baseline | `baselines/ising-fast-t0-e100/model.safetensors` | 1 | `PreDecoderModelMemory_v1` | 912,772 | 9 |
|
| 31 |
+
|
| 32 |
+
QAdapt is the primary artifact. The bundled Ising-fast checkpoint was trained
|
| 33 |
+
only on T0 for 100 epochs and is included so that all reported paired
|
| 34 |
+
comparisons can be evaluated from one repository. Its exact architecture
|
| 35 |
+
metadata is stored in `baselines/ising-fast-t0-e100/config.json`.
|
| 36 |
+
|
| 37 |
+
## Technical overview
|
| 38 |
+
|
| 39 |
+
```text
|
| 40 |
+
detector events [B, 4, T, H, W]
|
| 41 |
+
-> neural local pre-decoder
|
| 42 |
+
-> predicted local correction and residual syndrome
|
| 43 |
+
-> PyMatching global residual decoder
|
| 44 |
+
-> logical prediction
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
|
| 49 |
+
*QAdapt workflow: hardware-informed noise modeling, heterogeneous
|
| 50 |
+
spatiotemporal feature extraction, continual adaptation, and hybrid
|
| 51 |
+
neural--matching inference.*
|
| 52 |
+
|
| 53 |
+
QAdapt uses a 3-D convolutional stem followed by three HTNet spatiotemporal
|
| 54 |
+
fusion blocks. Each block combines a spatial branch, a temporal branch, and a
|
| 55 |
+
grouped joint 3-D branch using input-adaptive fusion, then applies channel,
|
| 56 |
+
temporal-axis, and spatial-axis gating with a residual connection. The
|
| 57 |
+
input-conditioned head produces four output channels.
|
| 58 |
+
|
| 59 |
+
The released HTNet uses 112 hidden channels, 168 expanded channels, six joint
|
| 60 |
+
convolution groups, eight normalization groups, and an effective receptive
|
| 61 |
+
field of nine. Full machine-readable parameters are in `config.json`.
|
| 62 |
+
|
| 63 |
+
The Ising-fast baseline is a dense four-layer 3-D convolutional pre-decoder
|
| 64 |
+
with filters `[128, 128, 128, 4]` and 3x3x3 kernels.
|
| 65 |
+
|
| 66 |
+

|
| 67 |
+
|
| 68 |
+
*HTNet architecture: a 112-channel 3-D stem, three heterogeneous
|
| 69 |
+
spatiotemporal fusion blocks, raw-evidence concatenation, and a four-channel
|
| 70 |
+
correction head.*
|
| 71 |
+
|
| 72 |
+
## Training scope
|
| 73 |
+
|
| 74 |
+
Training samples were generated on demand with Stim from the public
|
| 75 |
+
25-parameter circuit-level Pauli configurations under `configs/`.
|
| 76 |
+
|
| 77 |
+
- QAdapt: T0 -> T1 -> T2 -> T3 -> T4, 20 epochs per task, 100 epochs total.
|
| 78 |
+
- QAdapt training hardware: 4 × NVIDIA A100 GPUs.
|
| 79 |
+
- Continual adaptation: Q-EWC coefficient 100 from T1 onward, with 65,536
|
| 80 |
+
samples per Fisher estimate.
|
| 81 |
+
- Ising-fast baseline: T0 only, 100 epochs.
|
| 82 |
+
- Willow: zero-shot evaluation only; no training, fine-tuning, calibration, or
|
| 83 |
+
model selection used Willow samples.
|
| 84 |
+
|
| 85 |
+
Training orchestration, optimizer state, Fisher state, intermediate
|
| 86 |
+
checkpoints, and logs are intentionally not distributed.
|
| 87 |
+
|
| 88 |
+
## Install
|
| 89 |
+
|
| 90 |
+
```bash
|
| 91 |
+
git clone https://github.com/NVIDIA/Ising-Decoding.git
|
| 92 |
+
cd Ising-Decoding
|
| 93 |
+
git checkout 33acb152e403bc189f2effdb07f1a87b34c745f1
|
| 94 |
+
git apply /path/to/QAdapt/qadapt-minimal.patch
|
| 95 |
+
pip install -r code/requirements_public_inference.txt
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
The patch adds QAdapt model ID 111, SafeTensors loading, the exact public
|
| 99 |
+
configs, and the three inference entry points. It contains no training code or
|
| 100 |
+
intermediate models.
|
| 101 |
+
|
| 102 |
+
## T0--T4 inference
|
| 103 |
+
|
| 104 |
+
Run QAdapt alone on T0:
|
| 105 |
+
|
| 106 |
+
```bash
|
| 107 |
+
PYTHONPATH=code python code/examples/infer_t0_t4.py \
|
| 108 |
+
--tasks T0 --distances 9 \
|
| 109 |
+
--model qadapt:111:/path/to/QAdapt/model.safetensors
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
Run the paired release evaluation:
|
| 113 |
+
|
| 114 |
+
```bash
|
| 115 |
+
PYTHONPATH=code python code/examples/infer_t0_t4.py \
|
| 116 |
+
--model qadapt:111:/path/to/QAdapt/model.safetensors \
|
| 117 |
+
--model ising-fast:1:/path/to/QAdapt/baselines/ising-fast-t0-e100/model.safetensors
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
The default paired command evaluates T0--T4 at d=9/r=9 with 262,144 shots per
|
| 121 |
+
basis per task and seed 12345. Use `--dry-run` to inspect all five jobs first.
|
| 122 |
+
|
| 123 |
+
## Synthetic OOD inference
|
| 124 |
+
|
| 125 |
+
```bash
|
| 126 |
+
PYTHONPATH=code python code/examples/infer_ood.py \
|
| 127 |
+
--model qadapt:111:/path/to/QAdapt/model.safetensors \
|
| 128 |
+
--model ising-fast:1:/path/to/QAdapt/baselines/ising-fast-t0-e100/model.safetensors
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
Defaults run the retained paper grid: 11 axis combinations, multipliers
|
| 132 |
+
1.2/1.5/2.0/2.5/3.0, d=7 and d=9, for 110 jobs total.
|
| 133 |
+
|
| 134 |
+
## Willow zero-shot inference
|
| 135 |
+
|
| 136 |
+
The Willow archive is third-party data and is not redistributed here.
|
| 137 |
+
|
| 138 |
+
```bash
|
| 139 |
+
PYTHONPATH=code python code/scripts/download_google_qec_benchmark.py --extract
|
| 140 |
+
PYTHONPATH=code python code/examples/infer_willow.py \
|
| 141 |
+
--model qadapt:111:/path/to/QAdapt/model.safetensors \
|
| 142 |
+
--model ising-fast:1:/path/to/QAdapt/baselines/ising-fast-t0-e100/model.safetensors
|
| 143 |
+
```
|
| 144 |
+
|
| 145 |
+
Defaults are d=5/d=7, ten rounds, and all available shots: 400,000 at d=5 and
|
| 146 |
+
100,000 at d=7, without fine-tuning.
|
| 147 |
+
|
| 148 |
+
## Results
|
| 149 |
+
|
| 150 |
+
### T0--T4 terminal model results
|
| 151 |
+
|
| 152 |
+
The final e100 checkpoints were evaluated at d=9/r=9 with 262,144 shots per
|
| 153 |
+
logical basis per task and seed 12345.
|
| 154 |
+
|
| 155 |
+
| Task | PyMatching LER | Ising-fast LER | QAdapt LER |
|
| 156 |
+
|---|---:|---:|---:|
|
| 157 |
+
| T0 | 0.04503 | 0.04094 | **0.03612** |
|
| 158 |
+
| T1 | 0.05489 | 0.05207 | **0.04619** |
|
| 159 |
+
| T2 | 0.15404 | 0.14017 | **0.13012** |
|
| 160 |
+
| T3 | 0.04997 | 0.04532 | **0.04053** |
|
| 161 |
+
| T4 | 0.09811 | 0.09135 | **0.08282** |
|
| 162 |
+
| Mean | 0.08041 | 0.07397 | **0.06716** |
|
| 163 |
+
|
| 164 |
+
QAdapt lowers mean LER by 9.22% relative to the Ising-fast T0 e100 baseline.
|
| 165 |
+
|
| 166 |
+
### Synthetic OOD
|
| 167 |
+
|
| 168 |
+
Each distance aggregates 55 configurations and logical X/Z bases. QAdapt wins
|
| 169 |
+
all 110 configuration-level LER comparisons.
|
| 170 |
+
|
| 171 |
+
| Distance | Ising-fast LER | QAdapt LER | LER reduction | Ising-fast latency | QAdapt latency |
|
| 172 |
+
|---|---:|---:|---:|---:|---:|
|
| 173 |
+
| d=7 | 0.23447 | **0.22701** | 3.18% | 2.329 | **2.195** |
|
| 174 |
+
| d=9 | 0.24444 | **0.23653** | 3.23% | 4.884 | **4.608** |
|
| 175 |
+
|
| 176 |
+

|
| 177 |
+
|
| 178 |
+
*Synthetic OOD results over the five retained noise multipliers. Latency is in
|
| 179 |
+
microseconds per round.*
|
| 180 |
+
|
| 181 |
+
### Willow zero-shot transfer
|
| 182 |
+
|
| 183 |
+
| Setting | Metric | Ising-fast | QAdapt | Reduction |
|
| 184 |
+
|---|---|---:|---:|---:|
|
| 185 |
+
| d=5/r=10 | LER | 0.09963 | **0.09386** | 5.79% |
|
| 186 |
+
| d=5/r=10 | Backend latency | 0.704 | **0.694** | 1.43% |
|
| 187 |
+
| d=7/r=10 | LER | 0.08412 | **0.08201** | 2.51% |
|
| 188 |
+
| d=7/r=10 | Backend latency | 1.405 | **1.274** | 9.32% |
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
|
| 192 |
+
*Zero-shot transfer to Willow at ten rounds. Latency is in microseconds per
|
| 193 |
+
round.*
|
| 194 |
+
|
| 195 |
+
Full-precision values and protocol metadata are provided in `evaluation.json`.
|
| 196 |
+
The paper's mapped-T0 architecture table used Ising-fast e53 and a T0-only
|
| 197 |
+
HTNet e89; those separate ablation values are not attributed to the final e100
|
| 198 |
+
artifacts distributed here.
|
| 199 |
+
|
| 200 |
+
Backend latency measures only residual PyMatching decoding. It excludes neural
|
| 201 |
+
inference, device/host transfer, and residual construction and will vary by
|
| 202 |
+
hardware and software environment.
|
| 203 |
+
|
| 204 |
+
## Integrity
|
| 205 |
+
|
| 206 |
+
Run from this downloaded model repository:
|
| 207 |
+
|
| 208 |
+
```bash
|
| 209 |
+
sha256sum -c SHA256SUMS
|
| 210 |
+
```
|
| 211 |
+
|
| 212 |
+
The two SafeTensors artifacts were compared tensor-by-tensor with their final
|
| 213 |
+
source checkpoints. All tensors match exactly.
|
| 214 |
+
|
| 215 |
+
## Limitations
|
| 216 |
+
|
| 217 |
+
These checkpoints target rotated surface-code memory experiments with the
|
| 218 |
+
input layout and noise semantics implemented by the pinned repository. They
|
| 219 |
+
are not standalone end-to-end fault-tolerant systems and have not been
|
| 220 |
+
validated for arbitrary code families, detector layouts, or hardware control
|
| 221 |
+
stacks.
|
| 222 |
+
|
| 223 |
+
## License and attribution
|
| 224 |
+
|
| 225 |
+
Apache-2.0. Retain `LICENSE`, `NOTICE`, and the modification notices when
|
| 226 |
+
redistributing the code or patch. Google Willow data remains under its own
|
| 227 |
+
upstream terms and is downloaded separately.
|
| 228 |
+
|
| 229 |
+
## Citation
|
| 230 |
+
|
| 231 |
+
```bibtex
|
| 232 |
+
@article{miao2026qadapt,
|
| 233 |
+
title={QAdapt: Continual Syndrome-Adaptive Neural Pre-Decoding for High-Noise Surface-Code Quantum Error Correction},
|
| 234 |
+
author={Miao, Ran and Shan, Xiaohan and Luo, Rui and Sun, Xiaoming and Zhang, Jialin and Wei, Yuan and Wan, Mingda},
|
| 235 |
+
year={2026}
|
| 236 |
+
}
|
| 237 |
+
```
|
REPRODUCTION_VALIDATION.json
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": 1,
|
| 3 |
+
"release_version": "v1",
|
| 4 |
+
"validated_at": "2026-07-29",
|
| 5 |
+
"status": "pass",
|
| 6 |
+
"upstream": {
|
| 7 |
+
"repository": "https://github.com/NVIDIA/Ising-Decoding.git",
|
| 8 |
+
"commit": "33acb152e403bc189f2effdb07f1a87b34c745f1",
|
| 9 |
+
"patch_sha256": "15f8e7d2f18158a769a5ba06d183239090c88c606519c8468f9a814998c6a986",
|
| 10 |
+
"git_apply_check": "pass",
|
| 11 |
+
"clean_clone_gpu_smoke": "pass"
|
| 12 |
+
},
|
| 13 |
+
"artifacts": {
|
| 14 |
+
"QAdapt": {
|
| 15 |
+
"relative_path": "model.safetensors",
|
| 16 |
+
"safetensors_sha256": "65f979c9f23f1b13b76876c6e5df204d1bd28b0e3322483d966db0efb840600d",
|
| 17 |
+
"source_checkpoint_sha256": "59d55a948a1a99458f7ccb0bba83335a779ef90eb8b36125407b65d45d771f9f",
|
| 18 |
+
"tensor_equality": "exact",
|
| 19 |
+
"tensor_count": 94,
|
| 20 |
+
"parameter_count": 650374
|
| 21 |
+
},
|
| 22 |
+
"Ising-Fast-T0-e100": {
|
| 23 |
+
"relative_path": "baselines/ising-fast-t0-e100/model.safetensors",
|
| 24 |
+
"safetensors_sha256": "af5e13e389358d4aa19afa92f6d1ff368e8f64e8497f23c51ddeed9d367f724a",
|
| 25 |
+
"source_checkpoint_sha256": "c23c9b1507cf4d213ce1b6526f87ee9e2f9db2bd8dc336c16f915b77724a0661",
|
| 26 |
+
"tensor_equality": "exact",
|
| 27 |
+
"tensor_count": 8,
|
| 28 |
+
"parameter_count": 912772
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
"environment": {
|
| 32 |
+
"python": "3.12.3",
|
| 33 |
+
"torch": "2.7.0a0+79aa17489c.nv25.04",
|
| 34 |
+
"numpy": "1.26.4",
|
| 35 |
+
"stim": "1.16.0",
|
| 36 |
+
"pymatching": "2.4.0",
|
| 37 |
+
"safetensors": "0.5.3",
|
| 38 |
+
"cuda": "12.9",
|
| 39 |
+
"gpu": "NVIDIA A100-SXM4-80GB"
|
| 40 |
+
},
|
| 41 |
+
"t0_t4": {
|
| 42 |
+
"status": "pass",
|
| 43 |
+
"protocol": {
|
| 44 |
+
"distance": 9,
|
| 45 |
+
"rounds": 9,
|
| 46 |
+
"shots_per_basis_per_task": 262144,
|
| 47 |
+
"bases": ["X", "Z"],
|
| 48 |
+
"seed": 12345
|
| 49 |
+
},
|
| 50 |
+
"actual_mean_ler_by_task": {
|
| 51 |
+
"T0": {
|
| 52 |
+
"pymatching": 0.045360565185546875,
|
| 53 |
+
"ising-fast": 0.04070091247558594,
|
| 54 |
+
"qadapt": 0.036182403564453125
|
| 55 |
+
},
|
| 56 |
+
"T1": {
|
| 57 |
+
"pymatching": 0.05428314208984375,
|
| 58 |
+
"ising-fast": 0.05145454406738281,
|
| 59 |
+
"qadapt": 0.046100616455078125
|
| 60 |
+
},
|
| 61 |
+
"T2": {
|
| 62 |
+
"pymatching": 0.15405654907226562,
|
| 63 |
+
"ising-fast": 0.14002418518066406,
|
| 64 |
+
"qadapt": 0.1307964324951172
|
| 65 |
+
},
|
| 66 |
+
"T3": {
|
| 67 |
+
"pymatching": 0.0500640869140625,
|
| 68 |
+
"ising-fast": 0.04494285583496094,
|
| 69 |
+
"qadapt": 0.040164947509765625
|
| 70 |
+
},
|
| 71 |
+
"T4": {
|
| 72 |
+
"pymatching": 0.098663330078125,
|
| 73 |
+
"ising-fast": 0.09106636047363281,
|
| 74 |
+
"qadapt": 0.0831298828125
|
| 75 |
+
}
|
| 76 |
+
},
|
| 77 |
+
"actual_mean_ler_across_tasks": {
|
| 78 |
+
"pymatching": 0.08048553466796875,
|
| 79 |
+
"ising-fast": 0.07363777160644532,
|
| 80 |
+
"qadapt": 0.06727485656738282
|
| 81 |
+
},
|
| 82 |
+
"qadapt_reduction_vs_ising_fast_percent": 8.64083051435735,
|
| 83 |
+
"max_absolute_ler_delta_vs_release_reference": 0.000681,
|
| 84 |
+
"interpretation": "All five tasks reproduce within ordinary finite-shot and software-version variation. The paper architecture table used different T0-only epochs and is not evidence for these final e100 artifacts."
|
| 85 |
+
},
|
| 86 |
+
"synthetic_ood": {
|
| 87 |
+
"status": "pass",
|
| 88 |
+
"protocol": {
|
| 89 |
+
"axis_combinations": 11,
|
| 90 |
+
"multipliers": [1.2, 1.5, 2.0, 2.5, 3.0],
|
| 91 |
+
"distances": [7, 9],
|
| 92 |
+
"jobs": 110,
|
| 93 |
+
"shots_per_basis_per_job": 262144,
|
| 94 |
+
"bases": ["X", "Z"]
|
| 95 |
+
},
|
| 96 |
+
"actual": {
|
| 97 |
+
"d7": {
|
| 98 |
+
"pymatching_mean_ler": 0.2453592127019709,
|
| 99 |
+
"ising_fast_mean_ler": 0.23453282442959872,
|
| 100 |
+
"qadapt_mean_ler": 0.2268583124334162,
|
| 101 |
+
"qadapt_reduction_vs_ising_fast_percent": 3.2722549668036893,
|
| 102 |
+
"qadapt_wins": 55,
|
| 103 |
+
"comparisons": 55,
|
| 104 |
+
"ising_fast_backend_latency_us_per_round": 2.446139354042408,
|
| 105 |
+
"qadapt_backend_latency_us_per_round": 2.300856614889897
|
| 106 |
+
},
|
| 107 |
+
"d9": {
|
| 108 |
+
"pymatching_mean_ler": 0.2519276358864524,
|
| 109 |
+
"ising_fast_mean_ler": 0.24441146850585938,
|
| 110 |
+
"qadapt_mean_ler": 0.23654133189808238,
|
| 111 |
+
"qadapt_reduction_vs_ising_fast_percent": 3.2200357274103615,
|
| 112 |
+
"qadapt_wins": 55,
|
| 113 |
+
"comparisons": 55,
|
| 114 |
+
"ising_fast_backend_latency_us_per_round": 5.014288594494714,
|
| 115 |
+
"qadapt_backend_latency_us_per_round": 4.730247553071063
|
| 116 |
+
}
|
| 117 |
+
},
|
| 118 |
+
"absolute_ler_delta_vs_paper": {
|
| 119 |
+
"d7_ising_fast": 0.00006020285866476,
|
| 120 |
+
"d7_qadapt": -0.00014780217950994,
|
| 121 |
+
"d9_ising_fast": -0.00002417130903765,
|
| 122 |
+
"d9_qadapt": 0.00000766407359728
|
| 123 |
+
},
|
| 124 |
+
"interpretation": "QAdapt wins all 110 retained comparisons. Backend timing is machine-dependent and excludes neural inference and transfers."
|
| 125 |
+
},
|
| 126 |
+
"willow": {
|
| 127 |
+
"status": "pass",
|
| 128 |
+
"protocol": {
|
| 129 |
+
"rounds": 10,
|
| 130 |
+
"bases": ["X", "Z"],
|
| 131 |
+
"fine_tuning": false,
|
| 132 |
+
"d5_shots": 400000,
|
| 133 |
+
"d7_shots": 100000
|
| 134 |
+
},
|
| 135 |
+
"actual": {
|
| 136 |
+
"d5": {
|
| 137 |
+
"ising_fast_logical_errors": 39852,
|
| 138 |
+
"ising_fast_ler": 0.09963,
|
| 139 |
+
"qadapt_logical_errors": 37543,
|
| 140 |
+
"qadapt_ler": 0.0938575,
|
| 141 |
+
"qadapt_reduction_vs_ising_fast_percent": 5.79393756900532,
|
| 142 |
+
"ising_fast_backend_latency_us_per_round": 0.7209028746001422,
|
| 143 |
+
"qadapt_backend_latency_us_per_round": 0.6945591699331999
|
| 144 |
+
},
|
| 145 |
+
"d7": {
|
| 146 |
+
"ising_fast_logical_errors": 8412,
|
| 147 |
+
"ising_fast_ler": 0.08412,
|
| 148 |
+
"qadapt_logical_errors": 8201,
|
| 149 |
+
"qadapt_ler": 0.08201,
|
| 150 |
+
"qadapt_reduction_vs_ising_fast_percent": 2.50832144555397,
|
| 151 |
+
"ising_fast_backend_latency_us_per_round": 1.344656078144908,
|
| 152 |
+
"qadapt_backend_latency_us_per_round": 1.3134985323995352
|
| 153 |
+
}
|
| 154 |
+
},
|
| 155 |
+
"ler_and_logical_error_match_to_paper": "exact",
|
| 156 |
+
"interpretation": "The third-party archive is not redistributed. Timing is machine-dependent; the LER and logical-error counts exactly reproduce the report."
|
| 157 |
+
},
|
| 158 |
+
"tests": {
|
| 159 |
+
"public_config": {"tests": 36, "status": "pass"},
|
| 160 |
+
"safetensors_export_and_load": {"tests": 9, "status": "pass"},
|
| 161 |
+
"compileall": "pass",
|
| 162 |
+
"full_upstream_suite": {
|
| 163 |
+
"tests": 456,
|
| 164 |
+
"successful": 424,
|
| 165 |
+
"skipped": 15,
|
| 166 |
+
"errors": 16,
|
| 167 |
+
"failures": 1,
|
| 168 |
+
"status": "environment_incomplete",
|
| 169 |
+
"non_release_blockers": {
|
| 170 |
+
"missing_optional_cuquantum": 11,
|
| 171 |
+
"missing_upstream_nvidia_model_files": 4,
|
| 172 |
+
"missing_optional_onnx_graphsurgeon": 2
|
| 173 |
+
}
|
| 174 |
+
},
|
| 175 |
+
"python_compat_script": {
|
| 176 |
+
"status": "environment_constraint_conflict",
|
| 177 |
+
"detail": "The script pinned the container's NVIDIA pre-release torch build while the public requirements requested the normal torch package, so pip stopped before code checks."
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
}
|
SHA256SUMS
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
65f979c9f23f1b13b76876c6e5df204d1bd28b0e3322483d966db0efb840600d model.safetensors
|
| 2 |
+
af5e13e389358d4aa19afa92f6d1ff368e8f64e8497f23c51ddeed9d367f724a baselines/ising-fast-t0-e100/model.safetensors
|
| 3 |
+
15f8e7d2f18158a769a5ba06d183239090c88c606519c8468f9a814998c6a986 qadapt-minimal.patch
|
| 4 |
+
6cf4c63502ef8a512859ae48c11a3ea77db997f5874dbc7662ce0d99e7386b30 REPRODUCTION_VALIDATION.json
|
| 5 |
+
d1f64fbb4c8c2af4837a71d93e6e1ee198914234c7e7a4ffdcba8b856d0494ff assets/figure2_qadapt_pipeline.png
|
| 6 |
+
b099b361bf5d1a1af57d2a7bda199c6987252735b3747267ac6e698372ec1c63 assets/figure3_htnet_architecture.png
|
| 7 |
+
7c8d6e178b8829493a0f2ed4f6bf31a0f97294158ffa939d23deefa7eb407052 assets/figure5_synthetic_ood.png
|
| 8 |
+
6ae49631e848ad7c3dd85544291840d67847ce90f9021f8b4457a2b373e67a06 assets/figure6_willow_results.png
|
assets/figure2_qadapt_pipeline.png
ADDED
|
Git LFS Details
|
assets/figure3_htnet_architecture.png
ADDED
|
Git LFS Details
|
assets/figure5_synthetic_ood.png
ADDED
|
Git LFS Details
|
assets/figure6_willow_results.png
ADDED
|
Git LFS Details
|
baselines/ising-fast-t0-e100/config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": ["PreDecoderModelMemory_v1"],
|
| 3 |
+
"model_type": "ising_fast_surface_predecoder",
|
| 4 |
+
"release_version": "v1",
|
| 5 |
+
"model_id": 1,
|
| 6 |
+
"dtype": "float32",
|
| 7 |
+
"parameters": 912772,
|
| 8 |
+
"receptive_field": 9,
|
| 9 |
+
"num_filters": [128, 128, 128, 4],
|
| 10 |
+
"kernel_size": [3, 3, 3, 3],
|
| 11 |
+
"code_rotation": "XV",
|
| 12 |
+
"upstream_commit": "33acb152e403bc189f2effdb07f1a87b34c745f1",
|
| 13 |
+
"training_tasks": ["T0"],
|
| 14 |
+
"total_epochs": 100,
|
| 15 |
+
"willow_used_for_training": false
|
| 16 |
+
}
|
baselines/ising-fast-t0-e100/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:af5e13e389358d4aa19afa92f6d1ff368e8f64e8497f23c51ddeed9d367f724a
|
| 3 |
+
size 3651904
|
config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": ["HTnet"],
|
| 3 |
+
"model_type": "qadapt_htnet",
|
| 4 |
+
"release_version": "v1",
|
| 5 |
+
"model_id": 111,
|
| 6 |
+
"dtype": "float32",
|
| 7 |
+
"parameters": 650374,
|
| 8 |
+
"receptive_field": 9,
|
| 9 |
+
"channels": 112,
|
| 10 |
+
"expand_channels": 168,
|
| 11 |
+
"num_blocks": 3,
|
| 12 |
+
"joint_groups": 6,
|
| 13 |
+
"norm_groups": 8,
|
| 14 |
+
"se_reduction": 4,
|
| 15 |
+
"code_rotation": "XV",
|
| 16 |
+
"upstream_commit": "33acb152e403bc189f2effdb07f1a87b34c745f1",
|
| 17 |
+
"training_tasks": ["T0", "T1", "T2", "T3", "T4"],
|
| 18 |
+
"epochs_per_task": 20,
|
| 19 |
+
"total_epochs": 100,
|
| 20 |
+
"training_hardware": {
|
| 21 |
+
"accelerator": "NVIDIA A100",
|
| 22 |
+
"accelerator_count": 4
|
| 23 |
+
},
|
| 24 |
+
"qewc_lambda": 100,
|
| 25 |
+
"fisher_samples_per_task": 65536,
|
| 26 |
+
"willow_used_for_training": false
|
| 27 |
+
}
|
configs/config_qadapt_t0_base.yaml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
# QAdapt T0 inference environment.
|
| 5 |
+
|
| 6 |
+
model_id: 111
|
| 7 |
+
distance: 9
|
| 8 |
+
n_rounds: 9
|
| 9 |
+
|
| 10 |
+
workflow:
|
| 11 |
+
task: inference
|
| 12 |
+
|
| 13 |
+
data:
|
| 14 |
+
code_rotation: O1
|
| 15 |
+
noise_model:
|
| 16 |
+
p_prep_X: 0.0010000
|
| 17 |
+
p_prep_Z: 0.0010000
|
| 18 |
+
p_meas_X: 0.0100000
|
| 19 |
+
p_meas_Z: 0.0100000
|
| 20 |
+
p_idle_cnot_X: 0.0003330
|
| 21 |
+
p_idle_cnot_Y: 0.0003330
|
| 22 |
+
p_idle_cnot_Z: 0.0003330
|
| 23 |
+
p_idle_spam_X: 0.0006670
|
| 24 |
+
p_idle_spam_Y: 0.0006670
|
| 25 |
+
p_idle_spam_Z: 0.0006670
|
| 26 |
+
p_cnot_IX: 0.0006670
|
| 27 |
+
p_cnot_IY: 0.0006670
|
| 28 |
+
p_cnot_IZ: 0.0006670
|
| 29 |
+
p_cnot_XI: 0.0006670
|
| 30 |
+
p_cnot_XX: 0.0006670
|
| 31 |
+
p_cnot_XY: 0.0006670
|
| 32 |
+
p_cnot_XZ: 0.0006670
|
| 33 |
+
p_cnot_YI: 0.0006670
|
| 34 |
+
p_cnot_YX: 0.0006670
|
| 35 |
+
p_cnot_YY: 0.0006670
|
| 36 |
+
p_cnot_YZ: 0.0006670
|
| 37 |
+
p_cnot_ZI: 0.0006670
|
| 38 |
+
p_cnot_ZX: 0.0006670
|
| 39 |
+
p_cnot_ZY: 0.0006670
|
| 40 |
+
p_cnot_ZZ: 0.0006670
|
configs/config_qadapt_t1_meas_1p5.yaml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
# Shared QAdapt T1 measurement-noise task.
|
| 5 |
+
|
| 6 |
+
model_id: 111
|
| 7 |
+
distance: 9
|
| 8 |
+
n_rounds: 9
|
| 9 |
+
|
| 10 |
+
workflow:
|
| 11 |
+
task: inference
|
| 12 |
+
|
| 13 |
+
data:
|
| 14 |
+
code_rotation: O1
|
| 15 |
+
noise_model:
|
| 16 |
+
p_prep_X: 0.0010000
|
| 17 |
+
p_prep_Z: 0.0010000
|
| 18 |
+
p_meas_X: 0.0150000
|
| 19 |
+
p_meas_Z: 0.0150000
|
| 20 |
+
p_idle_cnot_X: 0.0003330
|
| 21 |
+
p_idle_cnot_Y: 0.0003330
|
| 22 |
+
p_idle_cnot_Z: 0.0003330
|
| 23 |
+
p_idle_spam_X: 0.0006670
|
| 24 |
+
p_idle_spam_Y: 0.0006670
|
| 25 |
+
p_idle_spam_Z: 0.0006670
|
| 26 |
+
p_cnot_IX: 0.0006670
|
| 27 |
+
p_cnot_IY: 0.0006670
|
| 28 |
+
p_cnot_IZ: 0.0006670
|
| 29 |
+
p_cnot_XI: 0.0006670
|
| 30 |
+
p_cnot_XX: 0.0006670
|
| 31 |
+
p_cnot_XY: 0.0006670
|
| 32 |
+
p_cnot_XZ: 0.0006670
|
| 33 |
+
p_cnot_YI: 0.0006670
|
| 34 |
+
p_cnot_YX: 0.0006670
|
| 35 |
+
p_cnot_YY: 0.0006670
|
| 36 |
+
p_cnot_YZ: 0.0006670
|
| 37 |
+
p_cnot_ZI: 0.0006670
|
| 38 |
+
p_cnot_ZX: 0.0006670
|
| 39 |
+
p_cnot_ZY: 0.0006670
|
| 40 |
+
p_cnot_ZZ: 0.0006670
|
configs/config_qadapt_t2_cnot_1p5.yaml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
# Shared QAdapt T2 CNOT-noise task.
|
| 5 |
+
|
| 6 |
+
model_id: 111
|
| 7 |
+
distance: 9
|
| 8 |
+
n_rounds: 9
|
| 9 |
+
|
| 10 |
+
workflow:
|
| 11 |
+
task: inference
|
| 12 |
+
|
| 13 |
+
data:
|
| 14 |
+
code_rotation: O1
|
| 15 |
+
noise_model:
|
| 16 |
+
p_prep_X: 0.0010000
|
| 17 |
+
p_prep_Z: 0.0010000
|
| 18 |
+
p_meas_X: 0.0100000
|
| 19 |
+
p_meas_Z: 0.0100000
|
| 20 |
+
p_idle_cnot_X: 0.0003330
|
| 21 |
+
p_idle_cnot_Y: 0.0003330
|
| 22 |
+
p_idle_cnot_Z: 0.0003330
|
| 23 |
+
p_idle_spam_X: 0.0006670
|
| 24 |
+
p_idle_spam_Y: 0.0006670
|
| 25 |
+
p_idle_spam_Z: 0.0006670
|
| 26 |
+
p_cnot_IX: 0.0010005
|
| 27 |
+
p_cnot_IY: 0.0010005
|
| 28 |
+
p_cnot_IZ: 0.0010005
|
| 29 |
+
p_cnot_XI: 0.0010005
|
| 30 |
+
p_cnot_XX: 0.0010005
|
| 31 |
+
p_cnot_XY: 0.0010005
|
| 32 |
+
p_cnot_XZ: 0.0010005
|
| 33 |
+
p_cnot_YI: 0.0010005
|
| 34 |
+
p_cnot_YX: 0.0010005
|
| 35 |
+
p_cnot_YY: 0.0010005
|
| 36 |
+
p_cnot_YZ: 0.0010005
|
| 37 |
+
p_cnot_ZI: 0.0010005
|
| 38 |
+
p_cnot_ZX: 0.0010005
|
| 39 |
+
p_cnot_ZY: 0.0010005
|
| 40 |
+
p_cnot_ZZ: 0.0010005
|
configs/config_qadapt_t3_idle_1p5.yaml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
# Shared QAdapt T3 idle-noise task.
|
| 5 |
+
|
| 6 |
+
model_id: 111
|
| 7 |
+
distance: 9
|
| 8 |
+
n_rounds: 9
|
| 9 |
+
|
| 10 |
+
workflow:
|
| 11 |
+
task: inference
|
| 12 |
+
|
| 13 |
+
data:
|
| 14 |
+
code_rotation: O1
|
| 15 |
+
noise_model:
|
| 16 |
+
p_prep_X: 0.0010000
|
| 17 |
+
p_prep_Z: 0.0010000
|
| 18 |
+
p_meas_X: 0.0100000
|
| 19 |
+
p_meas_Z: 0.0100000
|
| 20 |
+
p_idle_cnot_X: 0.0004995
|
| 21 |
+
p_idle_cnot_Y: 0.0004995
|
| 22 |
+
p_idle_cnot_Z: 0.0004995
|
| 23 |
+
p_idle_spam_X: 0.0010005
|
| 24 |
+
p_idle_spam_Y: 0.0010005
|
| 25 |
+
p_idle_spam_Z: 0.0010005
|
| 26 |
+
p_cnot_IX: 0.0006670
|
| 27 |
+
p_cnot_IY: 0.0006670
|
| 28 |
+
p_cnot_IZ: 0.0006670
|
| 29 |
+
p_cnot_XI: 0.0006670
|
| 30 |
+
p_cnot_XX: 0.0006670
|
| 31 |
+
p_cnot_XY: 0.0006670
|
| 32 |
+
p_cnot_XZ: 0.0006670
|
| 33 |
+
p_cnot_YI: 0.0006670
|
| 34 |
+
p_cnot_YX: 0.0006670
|
| 35 |
+
p_cnot_YY: 0.0006670
|
| 36 |
+
p_cnot_YZ: 0.0006670
|
| 37 |
+
p_cnot_ZI: 0.0006670
|
| 38 |
+
p_cnot_ZX: 0.0006670
|
| 39 |
+
p_cnot_ZY: 0.0006670
|
| 40 |
+
p_cnot_ZZ: 0.0006670
|
configs/config_qadapt_t4_z_bias_1p5.yaml
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
|
| 4 |
+
# Shared QAdapt T4 Z-biased-noise task.
|
| 5 |
+
|
| 6 |
+
model_id: 111
|
| 7 |
+
distance: 9
|
| 8 |
+
n_rounds: 9
|
| 9 |
+
|
| 10 |
+
workflow:
|
| 11 |
+
task: inference
|
| 12 |
+
|
| 13 |
+
data:
|
| 14 |
+
code_rotation: O1
|
| 15 |
+
noise_model:
|
| 16 |
+
p_prep_X: 0.0015000
|
| 17 |
+
p_prep_Z: 0.0010000
|
| 18 |
+
p_meas_X: 0.0150000
|
| 19 |
+
p_meas_Z: 0.0100000
|
| 20 |
+
p_idle_cnot_X: 0.0003330
|
| 21 |
+
p_idle_cnot_Y: 0.0003330
|
| 22 |
+
p_idle_cnot_Z: 0.0004995
|
| 23 |
+
p_idle_spam_X: 0.0006670
|
| 24 |
+
p_idle_spam_Y: 0.0006670
|
| 25 |
+
p_idle_spam_Z: 0.0010005
|
| 26 |
+
p_cnot_IX: 0.0006670
|
| 27 |
+
p_cnot_IY: 0.0006670
|
| 28 |
+
p_cnot_IZ: 0.0010005
|
| 29 |
+
p_cnot_XI: 0.0006670
|
| 30 |
+
p_cnot_XX: 0.0006670
|
| 31 |
+
p_cnot_XY: 0.0006670
|
| 32 |
+
p_cnot_XZ: 0.0010005
|
| 33 |
+
p_cnot_YI: 0.0006670
|
| 34 |
+
p_cnot_YX: 0.0006670
|
| 35 |
+
p_cnot_YY: 0.0006670
|
| 36 |
+
p_cnot_YZ: 0.0010005
|
| 37 |
+
p_cnot_ZI: 0.0010005
|
| 38 |
+
p_cnot_ZX: 0.0010005
|
| 39 |
+
p_cnot_ZY: 0.0010005
|
| 40 |
+
p_cnot_ZZ: 0.0010005
|
evaluation.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema_version": 1,
|
| 3 |
+
"release_version": "v1",
|
| 4 |
+
"models": {
|
| 5 |
+
"ising-fast-t0-e100": {
|
| 6 |
+
"model_id": 1,
|
| 7 |
+
"parameters": 912772,
|
| 8 |
+
"source_checkpoint_sha256": "c23c9b1507cf4d213ce1b6526f87ee9e2f9db2bd8dc336c16f915b77724a0661"
|
| 9 |
+
},
|
| 10 |
+
"qadapt-e100": {
|
| 11 |
+
"model_id": 111,
|
| 12 |
+
"parameters": 650374,
|
| 13 |
+
"source_checkpoint_sha256": "59d55a948a1a99458f7ccb0bba83335a779ef90eb8b36125407b65d45d771f9f"
|
| 14 |
+
}
|
| 15 |
+
},
|
| 16 |
+
"terminal_t0_t4_d9_r9": {
|
| 17 |
+
"scope": "Release-weight coverage; not the paper's T0 architecture table.",
|
| 18 |
+
"shots_per_basis_per_task": 262144,
|
| 19 |
+
"seed": 12345,
|
| 20 |
+
"logical_error_rate": {
|
| 21 |
+
"pymatching": {
|
| 22 |
+
"T0": 0.04503440856933594,
|
| 23 |
+
"T1": 0.05488777160644531,
|
| 24 |
+
"T2": 0.1540374755859375,
|
| 25 |
+
"T3": 0.0499725341796875,
|
| 26 |
+
"T4": 0.098114013671875,
|
| 27 |
+
"mean": 0.08040924072265625
|
| 28 |
+
},
|
| 29 |
+
"ising-fast-t0-e100": {
|
| 30 |
+
"T0": 0.040943145751953125,
|
| 31 |
+
"T1": 0.052066802978515625,
|
| 32 |
+
"T2": 0.14017486572265625,
|
| 33 |
+
"T3": 0.04532432556152344,
|
| 34 |
+
"T4": 0.0913543701171875,
|
| 35 |
+
"mean": 0.07397270202636719
|
| 36 |
+
},
|
| 37 |
+
"qadapt-e100": {
|
| 38 |
+
"T0": 0.036121368408203125,
|
| 39 |
+
"T1": 0.046192169189453125,
|
| 40 |
+
"T2": 0.13011550903320312,
|
| 41 |
+
"T3": 0.04052734375,
|
| 42 |
+
"T4": 0.08282089233398438,
|
| 43 |
+
"mean": 0.06715545654296876
|
| 44 |
+
}
|
| 45 |
+
},
|
| 46 |
+
"qadapt_reduction_vs_ising_fast_mean_percent": 9.215893561612038
|
| 47 |
+
},
|
| 48 |
+
"paper_selected_ood": {
|
| 49 |
+
"protocol": "11 axis combinations x 5 multipliers x d={7,9}; X/Z pooled",
|
| 50 |
+
"shots_per_basis_per_configuration": 262144,
|
| 51 |
+
"d7": {
|
| 52 |
+
"configurations": 55,
|
| 53 |
+
"ising_fast_ler_mean": 0.23447262157093396,
|
| 54 |
+
"qadapt_ler_mean": 0.22700611461292614,
|
| 55 |
+
"qadapt_reduction_percent": 3.184383280224047,
|
| 56 |
+
"qadapt_wins": 55,
|
| 57 |
+
"ising_fast_backend_latency_us_per_round_mean": 2.3286138533266505,
|
| 58 |
+
"qadapt_backend_latency_us_per_round_mean": 2.195449274578931
|
| 59 |
+
},
|
| 60 |
+
"d9": {
|
| 61 |
+
"configurations": 55,
|
| 62 |
+
"ising_fast_ler_mean": 0.24443563981489702,
|
| 63 |
+
"qadapt_ler_mean": 0.2365336678244851,
|
| 64 |
+
"qadapt_reduction_percent": 3.232741345082013,
|
| 65 |
+
"qadapt_wins": 55,
|
| 66 |
+
"ising_fast_backend_latency_us_per_round_mean": 4.883934545490627,
|
| 67 |
+
"qadapt_backend_latency_us_per_round_mean": 4.6081848113299015
|
| 68 |
+
}
|
| 69 |
+
},
|
| 70 |
+
"paper_willow_zero_shot": {
|
| 71 |
+
"rounds": 10,
|
| 72 |
+
"fine_tuning": false,
|
| 73 |
+
"d5": {
|
| 74 |
+
"shots": 400000,
|
| 75 |
+
"ising_fast_ler": 0.09963,
|
| 76 |
+
"qadapt_ler": 0.0938575,
|
| 77 |
+
"qadapt_reduction_percent": 5.79393756900532,
|
| 78 |
+
"ising_fast_backend_latency_us_per_round": 0.704,
|
| 79 |
+
"qadapt_backend_latency_us_per_round": 0.694
|
| 80 |
+
},
|
| 81 |
+
"d7": {
|
| 82 |
+
"shots": 100000,
|
| 83 |
+
"ising_fast_ler": 0.08412,
|
| 84 |
+
"qadapt_ler": 0.08201,
|
| 85 |
+
"qadapt_reduction_percent": 2.5083214455539715,
|
| 86 |
+
"ising_fast_backend_latency_us_per_round": 1.405,
|
| 87 |
+
"qadapt_backend_latency_us_per_round": 1.274
|
| 88 |
+
}
|
| 89 |
+
},
|
| 90 |
+
"paper_t0_architecture_table": {
|
| 91 |
+
"included_for_context_only": true,
|
| 92 |
+
"warning": "The paper table used Ising-fast e53 and T0-only HTNet e89, not either final e100 release checkpoint.",
|
| 93 |
+
"d7": {"ising_fast_ler": 0.05071, "htnet_ler": 0.04280},
|
| 94 |
+
"d9": {"ising_fast_ler": 0.04037, "htnet_ler": 0.03286}
|
| 95 |
+
},
|
| 96 |
+
"latency_scope": "PyMatching residual decode only; excludes neural inference, data movement, and residual construction."
|
| 97 |
+
}
|
examples/infer_ood.py
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 3 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 4 |
+
"""Run released pre-decoders on the fixed training-axis OOD grid."""
|
| 5 |
+
|
| 6 |
+
from __future__ import annotations
|
| 7 |
+
|
| 8 |
+
import argparse
|
| 9 |
+
import sys
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
CODE_ROOT = Path(__file__).resolve().parents[1]
|
| 13 |
+
if str(CODE_ROOT) not in sys.path:
|
| 14 |
+
sys.path.insert(0, str(CODE_ROOT))
|
| 15 |
+
|
| 16 |
+
from scripts.experiments.unknown_noise.generate_unknown_axismix_grid_u1p2_5p0_configs import ( # noqa: E402
|
| 17 |
+
write_axismix_grid_configs,
|
| 18 |
+
)
|
| 19 |
+
from scripts.qadapt_example_utils import ( # noqa: E402
|
| 20 |
+
InferenceJob,
|
| 21 |
+
add_common_inference_args,
|
| 22 |
+
build_paired_command,
|
| 23 |
+
parse_gpus,
|
| 24 |
+
run_jobs,
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
PAPER_DISTANCES = (7, 9)
|
| 29 |
+
PAPER_MULTIPLIERS = (1.2, 1.5, 2.0, 2.5, 3.0)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def parse_distances(value: str) -> list[int]:
|
| 33 |
+
result = [int(item.strip()) for item in value.split(",") if item.strip()]
|
| 34 |
+
if not result or result != sorted(set(result)):
|
| 35 |
+
raise argparse.ArgumentTypeError(
|
| 36 |
+
"distances must be a non-empty, increasing comma-separated list"
|
| 37 |
+
)
|
| 38 |
+
return result
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def parse_multipliers(value: str) -> list[float]:
|
| 42 |
+
result = [float(item.strip()) for item in value.split(",") if item.strip()]
|
| 43 |
+
if not result or result != sorted(set(result)) or any(item <= 0 for item in result):
|
| 44 |
+
raise argparse.ArgumentTypeError(
|
| 45 |
+
"multipliers must be a non-empty, increasing comma-separated list "
|
| 46 |
+
"of positive numbers"
|
| 47 |
+
)
|
| 48 |
+
return result
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def parse_args() -> argparse.Namespace:
|
| 52 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 53 |
+
parser.add_argument(
|
| 54 |
+
"--distances",
|
| 55 |
+
type=parse_distances,
|
| 56 |
+
default=list(PAPER_DISTANCES),
|
| 57 |
+
help="Comma-separated distances; defaults to the paper's d=7,9 grid.",
|
| 58 |
+
)
|
| 59 |
+
parser.add_argument("--n-rounds", type=int, default=9)
|
| 60 |
+
parser.add_argument(
|
| 61 |
+
"--multipliers",
|
| 62 |
+
type=parse_multipliers,
|
| 63 |
+
default=list(PAPER_MULTIPLIERS),
|
| 64 |
+
help="Comma-separated OOD multipliers; defaults to the paper's 1.2--3.0 grid.",
|
| 65 |
+
)
|
| 66 |
+
parser.add_argument(
|
| 67 |
+
"--generated-config-dir",
|
| 68 |
+
type=Path,
|
| 69 |
+
default=Path("outputs/generated_configs/ood"),
|
| 70 |
+
)
|
| 71 |
+
parser.add_argument(
|
| 72 |
+
"--manifest",
|
| 73 |
+
type=Path,
|
| 74 |
+
default=Path("outputs/generated_configs/ood/manifest.json"),
|
| 75 |
+
)
|
| 76 |
+
add_common_inference_args(
|
| 77 |
+
parser,
|
| 78 |
+
default_output_dir=Path("outputs/examples/released_models/ood"),
|
| 79 |
+
)
|
| 80 |
+
return parser.parse_args()
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
def main() -> None:
|
| 84 |
+
args = parse_args()
|
| 85 |
+
_, manifest = write_axismix_grid_configs(
|
| 86 |
+
base_config="conf/examples/qadapt/config_qadapt_t0_base.yaml",
|
| 87 |
+
output_dir=args.generated_config_dir,
|
| 88 |
+
manifest=args.manifest,
|
| 89 |
+
grid_multipliers=args.multipliers,
|
| 90 |
+
)
|
| 91 |
+
jobs = []
|
| 92 |
+
for distance in args.distances:
|
| 93 |
+
for environment in manifest["environments"]:
|
| 94 |
+
config_file = args.generated_config_dir / environment["config_filename"]
|
| 95 |
+
label = (
|
| 96 |
+
f"d{distance}_{environment['env_key']}_"
|
| 97 |
+
f"{environment['multiplier_key']}"
|
| 98 |
+
)
|
| 99 |
+
output_path = args.output_dir / f"d{distance}" / f"{label}.json"
|
| 100 |
+
jobs.append(
|
| 101 |
+
InferenceJob(
|
| 102 |
+
label=label,
|
| 103 |
+
command=build_paired_command(
|
| 104 |
+
args,
|
| 105 |
+
config_file=config_file,
|
| 106 |
+
output_path=output_path,
|
| 107 |
+
distance=distance,
|
| 108 |
+
n_rounds=args.n_rounds,
|
| 109 |
+
),
|
| 110 |
+
output_path=output_path,
|
| 111 |
+
)
|
| 112 |
+
)
|
| 113 |
+
run_jobs(
|
| 114 |
+
jobs,
|
| 115 |
+
gpus=parse_gpus(args.gpus),
|
| 116 |
+
parallelism=args.parallelism,
|
| 117 |
+
resume=args.resume,
|
| 118 |
+
dry_run=args.dry_run,
|
| 119 |
+
)
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
if __name__ == "__main__":
|
| 123 |
+
main()
|
examples/infer_t0_t4.py
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 3 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 4 |
+
"""Run released pre-decoders on the five T0-T4 simulated noise tasks."""
|
| 5 |
+
|
| 6 |
+
from __future__ import annotations
|
| 7 |
+
|
| 8 |
+
import argparse
|
| 9 |
+
import sys
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
CODE_ROOT = Path(__file__).resolve().parents[1]
|
| 13 |
+
if str(CODE_ROOT) not in sys.path:
|
| 14 |
+
sys.path.insert(0, str(CODE_ROOT))
|
| 15 |
+
|
| 16 |
+
from scripts.qadapt_example_utils import ( # noqa: E402
|
| 17 |
+
InferenceJob,
|
| 18 |
+
TASK_CONFIGS,
|
| 19 |
+
add_common_inference_args,
|
| 20 |
+
build_paired_command,
|
| 21 |
+
parse_gpus,
|
| 22 |
+
run_jobs,
|
| 23 |
+
)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
TASK_BY_ID = {
|
| 27 |
+
f"T{index}": (task_key, config_name)
|
| 28 |
+
for index, (task_key, config_name) in enumerate(TASK_CONFIGS)
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
def parse_distances(value: str) -> list[int]:
|
| 33 |
+
result = [int(item.strip()) for item in value.split(",") if item.strip()]
|
| 34 |
+
if not result or result != sorted(set(result)):
|
| 35 |
+
raise argparse.ArgumentTypeError(
|
| 36 |
+
"distances must be a non-empty, increasing comma-separated list"
|
| 37 |
+
)
|
| 38 |
+
return result
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
def parse_tasks(value: str) -> list[str]:
|
| 42 |
+
result = [item.strip().upper() for item in value.split(",") if item.strip()]
|
| 43 |
+
if not result or len(result) != len(set(result)):
|
| 44 |
+
raise argparse.ArgumentTypeError(
|
| 45 |
+
"tasks must be a non-empty comma-separated subset of T0,T1,T2,T3,T4"
|
| 46 |
+
)
|
| 47 |
+
unknown = [item for item in result if item not in TASK_BY_ID]
|
| 48 |
+
if unknown:
|
| 49 |
+
raise argparse.ArgumentTypeError(f"unknown task(s): {','.join(unknown)}")
|
| 50 |
+
return result
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
def parse_args() -> argparse.Namespace:
|
| 54 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 55 |
+
parser.add_argument(
|
| 56 |
+
"--distances",
|
| 57 |
+
type=parse_distances,
|
| 58 |
+
default=[9],
|
| 59 |
+
help=(
|
| 60 |
+
"Comma-separated distances. Use 7,9 with --tasks T0 for the "
|
| 61 |
+
"paper's mapped-noise geometry; the default is release coverage at d=9."
|
| 62 |
+
),
|
| 63 |
+
)
|
| 64 |
+
parser.add_argument(
|
| 65 |
+
"--tasks",
|
| 66 |
+
type=parse_tasks,
|
| 67 |
+
default=list(TASK_BY_ID),
|
| 68 |
+
help="Comma-separated task subset; defaults to T0,T1,T2,T3,T4.",
|
| 69 |
+
)
|
| 70 |
+
parser.add_argument("--n-rounds", type=int, default=9)
|
| 71 |
+
add_common_inference_args(
|
| 72 |
+
parser,
|
| 73 |
+
default_output_dir=Path("outputs/examples/released_models/t0_t4"),
|
| 74 |
+
)
|
| 75 |
+
return parser.parse_args()
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
def main() -> None:
|
| 79 |
+
args = parse_args()
|
| 80 |
+
jobs = []
|
| 81 |
+
for distance in args.distances:
|
| 82 |
+
for task_id in args.tasks:
|
| 83 |
+
task_key, config_name = TASK_BY_ID[task_id]
|
| 84 |
+
label = f"d{distance}_{task_key}"
|
| 85 |
+
output_path = args.output_dir / f"d{distance}" / f"{task_key}.json"
|
| 86 |
+
jobs.append(
|
| 87 |
+
InferenceJob(
|
| 88 |
+
label=label,
|
| 89 |
+
command=build_paired_command(
|
| 90 |
+
args,
|
| 91 |
+
config_name=config_name,
|
| 92 |
+
output_path=output_path,
|
| 93 |
+
distance=distance,
|
| 94 |
+
n_rounds=args.n_rounds,
|
| 95 |
+
),
|
| 96 |
+
output_path=output_path,
|
| 97 |
+
)
|
| 98 |
+
)
|
| 99 |
+
run_jobs(
|
| 100 |
+
jobs,
|
| 101 |
+
gpus=parse_gpus(args.gpus),
|
| 102 |
+
parallelism=args.parallelism,
|
| 103 |
+
resume=args.resume,
|
| 104 |
+
dry_run=args.dry_run,
|
| 105 |
+
)
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
if __name__ == "__main__":
|
| 109 |
+
main()
|
examples/infer_willow.py
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 3 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 4 |
+
"""Reproduce the paper's d=5/d=7, ten-round Google Willow evaluation."""
|
| 5 |
+
|
| 6 |
+
from __future__ import annotations
|
| 7 |
+
|
| 8 |
+
import argparse
|
| 9 |
+
import os
|
| 10 |
+
import shlex
|
| 11 |
+
import sys
|
| 12 |
+
from pathlib import Path
|
| 13 |
+
|
| 14 |
+
CODE_ROOT = Path(__file__).resolve().parents[1]
|
| 15 |
+
if str(CODE_ROOT) not in sys.path:
|
| 16 |
+
sys.path.insert(0, str(CODE_ROOT))
|
| 17 |
+
|
| 18 |
+
from scripts.qadapt_example_utils import ( # noqa: E402
|
| 19 |
+
add_common_inference_args,
|
| 20 |
+
checkpoint_specs,
|
| 21 |
+
parse_gpus,
|
| 22 |
+
)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
| 26 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 27 |
+
parser.add_argument(
|
| 28 |
+
"--benchmark-root",
|
| 29 |
+
type=Path,
|
| 30 |
+
default=Path("benchmarks/google_qec/google_105Q_surface_code_d3_d5_d7"),
|
| 31 |
+
)
|
| 32 |
+
parser.add_argument(
|
| 33 |
+
"--distances",
|
| 34 |
+
nargs="+",
|
| 35 |
+
type=int,
|
| 36 |
+
default=[5, 7],
|
| 37 |
+
help="Paper default: d=5 and d=7.",
|
| 38 |
+
)
|
| 39 |
+
parser.add_argument(
|
| 40 |
+
"--rounds",
|
| 41 |
+
nargs="+",
|
| 42 |
+
type=int,
|
| 43 |
+
default=[10],
|
| 44 |
+
help="Paper default: ten syndrome-extraction rounds.",
|
| 45 |
+
)
|
| 46 |
+
add_common_inference_args(
|
| 47 |
+
parser,
|
| 48 |
+
default_output_dir=Path("outputs/examples/released_models/willow"),
|
| 49 |
+
default_num_samples=0,
|
| 50 |
+
)
|
| 51 |
+
return parser.parse_args(argv)
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
def main(argv: list[str] | None = None) -> int:
|
| 55 |
+
args = parse_args(argv)
|
| 56 |
+
output_path = args.output_dir / "results.json"
|
| 57 |
+
if args.resume and output_path.is_file():
|
| 58 |
+
print(f"[resume] output exists: {output_path}")
|
| 59 |
+
return 0
|
| 60 |
+
|
| 61 |
+
selected_gpus = parse_gpus(args.gpus)
|
| 62 |
+
bases = ["X", "Z"] if args.basis == "both" else [args.basis]
|
| 63 |
+
specs = checkpoint_specs(args)
|
| 64 |
+
command_preview = [
|
| 65 |
+
str(args.python),
|
| 66 |
+
"-m",
|
| 67 |
+
"scripts.providers.google_qec_decoder_benchmark",
|
| 68 |
+
"--benchmark-root",
|
| 69 |
+
str(args.benchmark_root),
|
| 70 |
+
"--distances",
|
| 71 |
+
*(str(value) for value in args.distances),
|
| 72 |
+
"--rounds",
|
| 73 |
+
*(str(value) for value in args.rounds),
|
| 74 |
+
"--bases",
|
| 75 |
+
*bases,
|
| 76 |
+
"--models",
|
| 77 |
+
*(spec.name for spec in specs),
|
| 78 |
+
"--max-shots",
|
| 79 |
+
str(args.num_samples),
|
| 80 |
+
"--batch-size",
|
| 81 |
+
str(args.batch_size),
|
| 82 |
+
"--latency-shots",
|
| 83 |
+
str(args.latency_num_samples),
|
| 84 |
+
"--output",
|
| 85 |
+
str(output_path),
|
| 86 |
+
]
|
| 87 |
+
if args.dry_run:
|
| 88 |
+
print(
|
| 89 |
+
f"[dry-run] gpu={selected_gpus[0]} seed={args.seed} "
|
| 90 |
+
+ shlex.join(command_preview)
|
| 91 |
+
)
|
| 92 |
+
for spec in specs:
|
| 93 |
+
print(
|
| 94 |
+
f"[dry-run] model {spec.name}: "
|
| 95 |
+
f"model_id={spec.model_id} checkpoint={spec.checkpoint}"
|
| 96 |
+
)
|
| 97 |
+
return 0
|
| 98 |
+
|
| 99 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = selected_gpus[0]
|
| 100 |
+
from scripts.providers import google_qec_decoder_benchmark as benchmark
|
| 101 |
+
|
| 102 |
+
benchmark.DEFAULT_MODELS = {
|
| 103 |
+
spec.name: benchmark.BenchmarkModel(
|
| 104 |
+
spec.name,
|
| 105 |
+
spec.model_id,
|
| 106 |
+
spec.checkpoint,
|
| 107 |
+
)
|
| 108 |
+
for spec in specs
|
| 109 |
+
}
|
| 110 |
+
benchmark.DEFAULT_BENCHMARK_ROOT = args.benchmark_root
|
| 111 |
+
return benchmark.main(command_preview[3:])
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
if __name__ == "__main__":
|
| 115 |
+
raise SystemExit(main())
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65f979c9f23f1b13b76876c6e5df204d1bd28b0e3322483d966db0efb840600d
|
| 3 |
+
size 2610600
|
qadapt-minimal.patch
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|