ion-estimator 1.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ion_estimator-1.9.0/LICENSE +21 -0
- ion_estimator-1.9.0/PKG-INFO +282 -0
- ion_estimator-1.9.0/README.md +236 -0
- ion_estimator-1.9.0/pyproject.toml +59 -0
- ion_estimator-1.9.0/setup.cfg +14 -0
- ion_estimator-1.9.0/src/ion_estimator/__init__.py +8 -0
- ion_estimator-1.9.0/src/ion_estimator/circuit.py +148 -0
- ion_estimator-1.9.0/src/ion_estimator/cli.py +164 -0
- ion_estimator-1.9.0/src/ion_estimator/config.py +509 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/chain_gen0.yaml +128 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/chain_gen1.yaml +128 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/chain_gen2.yaml +128 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/chain_gen3.yaml +128 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/chain_gen4.yaml +128 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/chain_gen5.yaml +128 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/chain_gen6.yaml +128 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/chain_uniform.yaml +128 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen0.yaml +350 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen0_20261126_145450.yaml +550 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen1.yaml +350 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen1_20261126_235559.yaml +550 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen2.yaml +350 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen2_20261127_085309.yaml +550 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen3.yaml +350 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen3_20261125_111045.yaml +550 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen4.yaml +350 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen4_20261127_180216.yaml +550 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen5.yaml +350 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen5_20261128_031517.yaml +550 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen6.yaml +350 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_gen6_20261128_122452.yaml +550 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cnot_uniform.yaml +350 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cultivation_gen0.yaml +97 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cultivation_gen1.yaml +97 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cultivation_gen2.yaml +97 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cultivation_gen3.yaml +97 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cultivation_gen4.yaml +97 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cultivation_gen5.yaml +97 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/cultivation_gen6.yaml +97 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/distill_15to1.yaml +91 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_check_gen3_20261125_144128.yaml +82 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_check_gen3_20261125_173616.yaml +82 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_check_gen3_20261125_175256.yaml +82 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen0.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen0_20261126_015647.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen1.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen1_20261126_025314.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen2.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen2_20261126_034925.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen3.yaml +344 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen3_20261126_005915.yaml +344 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen3_20261126_010020.yaml +104 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen4.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen4_20261126_044544.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen5.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen5_20261126_054142.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen6.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/erasure_gen6_20261126_063737.yaml +184 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/idle_gen0.yaml +106 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/idle_gen1.yaml +106 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/idle_gen2.yaml +106 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/idle_gen3.yaml +106 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/idle_gen4.yaml +106 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/idle_gen5.yaml +106 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/idle_gen6.yaml +106 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/injection_gen0.yaml +668 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/injection_gen1.yaml +668 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/injection_gen2.yaml +668 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/injection_gen3.yaml +668 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/injection_gen4.yaml +668 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/injection_gen5.yaml +668 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/injection_gen6.yaml +668 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/injection_uniform.yaml +668 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen0.yaml +367 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen0_20261120_131942.yaml +1505 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen0_20261120_133317.yaml +4351 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen0_20261120_140240.yaml +4351 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen0_20261120_141303.yaml +1366 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen0_20261120_141308.yaml +5681 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen1.yaml +367 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen1_20261120_163846.yaml +4371 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen1_20261120_170942.yaml +1356 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen1_20261120_170947.yaml +5691 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen2.yaml +367 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen2_20261120_141915.yaml +4391 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen2_20261120_144958.yaml +1361 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen2_20261120_145003.yaml +5716 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3.yaml +367 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3_20261120_124856.yaml +4411 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3_20261120_131632.yaml +1366 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3_20261120_131637.yaml +5741 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3_20261120_131746.yaml +1049 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3_20261125_113313.yaml +4121 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3_20261125_121520.yaml +1331 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3_20261125_143228.yaml +1291 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen3_20261125_143234.yaml +6671 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen4.yaml +361 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen4_20261120_145600.yaml +4411 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen4_20261120_152522.yaml +1371 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen4_20261120_152527.yaml +5746 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen5.yaml +367 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen5_20261120_153123.yaml +4426 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen5_20261120_155941.yaml +1386 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen5_20261120_155945.yaml +5776 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen6.yaml +367 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen6_20261120_132133.yaml +1530 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen6_20261120_160530.yaml +4421 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen6_20261120_163233.yaml +1386 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/interval_gen6_20261120_163237.yaml +5771 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/memory_gen0.yaml +162 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/memory_gen1.yaml +162 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/memory_gen2.yaml +162 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/memory_gen3.yaml +162 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/memory_gen4.yaml +162 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/memory_gen5.yaml +162 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/memory_gen6.yaml +162 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/memory_uniform.yaml +155 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/refresh_gen3_20261124_110105.yaml +50 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/summary.csv +9 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/summary.md +32 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/tgadget_gen0.yaml +405 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/tgadget_gen1.yaml +405 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/tgadget_gen2.yaml +405 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/tgadget_gen3.yaml +405 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/tgadget_gen4.yaml +405 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/tgadget_gen5.yaml +405 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/tgadget_gen6.yaml +405 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/tgadget_uniform.yaml +405 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/timing_gen0.yaml +44 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/timing_gen1.yaml +44 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/timing_gen2.yaml +44 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/timing_gen3.yaml +44 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/timing_gen4.yaml +44 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/timing_gen5.yaml +44 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/timing_gen6.yaml +44 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen0.yaml +314 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen0_20261130_121509.yaml +511 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen1.yaml +314 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen1_20261126_152750.yaml +511 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen2.yaml +314 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen2_20261127_002819.yaml +511 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen3.yaml +314 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen3_20261124_113102.yaml +805 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen4.yaml +314 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen4_20261127_092618.yaml +511 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen5.yaml +314 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen5_20261127_183521.yaml +511 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen6.yaml +314 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_gen6_20261128_034750.yaml +511 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/fits/ystate_uniform.yaml +314 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/README.md +94 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/example_placeholder.yaml +54 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/gen0.yaml +51 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/gen1.yaml +51 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/gen2.yaml +51 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/gen3.yaml +51 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/gen4.yaml +51 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/gen5.yaml +51 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/gen6.yaml +51 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/old_configs/README.md +59 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/old_configs/qccd_2025_measured.yaml +68 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/old_configs/qccd_2027_ionq_roadmap.yaml +63 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/old_configs/qccd_2027_sol_roadmap.yaml +62 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/old_configs/qccd_2029_apollo_roadmap.yaml +63 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/hardware/old_configs/qccd_very_optimistic.yaml +60 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/catalogue.yaml +62 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/default.yaml +65 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/distillation.yaml +49 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/random.yaml +66 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/roadmap.yaml +79 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/roadmap_tuned.yaml +80 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/tiled.yaml +65 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/tiled_distillation.yaml +49 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/tiled_distillation_factory_tiles.yaml +50 -0
- ion_estimator-1.9.0/src/ion_estimator/configs/model/tiled_factory_tiles.yaml +66 -0
- ion_estimator-1.9.0/src/ion_estimator/decoder.py +38 -0
- ion_estimator-1.9.0/src/ion_estimator/erasure.py +147 -0
- ion_estimator-1.9.0/src/ion_estimator/factories.py +828 -0
- ion_estimator-1.9.0/src/ion_estimator/fits.py +270 -0
- ion_estimator-1.9.0/src/ion_estimator/hardware.py +151 -0
- ion_estimator-1.9.0/src/ion_estimator/intervals.py +176 -0
- ion_estimator-1.9.0/src/ion_estimator/layout.py +199 -0
- ion_estimator-1.9.0/src/ion_estimator/library.py +422 -0
- ion_estimator-1.9.0/src/ion_estimator/lowering.py +208 -0
- ion_estimator-1.9.0/src/ion_estimator/placement.py +127 -0
- ion_estimator-1.9.0/src/ion_estimator/qec.py +90 -0
- ion_estimator-1.9.0/src/ion_estimator/qir.py +94 -0
- ion_estimator-1.9.0/src/ion_estimator/qiskit_adapter.py +67 -0
- ion_estimator-1.9.0/src/ion_estimator/report.py +240 -0
- ion_estimator-1.9.0/src/ion_estimator/scheduler.py +1002 -0
- ion_estimator-1.9.0/src/ion_estimator/solver.py +523 -0
- ion_estimator-1.9.0/src/ion_estimator/synthesis.py +48 -0
- ion_estimator-1.9.0/src/ion_estimator/tiled.py +1067 -0
- ion_estimator-1.9.0/src/ion_estimator/units.py +39 -0
- ion_estimator-1.9.0/src/ion_estimator.egg-info/PKG-INFO +282 -0
- ion_estimator-1.9.0/src/ion_estimator.egg-info/SOURCES.txt +199 -0
- ion_estimator-1.9.0/src/ion_estimator.egg-info/dependency_links.txt +1 -0
- ion_estimator-1.9.0/src/ion_estimator.egg-info/entry_points.txt +4 -0
- ion_estimator-1.9.0/src/ion_estimator.egg-info/requires.txt +28 -0
- ion_estimator-1.9.0/src/ion_estimator.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Harshit Verma
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ion-estimator
|
|
3
|
+
Version: 1.9.0
|
|
4
|
+
Summary: Resource estimator for fault-tolerant circuits on trapped-ion (QCCD) hardware, built on an explicit schedule of surface-code patches.
|
|
5
|
+
Author-email: Harshit Verma <hvarma2@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/hvermaQ/ion-estimator
|
|
8
|
+
Project-URL: Source, https://github.com/hvermaQ/ion-estimator
|
|
9
|
+
Project-URL: Issues, https://github.com/hvermaQ/ion-estimator/issues
|
|
10
|
+
Project-URL: Documentation, https://github.com/hvermaQ/ion-estimator/blob/main/docs/README.md
|
|
11
|
+
Keywords: quantum computing,resource estimation,trapped ions,QCCD,surface code,fault tolerance
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
18
|
+
Classifier: Intended Audience :: Science/Research
|
|
19
|
+
Requires-Python: >=3.12
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: pyyaml>=6.0
|
|
23
|
+
Provides-Extra: qiskit
|
|
24
|
+
Requires-Dist: qiskit>=2.0; extra == "qiskit"
|
|
25
|
+
Provides-Extra: plots
|
|
26
|
+
Requires-Dist: matplotlib>=3.8; extra == "plots"
|
|
27
|
+
Provides-Extra: sims
|
|
28
|
+
Requires-Dist: stim>=1.16; extra == "sims"
|
|
29
|
+
Requires-Dist: sinter>=1.16; extra == "sims"
|
|
30
|
+
Requires-Dist: PyMatching>=2.4; extra == "sims"
|
|
31
|
+
Requires-Dist: ldpc>=2.4; extra == "sims"
|
|
32
|
+
Requires-Dist: numpy>=2.0; extra == "sims"
|
|
33
|
+
Requires-Dist: scipy>=1.13; extra == "sims"
|
|
34
|
+
Requires-Dist: networkx>=3.0; extra == "sims"
|
|
35
|
+
Requires-Dist: matplotlib>=3.8; extra == "sims"
|
|
36
|
+
Requires-Dist: pytest>=8.0; extra == "sims"
|
|
37
|
+
Provides-Extra: test
|
|
38
|
+
Requires-Dist: pytest>=8.0; extra == "test"
|
|
39
|
+
Requires-Dist: hypothesis>=6.100; extra == "test"
|
|
40
|
+
Requires-Dist: qiskit>=2.0; extra == "test"
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Requires-Dist: ion-estimator[plots,test]; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-cov>=5.0; extra == "dev"
|
|
44
|
+
Requires-Dist: mutmut>=3.0; extra == "dev"
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
|
|
47
|
+
# ion-estimator
|
|
48
|
+
|
|
49
|
+
A resource estimator for fault-tolerant quantum circuits on trapped-ion (QCCD) hardware.
|
|
50
|
+
|
|
51
|
+
Give it a logical circuit and a hardware description, and it tells you how many physical qubits
|
|
52
|
+
(ions) and how much time the circuit needs, and what limits it.
|
|
53
|
+
|
|
54
|
+
How it works, in brief:
|
|
55
|
+
- Each logical qubit is a **patch**: a block of ions encoding one qubit in the surface code.
|
|
56
|
+
- Patches wait in storage (the **shelf**) and are carried into a **gate zone**, where they are gated,
|
|
57
|
+
checked and carried back. The estimator **schedules** every such trip on a model of the chip.
|
|
58
|
+
- T gates consume magic states made by **factories** elsewhere on the chip.
|
|
59
|
+
- It scans chip choices (code distance, number of factories, layout) and reports the **Pareto
|
|
60
|
+
frontier**: the points where no other choice needs both fewer qubits and less time. Each point says
|
|
61
|
+
what limits it (transport, factories, decoder, idling) and where its error budget goes.
|
|
62
|
+
|
|
63
|
+
Runtime, error and bottlenecks come out of the schedule itself rather than from closed-form formulas,
|
|
64
|
+
so effects such as a crowded gate zone, patches picking up errors while they wait and the decoder's
|
|
65
|
+
reaction time show up directly. [docs/glossary.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/glossary.md)
|
|
66
|
+
defines every term.
|
|
67
|
+
|
|
68
|
+
## Install
|
|
69
|
+
|
|
70
|
+
Python 3.12 or newer (developed on 3.13; the automatic tests run on 3.12 and 3.13).
|
|
71
|
+
|
|
72
|
+
**From PyPI**, to run estimates:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install ion-estimator # built-in circuits, JSON gate lists and QIR files
|
|
76
|
+
pip install "ion-estimator[qiskit]" # adds OpenQASM input and the Qiskit-library circuits
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**From a clone**, for the tests, the simulations, batch runs and the plotting scripts:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
git clone https://github.com/hvermaQ/ion-estimator
|
|
83
|
+
cd ion-estimator
|
|
84
|
+
python3 -m venv .venv
|
|
85
|
+
source .venv/bin/activate
|
|
86
|
+
pip install -e ".[qiskit,plots]"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The `plots` extra adds `matplotlib` for chip diagrams and plots. The hardware, model and fit files
|
|
90
|
+
ship inside the package, so the estimator finds them however it is installed; in a clone,
|
|
91
|
+
`configs/` at the repository root is a link to them (`src/ion_estimator/configs/`).
|
|
92
|
+
|
|
93
|
+
Either way, the install adds three commands: `ion-estimate`, `ion-lowering` and `ion-circuits`. The
|
|
94
|
+
examples below assume the environment they were installed in is active.
|
|
95
|
+
|
|
96
|
+
## Quick start
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# the built-in circuits and the accepted input formats
|
|
100
|
+
ion-circuits
|
|
101
|
+
|
|
102
|
+
# what a circuit becomes before scheduling: logical operations, T count, rotations (no hardware needed)
|
|
103
|
+
ion-lowering --circuit builtin:toffoli --ops
|
|
104
|
+
|
|
105
|
+
# a full estimate: a Toffoli on hardware generation 3, with the chip chosen by the solver
|
|
106
|
+
ion-estimate --circuit builtin:toffoli --hardware gen3 --model roadmap
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The estimate takes a few seconds. It prints a summary of the Pareto frontier and writes every
|
|
110
|
+
scanned point to `outputs/<circuit>__<hardware>__<model>.json` in the current folder, replacing an
|
|
111
|
+
earlier file of that name; `--out FILE` chooses another. Add `--trace` to keep the full schedule of
|
|
112
|
+
each frontier point. `--help` lists every option.
|
|
113
|
+
|
|
114
|
+
`--hardware` and `--model` take the name of a shipped file (see [Inputs](#inputs)) or a path to your own
|
|
115
|
+
file. **Always pass `--hardware`:** without it the estimator uses `example_placeholder`, made-up values
|
|
116
|
+
for the tests, not a real machine. Without `--model` it uses `default`.
|
|
117
|
+
|
|
118
|
+
Estimates that use cultivation (most models) usually print a warning like
|
|
119
|
+
`UserWarning: cultivation figures are published at p = 1e-3; p_2q = ... figures used unscaled`. It is
|
|
120
|
+
expected: the published cultivation figures are used as they are, so factory error is on the cautious
|
|
121
|
+
side. It does not mean the run failed.
|
|
122
|
+
|
|
123
|
+
If the summary says **No accepted point**, no chip choice met the error budget or fitted the
|
|
124
|
+
hardware; it lists the reasons. Try a later generation (`gen4`, `gen5`, ...) or the `roadmap` model,
|
|
125
|
+
which scans the most layouts.
|
|
126
|
+
|
|
127
|
+
In a clone, `scripts/run_estimate.py`, `scripts/show_lowering.py` and `scripts/list_circuits.py` are the
|
|
128
|
+
same tools; `run_estimate.py` writes to `outputs/` at the repository root wherever it is run from.
|
|
129
|
+
|
|
130
|
+
More examples:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# a 4-qubit QFT with 15-to-1 distillation as the magic-state factory (needs generation 4 or later)
|
|
134
|
+
ion-estimate --circuit builtin:qft --arg n=4 --hardware gen4 --model distillation
|
|
135
|
+
|
|
136
|
+
# let the solver pick among every factory design (cultivation, 15-to-1, shrink-and-measure, hybrids)
|
|
137
|
+
ion-estimate --circuit builtin:toffoli --hardware gen3 --model catalogue
|
|
138
|
+
|
|
139
|
+
# your own circuit (.qasm needs the qiskit extra), with the error and decoder values fitted by the
|
|
140
|
+
# simulations in sims/ (about half a minute)
|
|
141
|
+
ion-estimate --circuit my_circuit.qasm --hardware gen3 --model roadmap --fits
|
|
142
|
+
|
|
143
|
+
# your own hardware description: copy a shipped file, edit it, pass its path
|
|
144
|
+
# (change its `name:` line too: the output file is named after it, not after the file)
|
|
145
|
+
cp "$(python -c 'from ion_estimator.config import hardware_path; print(hardware_path("gen3"))')" my_machine.yaml
|
|
146
|
+
ion-estimate --circuit builtin:toffoli --hardware my_machine.yaml
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
To try the file formats, download the small example circuit
|
|
150
|
+
[circuits/bell_t.qasm](https://github.com/hvermaQ/ion-estimator/blob/main/circuits/bell_t.qasm)
|
|
151
|
+
(also as [.json](https://github.com/hvermaQ/ion-estimator/blob/main/circuits/bell_t.json) and
|
|
152
|
+
[.ll](https://github.com/hvermaQ/ion-estimator/blob/main/circuits/bell_t.ll)).
|
|
153
|
+
|
|
154
|
+
From Python:
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
from ion_estimator.circuit import load_circuit
|
|
158
|
+
from ion_estimator.config import hardware_path, load_hardware, load_model, model_path
|
|
159
|
+
from ion_estimator.fits import link
|
|
160
|
+
from ion_estimator.report import summary_text, to_json
|
|
161
|
+
from ion_estimator.solver import estimate
|
|
162
|
+
|
|
163
|
+
circuit = load_circuit("builtin:toffoli") # or a .json / .qasm / .ll path
|
|
164
|
+
hardware = load_hardware(hardware_path("gen3")) # a shipped file by name, or any path
|
|
165
|
+
model = load_model(model_path("default"))
|
|
166
|
+
# hardware, model = link(hardware, model) # optional: the shipped fits, as --fits
|
|
167
|
+
result = estimate(circuit, hardware, model)
|
|
168
|
+
print(summary_text(result))
|
|
169
|
+
to_json(result, "outputs/toffoli_gen3.json")
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
A Qiskit `QuantumCircuit` converts with `ion_estimator.qiskit_adapter.from_qiskit(qc)`.
|
|
173
|
+
|
|
174
|
+
## Inputs
|
|
175
|
+
|
|
176
|
+
An estimate takes three inputs: a circuit, a hardware file and a model file.
|
|
177
|
+
|
|
178
|
+
**Circuits.**
|
|
179
|
+
- `builtin:<name>`: 24 built-in circuits (Toffoli, adders, QFT, QPE, Grover, Ising Trotter steps,
|
|
180
|
+
Qiskit-library arithmetic, and probes that stress one resource). Arguments go with `--arg key=value`.
|
|
181
|
+
`ion-circuits` lists them.
|
|
182
|
+
- `.json`: a gate list in this package's format (example:
|
|
183
|
+
[circuits/bell_t.json](https://github.com/hvermaQ/ion-estimator/blob/main/circuits/bell_t.json)).
|
|
184
|
+
- `.qasm`: OpenQASM 2 or 3, read through Qiskit (needs the `qiskit` extra).
|
|
185
|
+
- `.ll`: base-profile QIR as text.
|
|
186
|
+
|
|
187
|
+
The built-ins whose names start with `qk_` also need the `qiskit` extra.
|
|
188
|
+
[circuits/library/](https://github.com/hvermaQ/ion-estimator/tree/main/circuits/library) holds every
|
|
189
|
+
built-in as JSON and OpenQASM 2.
|
|
190
|
+
|
|
191
|
+
**Hardware** (`configs/hardware/`; pass the name, e.g. `--hardware gen3`).
|
|
192
|
+
- `gen0` to `gen6` are generations of a rule-based trapped-ion roadmap. Generation 0 uses measured
|
|
193
|
+
values from current machines. Each later generation doubles the gate-zone capacity, halves the gate
|
|
194
|
+
errors and multiplies every operation time by 1/√2. Generations 0 and 1 are too small to run
|
|
195
|
+
this architecture (a gate zone cannot hold two patches), so every point is rejected; results start
|
|
196
|
+
at generation 2, and generation 3 is a good place to start.
|
|
197
|
+
- `example_placeholder` holds illustrative values used by the tests. It is the default, so pass
|
|
198
|
+
`--hardware` for real estimates.
|
|
199
|
+
- `old_configs/` holds earlier roadmap points that still load by name.
|
|
200
|
+
|
|
201
|
+
Every value carries its provenance and source. The rules and sources are in
|
|
202
|
+
[configs/hardware/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/src/ion_estimator/configs/hardware/README.md). The files are plain YAML, so copy one and edit
|
|
203
|
+
it to describe other hardware (the [examples](#quick-start) show how to find a shipped file).
|
|
204
|
+
|
|
205
|
+
**Model** (`configs/model/`; pass the name, e.g. `--model roadmap`): the modelling choices. Start with
|
|
206
|
+
`roadmap`, which lets the solver choose the chip layout.
|
|
207
|
+
|
|
208
|
+
| File | Use |
|
|
209
|
+
|---|---|
|
|
210
|
+
| `default.yaml` | Used when `--model` is left out. One gate zone, cultivation as the magic-state factory; scans code distance and factory counts |
|
|
211
|
+
| `distillation.yaml` | The same with 15-to-1 distillation |
|
|
212
|
+
| `catalogue.yaml` | Every factory design; the frontier names the design at each point |
|
|
213
|
+
| `roadmap.yaml` | The tiled chip: scans tile count, factory placement and number, with the factory catalogue |
|
|
214
|
+
| `roadmap_tuned.yaml` | `roadmap.yaml` with the tuned syndrome-extraction interval |
|
|
215
|
+
| `random.yaml` | `default.yaml` with cultivation attempts and S corrections drawn at random, once per seed |
|
|
216
|
+
| `tiled*.yaml` | The tiled chip with one fixed placement (cultivation or 15-to-1; optional factory tiles) |
|
|
217
|
+
|
|
218
|
+
**Fitted values** (`configs/fits/`): with `--fits`, the estimator replaces its assumed error and
|
|
219
|
+
decoder parameters with values fitted from Stim simulations of its own circuits. These include the
|
|
220
|
+
logical error per round, the threshold penalty of transversal CNOTs, the decoder window, injection,
|
|
221
|
+
cultivation, erasure and the idle interval. The fits come from `sims/`
|
|
222
|
+
(see [sims/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/sims/README.md)). Where several files exist for one fit, the newest
|
|
223
|
+
timestamped file is read first.
|
|
224
|
+
|
|
225
|
+
## Outputs
|
|
226
|
+
|
|
227
|
+
Each frontier point reports:
|
|
228
|
+
- physical qubits (peak and average, split by role) and the chip size;
|
|
229
|
+
- expected runtime and its lower bounds;
|
|
230
|
+
- the code distance and factory choices;
|
|
231
|
+
- the error terms against the budget;
|
|
232
|
+
- the share of time each bottleneck takes.
|
|
233
|
+
|
|
234
|
+
The JSON file also holds every scanned point and the reason a point was rejected.
|
|
235
|
+
[docs/inputs_outputs.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/inputs_outputs.md) lists every field.
|
|
236
|
+
|
|
237
|
+
## Batch runs
|
|
238
|
+
|
|
239
|
+
`runs/run_analyses.sh` runs many circuits × hardware files × models in the background and summarises
|
|
240
|
+
them in one folder per batch. See [runs/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/runs/README.md).
|
|
241
|
+
|
|
242
|
+
## Simulations
|
|
243
|
+
|
|
244
|
+
`sims/` holds the Stim experiments behind `configs/fits/`, the code that fits them, and the raw counts
|
|
245
|
+
in `sims/results/`. They need extra packages; see [sims/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/sims/README.md).
|
|
246
|
+
|
|
247
|
+
## Tests
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
pip install -e ".[test]"
|
|
251
|
+
python -m pytest # unit, component and invariant tests (a few minutes)
|
|
252
|
+
python -m pytest -m e2e # full estimates against tests/golden/ (over an hour)
|
|
253
|
+
python -m pytest -m slow # the long counterexample search
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
[docs/testing.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/testing.md) describes the test levels. The simulation tests run in the
|
|
257
|
+
simulation environment: `python -m pytest sims/tests`.
|
|
258
|
+
|
|
259
|
+
## Repository layout
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
src/ion_estimator/ the estimator (lowering, scheduler, solver, factories, decoder, reports)
|
|
263
|
+
scripts/ tools run from a clone: run_estimate.py, show_lowering.py, list_circuits.py
|
|
264
|
+
(the three commands), draw_chip.py, summarize_runs.py, compare_runs.py, ...
|
|
265
|
+
configs/ hardware/, model/ and fits/ (a link into src/ion_estimator/)
|
|
266
|
+
circuits/ example circuit files and the built-in library as JSON and OpenQASM
|
|
267
|
+
runs/ batch runner and circuit lists
|
|
268
|
+
sims/ Stim simulations, fitting code and raw counts
|
|
269
|
+
tests/ tests by level, with reference outputs in tests/golden/
|
|
270
|
+
docs/ design documentation
|
|
271
|
+
figures/ figures used by the documentation
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Documentation
|
|
275
|
+
|
|
276
|
+
[docs/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/README.md) is the entry point: the machine model, how each logical gate runs,
|
|
277
|
+
the hardware parameters, factories, decoder, error model, scheduler, and the inputs and outputs.
|
|
278
|
+
[docs/roadmap.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/roadmap.md) lists the versions and what each one added.
|
|
279
|
+
|
|
280
|
+
## License
|
|
281
|
+
|
|
282
|
+
MIT; see [LICENSE](https://github.com/hvermaQ/ion-estimator/blob/main/LICENSE).
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# ion-estimator
|
|
2
|
+
|
|
3
|
+
A resource estimator for fault-tolerant quantum circuits on trapped-ion (QCCD) hardware.
|
|
4
|
+
|
|
5
|
+
Give it a logical circuit and a hardware description, and it tells you how many physical qubits
|
|
6
|
+
(ions) and how much time the circuit needs, and what limits it.
|
|
7
|
+
|
|
8
|
+
How it works, in brief:
|
|
9
|
+
- Each logical qubit is a **patch**: a block of ions encoding one qubit in the surface code.
|
|
10
|
+
- Patches wait in storage (the **shelf**) and are carried into a **gate zone**, where they are gated,
|
|
11
|
+
checked and carried back. The estimator **schedules** every such trip on a model of the chip.
|
|
12
|
+
- T gates consume magic states made by **factories** elsewhere on the chip.
|
|
13
|
+
- It scans chip choices (code distance, number of factories, layout) and reports the **Pareto
|
|
14
|
+
frontier**: the points where no other choice needs both fewer qubits and less time. Each point says
|
|
15
|
+
what limits it (transport, factories, decoder, idling) and where its error budget goes.
|
|
16
|
+
|
|
17
|
+
Runtime, error and bottlenecks come out of the schedule itself rather than from closed-form formulas,
|
|
18
|
+
so effects such as a crowded gate zone, patches picking up errors while they wait and the decoder's
|
|
19
|
+
reaction time show up directly. [docs/glossary.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/glossary.md)
|
|
20
|
+
defines every term.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
Python 3.12 or newer (developed on 3.13; the automatic tests run on 3.12 and 3.13).
|
|
25
|
+
|
|
26
|
+
**From PyPI**, to run estimates:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install ion-estimator # built-in circuits, JSON gate lists and QIR files
|
|
30
|
+
pip install "ion-estimator[qiskit]" # adds OpenQASM input and the Qiskit-library circuits
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**From a clone**, for the tests, the simulations, batch runs and the plotting scripts:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
git clone https://github.com/hvermaQ/ion-estimator
|
|
37
|
+
cd ion-estimator
|
|
38
|
+
python3 -m venv .venv
|
|
39
|
+
source .venv/bin/activate
|
|
40
|
+
pip install -e ".[qiskit,plots]"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The `plots` extra adds `matplotlib` for chip diagrams and plots. The hardware, model and fit files
|
|
44
|
+
ship inside the package, so the estimator finds them however it is installed; in a clone,
|
|
45
|
+
`configs/` at the repository root is a link to them (`src/ion_estimator/configs/`).
|
|
46
|
+
|
|
47
|
+
Either way, the install adds three commands: `ion-estimate`, `ion-lowering` and `ion-circuits`. The
|
|
48
|
+
examples below assume the environment they were installed in is active.
|
|
49
|
+
|
|
50
|
+
## Quick start
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# the built-in circuits and the accepted input formats
|
|
54
|
+
ion-circuits
|
|
55
|
+
|
|
56
|
+
# what a circuit becomes before scheduling: logical operations, T count, rotations (no hardware needed)
|
|
57
|
+
ion-lowering --circuit builtin:toffoli --ops
|
|
58
|
+
|
|
59
|
+
# a full estimate: a Toffoli on hardware generation 3, with the chip chosen by the solver
|
|
60
|
+
ion-estimate --circuit builtin:toffoli --hardware gen3 --model roadmap
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The estimate takes a few seconds. It prints a summary of the Pareto frontier and writes every
|
|
64
|
+
scanned point to `outputs/<circuit>__<hardware>__<model>.json` in the current folder, replacing an
|
|
65
|
+
earlier file of that name; `--out FILE` chooses another. Add `--trace` to keep the full schedule of
|
|
66
|
+
each frontier point. `--help` lists every option.
|
|
67
|
+
|
|
68
|
+
`--hardware` and `--model` take the name of a shipped file (see [Inputs](#inputs)) or a path to your own
|
|
69
|
+
file. **Always pass `--hardware`:** without it the estimator uses `example_placeholder`, made-up values
|
|
70
|
+
for the tests, not a real machine. Without `--model` it uses `default`.
|
|
71
|
+
|
|
72
|
+
Estimates that use cultivation (most models) usually print a warning like
|
|
73
|
+
`UserWarning: cultivation figures are published at p = 1e-3; p_2q = ... figures used unscaled`. It is
|
|
74
|
+
expected: the published cultivation figures are used as they are, so factory error is on the cautious
|
|
75
|
+
side. It does not mean the run failed.
|
|
76
|
+
|
|
77
|
+
If the summary says **No accepted point**, no chip choice met the error budget or fitted the
|
|
78
|
+
hardware; it lists the reasons. Try a later generation (`gen4`, `gen5`, ...) or the `roadmap` model,
|
|
79
|
+
which scans the most layouts.
|
|
80
|
+
|
|
81
|
+
In a clone, `scripts/run_estimate.py`, `scripts/show_lowering.py` and `scripts/list_circuits.py` are the
|
|
82
|
+
same tools; `run_estimate.py` writes to `outputs/` at the repository root wherever it is run from.
|
|
83
|
+
|
|
84
|
+
More examples:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# a 4-qubit QFT with 15-to-1 distillation as the magic-state factory (needs generation 4 or later)
|
|
88
|
+
ion-estimate --circuit builtin:qft --arg n=4 --hardware gen4 --model distillation
|
|
89
|
+
|
|
90
|
+
# let the solver pick among every factory design (cultivation, 15-to-1, shrink-and-measure, hybrids)
|
|
91
|
+
ion-estimate --circuit builtin:toffoli --hardware gen3 --model catalogue
|
|
92
|
+
|
|
93
|
+
# your own circuit (.qasm needs the qiskit extra), with the error and decoder values fitted by the
|
|
94
|
+
# simulations in sims/ (about half a minute)
|
|
95
|
+
ion-estimate --circuit my_circuit.qasm --hardware gen3 --model roadmap --fits
|
|
96
|
+
|
|
97
|
+
# your own hardware description: copy a shipped file, edit it, pass its path
|
|
98
|
+
# (change its `name:` line too: the output file is named after it, not after the file)
|
|
99
|
+
cp "$(python -c 'from ion_estimator.config import hardware_path; print(hardware_path("gen3"))')" my_machine.yaml
|
|
100
|
+
ion-estimate --circuit builtin:toffoli --hardware my_machine.yaml
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
To try the file formats, download the small example circuit
|
|
104
|
+
[circuits/bell_t.qasm](https://github.com/hvermaQ/ion-estimator/blob/main/circuits/bell_t.qasm)
|
|
105
|
+
(also as [.json](https://github.com/hvermaQ/ion-estimator/blob/main/circuits/bell_t.json) and
|
|
106
|
+
[.ll](https://github.com/hvermaQ/ion-estimator/blob/main/circuits/bell_t.ll)).
|
|
107
|
+
|
|
108
|
+
From Python:
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
from ion_estimator.circuit import load_circuit
|
|
112
|
+
from ion_estimator.config import hardware_path, load_hardware, load_model, model_path
|
|
113
|
+
from ion_estimator.fits import link
|
|
114
|
+
from ion_estimator.report import summary_text, to_json
|
|
115
|
+
from ion_estimator.solver import estimate
|
|
116
|
+
|
|
117
|
+
circuit = load_circuit("builtin:toffoli") # or a .json / .qasm / .ll path
|
|
118
|
+
hardware = load_hardware(hardware_path("gen3")) # a shipped file by name, or any path
|
|
119
|
+
model = load_model(model_path("default"))
|
|
120
|
+
# hardware, model = link(hardware, model) # optional: the shipped fits, as --fits
|
|
121
|
+
result = estimate(circuit, hardware, model)
|
|
122
|
+
print(summary_text(result))
|
|
123
|
+
to_json(result, "outputs/toffoli_gen3.json")
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
A Qiskit `QuantumCircuit` converts with `ion_estimator.qiskit_adapter.from_qiskit(qc)`.
|
|
127
|
+
|
|
128
|
+
## Inputs
|
|
129
|
+
|
|
130
|
+
An estimate takes three inputs: a circuit, a hardware file and a model file.
|
|
131
|
+
|
|
132
|
+
**Circuits.**
|
|
133
|
+
- `builtin:<name>`: 24 built-in circuits (Toffoli, adders, QFT, QPE, Grover, Ising Trotter steps,
|
|
134
|
+
Qiskit-library arithmetic, and probes that stress one resource). Arguments go with `--arg key=value`.
|
|
135
|
+
`ion-circuits` lists them.
|
|
136
|
+
- `.json`: a gate list in this package's format (example:
|
|
137
|
+
[circuits/bell_t.json](https://github.com/hvermaQ/ion-estimator/blob/main/circuits/bell_t.json)).
|
|
138
|
+
- `.qasm`: OpenQASM 2 or 3, read through Qiskit (needs the `qiskit` extra).
|
|
139
|
+
- `.ll`: base-profile QIR as text.
|
|
140
|
+
|
|
141
|
+
The built-ins whose names start with `qk_` also need the `qiskit` extra.
|
|
142
|
+
[circuits/library/](https://github.com/hvermaQ/ion-estimator/tree/main/circuits/library) holds every
|
|
143
|
+
built-in as JSON and OpenQASM 2.
|
|
144
|
+
|
|
145
|
+
**Hardware** (`configs/hardware/`; pass the name, e.g. `--hardware gen3`).
|
|
146
|
+
- `gen0` to `gen6` are generations of a rule-based trapped-ion roadmap. Generation 0 uses measured
|
|
147
|
+
values from current machines. Each later generation doubles the gate-zone capacity, halves the gate
|
|
148
|
+
errors and multiplies every operation time by 1/√2. Generations 0 and 1 are too small to run
|
|
149
|
+
this architecture (a gate zone cannot hold two patches), so every point is rejected; results start
|
|
150
|
+
at generation 2, and generation 3 is a good place to start.
|
|
151
|
+
- `example_placeholder` holds illustrative values used by the tests. It is the default, so pass
|
|
152
|
+
`--hardware` for real estimates.
|
|
153
|
+
- `old_configs/` holds earlier roadmap points that still load by name.
|
|
154
|
+
|
|
155
|
+
Every value carries its provenance and source. The rules and sources are in
|
|
156
|
+
[configs/hardware/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/src/ion_estimator/configs/hardware/README.md). The files are plain YAML, so copy one and edit
|
|
157
|
+
it to describe other hardware (the [examples](#quick-start) show how to find a shipped file).
|
|
158
|
+
|
|
159
|
+
**Model** (`configs/model/`; pass the name, e.g. `--model roadmap`): the modelling choices. Start with
|
|
160
|
+
`roadmap`, which lets the solver choose the chip layout.
|
|
161
|
+
|
|
162
|
+
| File | Use |
|
|
163
|
+
|---|---|
|
|
164
|
+
| `default.yaml` | Used when `--model` is left out. One gate zone, cultivation as the magic-state factory; scans code distance and factory counts |
|
|
165
|
+
| `distillation.yaml` | The same with 15-to-1 distillation |
|
|
166
|
+
| `catalogue.yaml` | Every factory design; the frontier names the design at each point |
|
|
167
|
+
| `roadmap.yaml` | The tiled chip: scans tile count, factory placement and number, with the factory catalogue |
|
|
168
|
+
| `roadmap_tuned.yaml` | `roadmap.yaml` with the tuned syndrome-extraction interval |
|
|
169
|
+
| `random.yaml` | `default.yaml` with cultivation attempts and S corrections drawn at random, once per seed |
|
|
170
|
+
| `tiled*.yaml` | The tiled chip with one fixed placement (cultivation or 15-to-1; optional factory tiles) |
|
|
171
|
+
|
|
172
|
+
**Fitted values** (`configs/fits/`): with `--fits`, the estimator replaces its assumed error and
|
|
173
|
+
decoder parameters with values fitted from Stim simulations of its own circuits. These include the
|
|
174
|
+
logical error per round, the threshold penalty of transversal CNOTs, the decoder window, injection,
|
|
175
|
+
cultivation, erasure and the idle interval. The fits come from `sims/`
|
|
176
|
+
(see [sims/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/sims/README.md)). Where several files exist for one fit, the newest
|
|
177
|
+
timestamped file is read first.
|
|
178
|
+
|
|
179
|
+
## Outputs
|
|
180
|
+
|
|
181
|
+
Each frontier point reports:
|
|
182
|
+
- physical qubits (peak and average, split by role) and the chip size;
|
|
183
|
+
- expected runtime and its lower bounds;
|
|
184
|
+
- the code distance and factory choices;
|
|
185
|
+
- the error terms against the budget;
|
|
186
|
+
- the share of time each bottleneck takes.
|
|
187
|
+
|
|
188
|
+
The JSON file also holds every scanned point and the reason a point was rejected.
|
|
189
|
+
[docs/inputs_outputs.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/inputs_outputs.md) lists every field.
|
|
190
|
+
|
|
191
|
+
## Batch runs
|
|
192
|
+
|
|
193
|
+
`runs/run_analyses.sh` runs many circuits × hardware files × models in the background and summarises
|
|
194
|
+
them in one folder per batch. See [runs/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/runs/README.md).
|
|
195
|
+
|
|
196
|
+
## Simulations
|
|
197
|
+
|
|
198
|
+
`sims/` holds the Stim experiments behind `configs/fits/`, the code that fits them, and the raw counts
|
|
199
|
+
in `sims/results/`. They need extra packages; see [sims/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/sims/README.md).
|
|
200
|
+
|
|
201
|
+
## Tests
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
pip install -e ".[test]"
|
|
205
|
+
python -m pytest # unit, component and invariant tests (a few minutes)
|
|
206
|
+
python -m pytest -m e2e # full estimates against tests/golden/ (over an hour)
|
|
207
|
+
python -m pytest -m slow # the long counterexample search
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
[docs/testing.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/testing.md) describes the test levels. The simulation tests run in the
|
|
211
|
+
simulation environment: `python -m pytest sims/tests`.
|
|
212
|
+
|
|
213
|
+
## Repository layout
|
|
214
|
+
|
|
215
|
+
```
|
|
216
|
+
src/ion_estimator/ the estimator (lowering, scheduler, solver, factories, decoder, reports)
|
|
217
|
+
scripts/ tools run from a clone: run_estimate.py, show_lowering.py, list_circuits.py
|
|
218
|
+
(the three commands), draw_chip.py, summarize_runs.py, compare_runs.py, ...
|
|
219
|
+
configs/ hardware/, model/ and fits/ (a link into src/ion_estimator/)
|
|
220
|
+
circuits/ example circuit files and the built-in library as JSON and OpenQASM
|
|
221
|
+
runs/ batch runner and circuit lists
|
|
222
|
+
sims/ Stim simulations, fitting code and raw counts
|
|
223
|
+
tests/ tests by level, with reference outputs in tests/golden/
|
|
224
|
+
docs/ design documentation
|
|
225
|
+
figures/ figures used by the documentation
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Documentation
|
|
229
|
+
|
|
230
|
+
[docs/README.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/README.md) is the entry point: the machine model, how each logical gate runs,
|
|
231
|
+
the hardware parameters, factories, decoder, error model, scheduler, and the inputs and outputs.
|
|
232
|
+
[docs/roadmap.md](https://github.com/hvermaQ/ion-estimator/blob/main/docs/roadmap.md) lists the versions and what each one added.
|
|
233
|
+
|
|
234
|
+
## License
|
|
235
|
+
|
|
236
|
+
MIT; see [LICENSE](https://github.com/hvermaQ/ion-estimator/blob/main/LICENSE).
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ion-estimator"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Resource estimator for fault-tolerant circuits on trapped-ion (QCCD) hardware, built on an explicit schedule of surface-code patches."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.12"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
license-files = ["LICENSE"]
|
|
13
|
+
authors = [{ name = "Harshit Verma", email = "hvarma2@gmail.com" }]
|
|
14
|
+
dependencies = ["pyyaml>=6.0"]
|
|
15
|
+
keywords = ["quantum computing", "resource estimation", "trapped ions", "QCCD", "surface code", "fault tolerance"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
"Programming Language :: Python :: 3.13",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
23
|
+
"Intended Audience :: Science/Research",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.urls]
|
|
27
|
+
Homepage = "https://github.com/hvermaQ/ion-estimator"
|
|
28
|
+
Source = "https://github.com/hvermaQ/ion-estimator"
|
|
29
|
+
Issues = "https://github.com/hvermaQ/ion-estimator/issues"
|
|
30
|
+
Documentation = "https://github.com/hvermaQ/ion-estimator/blob/main/docs/README.md"
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
# OpenQASM files, Qiskit QuantumCircuit objects and the qk_* built-in circuits
|
|
34
|
+
qiskit = ["qiskit>=2.0"]
|
|
35
|
+
# chip diagrams and plots (scripts/draw_chip.py, scripts/plot_*.py)
|
|
36
|
+
plots = ["matplotlib>=3.8"]
|
|
37
|
+
# the Stim simulations in sims/ (unpinned; sims/requirements-sims.txt pins the versions the stored data used)
|
|
38
|
+
sims = ["stim>=1.16", "sinter>=1.16", "PyMatching>=2.4", "ldpc>=2.4", "numpy>=2.0", "scipy>=1.13",
|
|
39
|
+
"networkx>=3.0", "matplotlib>=3.8", "pytest>=8.0"]
|
|
40
|
+
# the estimator's tests
|
|
41
|
+
test = ["pytest>=8.0", "hypothesis>=6.100", "qiskit>=2.0"]
|
|
42
|
+
# everything for development: tests, coverage, mutation testing, plots
|
|
43
|
+
dev = ["ion-estimator[test,plots]", "pytest-cov>=5.0", "mutmut>=3.0"]
|
|
44
|
+
|
|
45
|
+
# the same tools as scripts/run_estimate.py, show_lowering.py and list_circuits.py
|
|
46
|
+
[project.scripts]
|
|
47
|
+
ion-estimate = "ion_estimator.cli:estimate_main"
|
|
48
|
+
ion-lowering = "ion_estimator.cli:lowering_main"
|
|
49
|
+
ion-circuits = "ion_estimator.cli:circuits_main"
|
|
50
|
+
|
|
51
|
+
[tool.setuptools.dynamic]
|
|
52
|
+
version = { attr = "ion_estimator.__version__" }
|
|
53
|
+
|
|
54
|
+
[tool.setuptools.packages.find]
|
|
55
|
+
where = ["src"]
|
|
56
|
+
|
|
57
|
+
# the hardware, model and fit files ship with the package (configs/ at the repository root links here)
|
|
58
|
+
[tool.setuptools.package-data]
|
|
59
|
+
ion_estimator = ["configs/**/*"]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"""Parametric resource estimator for fault-tolerant circuits on trapped-ion (QCCD) hardware.
|
|
2
|
+
|
|
3
|
+
The estimator schedules the work instead of using closed-form timings: surface-code patches are
|
|
4
|
+
moved into a gate zone, gated, checked and moved out, and runtime, error and bottlenecks all come out
|
|
5
|
+
of that schedule. Design documentation: ``docs/`` in this folder.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
__version__ = "1.9.0"
|