From 79be815fc9df562f2b1abccfe18544eacf56b1df Mon Sep 17 00:00:00 2001 From: Athena Caesura Date: Thu, 18 Apr 2024 13:49:57 -0400 Subject: [PATCH] feat: added small footprint factories --- .../small_footprint_factories.py | 74 +++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 src/benchq/magic_state_distillation/small_footprint_factories.py diff --git a/src/benchq/magic_state_distillation/small_footprint_factories.py b/src/benchq/magic_state_distillation/small_footprint_factories.py new file mode 100644 index 00000000..723bca17 --- /dev/null +++ b/src/benchq/magic_state_distillation/small_footprint_factories.py @@ -0,0 +1,74 @@ +from typing import Iterable + +from benchq.quantum_hardware_modeling.hardware_architecture_models import ( + BasicArchitectureModel, +) + +from .magic_state_factory import MagicStateFactory + +_ALLOWED_PHYSICAL_ERROR_RATES = 1e-5 + +_ERROR_RATE_FACTORY_MAPPING = { + 1e-5: ( + MagicStateFactory("small footprint (15-to-1)_3,1,1", 1.8e-06, (6, 7), 86, 12.1), + MagicStateFactory( + "small footprint (15-to-1)_5,1,3", 7.8e-09, (10, 9), 186, 37.3 + ), + MagicStateFactory( + "small footprint (15-to-1)_7,3,3", 5.5e-12, (14, 19), 538, 36.0 + ), + MagicStateFactory( + "small footprint (15-to-1)_9,3,3", 3.2e-14, (18, 21), 762, 36.0 + ), + MagicStateFactory( + "small footprint (15-to-1)^2_5,1,1 x (20-to-4)_11,3,5", + 6.7e-15, + (37, 22), + 1462, + 150.0, + ), + MagicStateFactory( + "small footprint (15-to-1)^4_5,1,3 x (20-to-4)_11,3,5", + 1.4e-16, + (43, 22), + 1614, + 275.1, + ), + MagicStateFactory( + "small footprint (15-to-1)^2_5,1,1 x (20-to-4)_11,5,5", + 1.3e-17, + (51, 22), + 1958, + 150.0, + ), + MagicStateFactory( + "small footprint (15-to-1)^2_5,1,1 x (20-to-4)_13,5,5", + 1.8e-20, + (51, 22), + 2350, + 150.0, + ), + MagicStateFactory( + "small footprint (15-to-1)^4_5,1,3 x (20-to-4)_15,5,5", + 2.7e-22, + (55, 30), + 2782, + 275.0, + ), + MagicStateFactory( + "small footprint (15-to-1)^4_5,1,3 x (20-to-4)_15,5,5", + 3.8e-23, + (63, 30), + 3190, + 276.8, + ), + ), +} + + +def iter_small_footprint_factories( + architecture_model: BasicArchitectureModel, +) -> Iterable[MagicStateFactory]: + assert architecture_model.physical_qubit_error_rate in _ALLOWED_PHYSICAL_ERROR_RATES + + return _ERROR_RATE_FACTORY_MAPPING[architecture_model.physical_qubit_error_rate]