diff --git a/BUILD b/BUILD index edf02263..0b1c96c7 100644 --- a/BUILD +++ b/BUILD @@ -19,9 +19,9 @@ py_wheel( name="tesseract_decoder_wheel", distribution = "tesseract_decoder", deps=[ - "//src:tesseract_decoder", + "//src:_core", "//src/py:generated_stubs", - "//src/py/_tesseract_py_util:_tesseract_py_util", + "//src/py:tesseract_decoder", ":package_data", ], version = "$(VERSION)", diff --git a/README.md b/README.md index 77bf73eb..aa76237e 100644 --- a/README.md +++ b/README.md @@ -166,6 +166,67 @@ Here are some tips for improving performance: * *DEM usage frequency output*: if `--dem-out` is specified, outputs estimated error frequencies. * *Statistics output*: includes number of shots, errors, low confidence shots, and processing time. +--- + +## Multi-Pass Graph Shattering + +For loopy 3D syndrome hypergraphs (such as circuit-level color codes under circuit noise), monolithic MWPM/beam search scales exponentially slow. Tesseract implements **Multi-Pass Graph Shattering** to sever physical error correlation edges, breaking the monolithic graph into independent, planar-like CSS stabilizer components. + +Priors (LLRs) are dynamically updated and propagated between passes using conditional probabilities to preserve physical logical accuracy while delivering up to **$1,000\times$ decoding speedups**. + +### ⚠️ Strict Annotation Requirements (Limitations) +To decode using graph shattering, Tesseract **must** be able to classify detectors into basis components. The input Stim circuit or Detector Error Model (DEM) **MUST** be annotated using one of the following conventions: +1. **Basis Tags**: Detector instructions must contain standard basis metadata tags (e.g. `detector(0, 0) D0 {"basis": "X"}` or `detector(0, 0) D1 {"basis": "Z"}`). +2. **Coordinate Conventions (Chromobius Style)**: Detector coordinates must contain at least 4 dimensions, where the 4th coordinate represents `color + 3 * basis` (Component 0: `0 <= coords[3] <= 2`, Component 1: `3 <= coords[3] <= 5`). + +If an unannotated circuit/DEM is supplied with `--multipass` enabled, Tesseract will fail fast and throw a clear `std::invalid_argument` exception. + +### CLI Options +* `--multipass`: Enable multi-pass graph shattering (default = false). +* `--num-passes`, `--num_passes`: Number of prior propagation passes (default = 2). + * `1`: Uncorrelated independent CSS decoding (planar speedup, no reweighting). + * `2`: Standard causally reweighted prior propagation decoding. + * *Note: values > 2 are experimental and were never systematically benchmarked.* +* `--multipass-strategy`, `--multipass_strategy`: Causal or static pass scheduling (default = causal). + * `causal` (Recommended): Dynamically schedules stabilizer components sequentially based on physical prior causal flow (Component 0 decodes first, updates prior edge weights, Component 1 decodes using those LLRs). + * `static`: Decodes all components in parallel without dynamic pass-to-pass LLR updates. + +### CLI Examples + +**1. Running Multi-Pass on Basis-Tag Annotated Surface Codes (using Long-Beam Settings):** +```bash +./bazel-bin/src/tesseract \ + --circuit testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00100.stim \ + --sample-num-shots 1000 \ + --multipass \ + --num-passes 2 \ + --multipass-strategy causal \ + --pqlimit 1000000 \ + --beam 20 \ + --beam-climbing \ + --no-revisit-dets \ + --num-det-orders 21 \ + --print-stats +``` + +**2. Running Multi-Pass on Coordinate-Annotated Color Codes (using Long-Beam Settings):** +```bash +./bazel-bin/src/tesseract \ + --circuit testdata/colorcodes/r=5,d=5,p=0.003,noise=si1000,c=midout_color_code_X,q=23,gates=cz.stim \ + --sample-num-shots 1000 \ + --multipass \ + --num-passes 2 \ + --multipass-strategy causal \ + --pqlimit 1000000 \ + --beam 20 \ + --beam-climbing \ + --no-revisit-dets \ + --num-det-orders 21 \ + --print-stats +``` + +--- + ## Python Interface [Full Python wrapper documentation](src/py/README.md) diff --git a/src/BUILD b/src/BUILD index f612d9a2..33d1df9b 100644 --- a/src/BUILD +++ b/src/BUILD @@ -251,6 +251,7 @@ cc_binary( linkopts = OPT_LINKOPTS, deps = [ ":libtesseract", + ":libmulti_pass_tesseract_decoder", "@argparse", "@nlohmann_json//:json", "@stim//:stim_lib", diff --git a/src/error_correlations.cc b/src/error_correlations.cc index 1697b0d5..13bbda0a 100644 --- a/src/error_correlations.cc +++ b/src/error_correlations.cc @@ -1,123 +1,123 @@ #include "error_correlations.h" -#include + #include +#include namespace tesseract { std::string ImpliedProbability::str() const { - std::stringstream ss; - ss << "ImpliedProbability(affected={"; - for (size_t i = 0; i < affected_hyperedge.size(); ++i) { - ss << affected_hyperedge[i] << (i == affected_hyperedge.size() - 1 ? "" : ","); - } - ss << "}, prob=" << probability << ")"; - return ss.str(); + std::stringstream ss; + ss << "ImpliedProbability(affected={"; + for (size_t i = 0; i < affected_hyperedge.size(); ++i) { + ss << affected_hyperedge[i] << (i == affected_hyperedge.size() - 1 ? "" : ","); + } + ss << "}, prob=" << probability << ")"; + return ss.str(); } bool ImpliedProbability::operator==(const ImpliedProbability& other) const { - return affected_hyperedge == other.affected_hyperedge && - std::abs(probability - other.probability) < 1e-12; + return affected_hyperedge == other.affected_hyperedge && + std::abs(probability - other.probability) < 1e-12; } bool ImpliedProbability::operator<(const ImpliedProbability& other) const { - if (affected_hyperedge != other.affected_hyperedge) { - return affected_hyperedge < other.affected_hyperedge; - } - return probability < other.probability; + if (affected_hyperedge != other.affected_hyperedge) { + return affected_hyperedge < other.affected_hyperedge; + } + return probability < other.probability; } -JointProbsMap get_hyperedge_joint_probabilities(const stim::DetectorErrorModel& dem) { - JointProbsMap joint_probs; - auto flattened = dem.flattened(); - - for (const auto& inst : flattened.instructions) { - if (inst.type != stim::DemInstructionType::DEM_ERROR) continue; - - double p = inst.arg_data[0]; - - std::vector components; - size_t group_start = 0; - for (size_t k = 0; k <= inst.target_data.size(); ++k) { - if (k == inst.target_data.size() || inst.target_data[k].is_separator()) { - Hyperedge hyperedge; - for (size_t j = group_start; j < k; ++j) { - const auto& target = inst.target_data[j]; - if (target.is_relative_detector_id()) { - hyperedge.push_back(target.val()); - } - } - if (!hyperedge.empty()) { - std::sort(hyperedge.begin(), hyperedge.end()); - components.push_back(hyperedge); - } - group_start = k + 1; - } - } +JointProbsMap get_hyperedge_joint_probabilities(const stim::DetectorErrorModel& dem, + const std::vector& global_det_to_comp_id) { + JointProbsMap joint_probs; + auto flattened = dem.flattened(); - // 1. Marginal probabilities (diagonal) - for (const auto& h : components) { - if (joint_probs[h].find(h) == joint_probs[h].end()) { - joint_probs[h][h] = 0.0; - } - // P(A) = P(A) XOR p - joint_probs[h][h] = joint_probs[h][h] * (1 - p) + p * (1 - joint_probs[h][h]); - } + for (const auto& inst : flattened.instructions) { + if (inst.type != stim::DemInstructionType::DEM_ERROR) continue; + + double p = inst.arg_data[0]; + + std::map comp_targets; + for (const auto& target : inst.target_data) { + if (target.is_relative_detector_id()) { + int d = target.val(); + int cid = + (d >= 0 && (size_t)d < global_det_to_comp_id.size()) ? global_det_to_comp_id[d] : -1; + if (cid != -1) comp_targets[cid].push_back(d); + } + } + + std::vector components; + for (auto& [cid, h] : comp_targets) { + std::sort(h.begin(), h.end()); + components.push_back(h); + } + + // 1. Marginal probabilities (diagonal) + for (const auto& h : components) { + if (joint_probs[h].find(h) == joint_probs[h].end()) { + joint_probs[h][h] = 0.0; + } + // P(A) = P(A) XOR p + joint_probs[h][h] = joint_probs[h][h] * (1 - p) + p * (1 - joint_probs[h][h]); + } - // 2. Joint probabilities (off-diagonal) - // For a bridging error p connecting A and B, P(A and B) += p (approx) - // Actually, the joint probability is accurately tracked via the same XOR logic - // if we assume independence of other error mechanisms. - if (components.size() > 1) { - for (size_t i = 0; i < components.size(); ++i) { - for (size_t j = 0; j < components.size(); ++j) { - if (i == j) continue; - const auto& hi = components[i]; - const auto& hj = components[j]; - if (joint_probs[hi].find(hj) == joint_probs[hi].end()) { - joint_probs[hi][hj] = 0.0; - } - // For small p, joint probability P(A and B) is roughly the sum of p's of bridging errors - joint_probs[hi][hj] = joint_probs[hi][hj] * (1 - p) + p * (1 - joint_probs[hi][hj]); - } - } + // 2. Joint probabilities (off-diagonal) + // For a bridging error p connecting A and B, P(A and B) += p (approx) + // Actually, the joint probability is accurately tracked via the same XOR logic + // if we assume independence of other error mechanisms. + if (components.size() > 1) { + for (size_t i = 0; i < components.size(); ++i) { + for (size_t j = 0; j < components.size(); ++j) { + if (i == j) continue; + const auto& hi = components[i]; + const auto& hj = components[j]; + if (joint_probs[hi].find(hj) == joint_probs[hi].end()) { + joint_probs[hi][hj] = 0.0; + } + // For small p, joint probability P(A and B) is roughly the sum of p's of bridging errors + joint_probs[hi][hj] = joint_probs[hi][hj] * (1 - p) + p * (1 - joint_probs[hi][hj]); } + } } + } - return joint_probs; + return joint_probs; } ImpliedProbsMap get_implied_hyperedge_probabilities(const JointProbsMap& joint_probs) { - ImpliedProbsMap implied_probs; + ImpliedProbsMap implied_probs; - for (const auto& [causal, affected_map] : joint_probs) { - double p_causal = 0.0; - auto it_self = affected_map.find(causal); - if (it_self != affected_map.end()) { - p_causal = it_self->second; - } + for (const auto& [causal, affected_map] : joint_probs) { + double p_causal = 0.0; + auto it_self = affected_map.find(causal); + if (it_self != affected_map.end()) { + p_causal = it_self->second; + } - if (p_causal <= 0 || p_causal >= 1.0) continue; + if (p_causal <= 0 || p_causal >= 1.0) continue; - for (const auto& [affected, p_joint] : affected_map) { - if (causal == affected) continue; + for (const auto& [affected, p_joint] : affected_map) { + if (causal == affected) continue; - // Conditional Probability P(affected | causal) = P(affected and causal) / P(causal) - double p_conditional = p_joint / p_causal; - - // Cap to 1.0 (numerical precision) - if (p_conditional > 1.0) p_conditional = 1.0; - if (p_conditional < 0.0) p_conditional = 0.0; + // Conditional Probability P(affected | causal) = P(affected and causal) / P(causal) + double p_conditional = p_joint / p_causal; - implied_probs[causal].push_back({affected, p_conditional}); - } + // Cap to 1.0 (numerical precision) + if (p_conditional > 1.0) p_conditional = 1.0; + if (p_conditional < 0.0) p_conditional = 0.0; + + implied_probs[causal].push_back({affected, p_conditional}); } + } - return implied_probs; + return implied_probs; } -ImpliedProbsMap process_dem_correlations(const stim::DetectorErrorModel& dem) { - auto joint = get_hyperedge_joint_probabilities(dem); - return get_implied_hyperedge_probabilities(joint); +ImpliedProbsMap process_dem_correlations(const stim::DetectorErrorModel& dem, + const std::vector& global_det_to_comp_id) { + auto joint = get_hyperedge_joint_probabilities(dem, global_det_to_comp_id); + return get_implied_hyperedge_probabilities(joint); } -} // namespace tesseract +} // namespace tesseract diff --git a/src/error_correlations.h b/src/error_correlations.h index 1c4db18b..39b70b4d 100644 --- a/src/error_correlations.h +++ b/src/error_correlations.h @@ -1,12 +1,12 @@ #ifndef ERROR_CORRELATIONS_H #define ERROR_CORRELATIONS_H +#include #include #include #include -#include #include -#include +#include #include "stim.h" @@ -16,27 +16,29 @@ namespace tesseract { * Represents a probability adjustment for an affected hyperedge given a causal hyperedge. */ struct ImpliedProbability { - std::vector affected_hyperedge; - double probability; // Represents the conditional probability P(affected | causal) + std::vector affected_hyperedge; + double probability; // Represents the conditional probability P(affected | causal) - std::string str() const; - bool operator==(const ImpliedProbability& other) const; - bool operator<(const ImpliedProbability& other) const; + std::string str() const; + bool operator==(const ImpliedProbability& other) const; + bool operator<(const ImpliedProbability& other) const; }; // Type alias for hyperedge (sorted detector indices) using Hyperedge = std::vector; // Type alias for joint probabilities map: causal_hyperedge -> {affected_hyperedge -> joint_prob} using JointProbsMap = std::map>; -// Type alias for implied probabilities map: causal_hyperedge -> list of conditional probability updates +// Type alias for implied probabilities map: causal_hyperedge -> list of conditional probability +// updates using ImpliedProbsMap = std::map>; /** * Calculates marginal and joint probabilities for hyperedges in a DEM. - * Note: Assumes the input DEM has NOT been decomposed yet, as we need bridging errors + * Note: Assumes the input DEM has NOT been decomposed yet, as we need bridging errors * to find joint probabilities. */ -JointProbsMap get_hyperedge_joint_probabilities(const stim::DetectorErrorModel& dem); +JointProbsMap get_hyperedge_joint_probabilities(const stim::DetectorErrorModel& dem, + const std::vector& global_det_to_comp_id); /** * Calculates conditional probabilities from joint probabilities. @@ -46,8 +48,9 @@ ImpliedProbsMap get_implied_hyperedge_probabilities(const JointProbsMap& joint_p /** * Complete workflow for analyzing correlations within a stim::DetectorErrorModel. */ -ImpliedProbsMap process_dem_correlations(const stim::DetectorErrorModel& dem); +ImpliedProbsMap process_dem_correlations(const stim::DetectorErrorModel& dem, + const std::vector& global_det_to_comp_id); -} // namespace tesseract +} // namespace tesseract -#endif // ERROR_CORRELATIONS_H +#endif // ERROR_CORRELATIONS_H diff --git a/src/error_correlations.test.cc b/src/error_correlations.test.cc index 6d20cf21..063795bf 100644 --- a/src/error_correlations.test.cc +++ b/src/error_correlations.test.cc @@ -1,58 +1,61 @@ -#include "gtest/gtest.h" #include "error_correlations.h" + #include +#include "gtest/gtest.h" + using namespace tesseract; TEST(TwoPassCorrelationsTest, JointProbabilities) { - stim::DetectorErrorModel dem(R"DEM( + stim::DetectorErrorModel dem(R"DEM( error(0.1) D0 ^ D1 error(0.2) D0 )DEM"); - auto joint = get_hyperedge_joint_probabilities(dem); - - Hyperedge h0 = {0}; - Hyperedge h1 = {1}; - - // P(D0) = 0.1 XOR 0.2 = 0.1*(1-0.2) + 0.2*(1-0.1) = 0.08 + 0.18 = 0.26 - EXPECT_NEAR(joint[h0][h0], 0.26, 1e-6); - // P(D1) = 0.1 - EXPECT_NEAR(joint[h1][h1], 0.1, 1e-6); - // P(D0 and D1) = 0.1 - EXPECT_NEAR(joint[h0][h1], 0.1, 1e-6); - EXPECT_NEAR(joint[h1][h0], 0.1, 1e-6); + std::vector global_det_to_comp_id = {0, 1}; + auto joint = get_hyperedge_joint_probabilities(dem, global_det_to_comp_id); + + Hyperedge h0 = {0}; + Hyperedge h1 = {1}; + + // P(D0) = 0.1 XOR 0.2 = 0.1*(1-0.2) + 0.2*(1-0.1) = 0.08 + 0.18 = 0.26 + EXPECT_NEAR(joint[h0][h0], 0.26, 1e-6); + // P(D1) = 0.1 + EXPECT_NEAR(joint[h1][h1], 0.1, 1e-6); + // P(D0 and D1) = 0.1 + EXPECT_NEAR(joint[h0][h1], 0.1, 1e-6); + EXPECT_NEAR(joint[h1][h0], 0.1, 1e-6); } TEST(TwoPassCorrelationsTest, ImpliedProbabilities) { - JointProbsMap joint; - Hyperedge h0 = {0}; - Hyperedge h1 = {1}; - - joint[h0][h0] = 0.2; - joint[h1][h1] = 0.1; - joint[h0][h1] = 0.05; - joint[h1][h0] = 0.05; - - auto implied = get_implied_hyperedge_probabilities(joint); - - // P(D1 | D0) = 0.05 / 0.2 = 0.25 - bool found = false; - for (const auto& imp : implied[h0]) { - if (imp.affected_hyperedge == h1) { - EXPECT_NEAR(imp.probability, 0.25, 1e-6); - found = true; - } + JointProbsMap joint; + Hyperedge h0 = {0}; + Hyperedge h1 = {1}; + + joint[h0][h0] = 0.2; + joint[h1][h1] = 0.1; + joint[h0][h1] = 0.05; + joint[h1][h0] = 0.05; + + auto implied = get_implied_hyperedge_probabilities(joint); + + // P(D1 | D0) = 0.05 / 0.2 = 0.25 + bool found = false; + for (const auto& imp : implied[h0]) { + if (imp.affected_hyperedge == h1) { + EXPECT_NEAR(imp.probability, 0.25, 1e-6); + found = true; } - EXPECT_TRUE(found); - - // P(D0 | D1) = 0.05 / 0.1 = 0.5 - found = false; - for (const auto& imp : implied[h1]) { - if (imp.affected_hyperedge == h0) { - EXPECT_NEAR(imp.probability, 0.5, 1e-6); - found = true; - } + } + EXPECT_TRUE(found); + + // P(D0 | D1) = 0.05 / 0.1 = 0.5 + found = false; + for (const auto& imp : implied[h1]) { + if (imp.affected_hyperedge == h0) { + EXPECT_NEAR(imp.probability, 0.5, 1e-6); + found = true; } - EXPECT_TRUE(found); + } + EXPECT_TRUE(found); } diff --git a/src/multi_pass_sinter_compat.pybind.h b/src/multi_pass_sinter_compat.pybind.h index 3f85edc2..a19fd4e4 100644 --- a/src/multi_pass_sinter_compat.pybind.h +++ b/src/multi_pass_sinter_compat.pybind.h @@ -126,7 +126,8 @@ void pybind_multi_pass_sinter_compat(py::module& m) { py::class_(m, "MultiPassSinterCompiledDecoder") .def_property_readonly("num_components", &MultiPassSinterCompiledDecoder::num_components) .def("decode_shots_bit_packed", &MultiPassSinterCompiledDecoder::decode_shots_bit_packed, - py::kw_only(), py::arg("bit_packed_detection_event_data")); + py::kw_only(), py::arg("bit_packed_detection_event_data"), + py::call_guard()); py::class_(m, "MultiPassSinterDecoder") .def(py::init(), py::arg("num_passes") = 2) diff --git a/src/multi_pass_tesseract_decoder.cc b/src/multi_pass_tesseract_decoder.cc index c360ec1b..bf3641b0 100644 --- a/src/multi_pass_tesseract_decoder.cc +++ b/src/multi_pass_tesseract_decoder.cc @@ -1,319 +1,415 @@ #include "multi_pass_tesseract_decoder.h" -#include "dem_decomposition.h" -#include -#include + #include -#include #include #include +#include +#include +#include + +#include "dem_decomposition.h" namespace tesseract { MultiPassTesseractDecoder::MultiPassTesseractDecoder( - const stim::DetectorErrorModel& dem, - size_t num_passes, - const DetectorClassifier& classifier, - const TesseractConfig& base_config, - size_t num_det_orders, - DetOrder det_order_method, - uint64_t seed, - SchedulingStrategy strategy) - : num_passes(num_passes), strategy(strategy), + const stim::DetectorErrorModel& dem, size_t num_passes, + const DetectorClassifier& classifier, const TesseractConfig& base_config, + size_t num_det_orders, DetOrder det_order_method, uint64_t seed, + SchedulingStrategy strategy) + : num_passes(num_passes), + strategy(strategy), total_global_detectors(dem.count_detectors()), - base_config(base_config), - num_det_orders(num_det_orders), det_order_method(det_order_method), seed(seed) { - initialize(dem, classifier); + base_config(base_config), + num_det_orders(num_det_orders), + det_order_method(det_order_method), + seed(seed) { + initialize(dem, classifier); } -void MultiPassTesseractDecoder::initialize( - const stim::DetectorErrorModel& dem, - const DetectorClassifier& classifier) { - - stim::DetectorErrorModel flattened = dem.flattened(); - // std::cout << "DEBUG flattened:\n" << flattened << std::endl; - total_global_detectors = (size_t)flattened.count_detectors(); - - std::vector detector_classes(total_global_detectors, -1); - std::set all_ids; - std::map tags; - for (const auto& inst : flattened.instructions) { - if (inst.type == stim::DemInstructionType::DEM_DETECTOR) { - uint64_t d = inst.target_data[0].val(); - all_ids.insert(d); - tags[d] = inst.tag; - } +void MultiPassTesseractDecoder::validate_annotations( + const stim::DetectorErrorModel& dem, const DetectorClassifier& classifier) { + stim::DetectorErrorModel flattened = dem.flattened(); + size_t total_global_detectors = (size_t)flattened.count_detectors(); + + std::set all_ids; + std::map tags; + for (const auto& inst : flattened.instructions) { + if (inst.type == stim::DemInstructionType::DEM_DETECTOR) { + uint64_t d = inst.target_data[0].val(); + all_ids.insert(d); + tags[d] = inst.tag; } - auto coords_map = flattened.get_detector_coordinates(all_ids); - for (uint64_t i = 0; i < total_global_detectors; ++i) { - std::vector c = coords_map.count(i) ? coords_map.at(i) : std::vector{}; - std::string t = tags.count(i) ? tags.at(i) : ""; - detector_classes[i] = classifier((int)i, c, t); + } + auto coords_map = flattened.get_detector_coordinates(all_ids); + + std::set unique_classes; + for (size_t i = 0; i < total_global_detectors; ++i) { + std::vector c = + coords_map.count(i) ? coords_map.at(i) : std::vector{}; + std::string t = tags.count(i) ? tags.at(i) : ""; + int cls = classifier((int)i, c, t); + if (cls != -1) unique_classes.insert(cls); + } + if (unique_classes.size() < 2) { + throw std::invalid_argument( + "Multi-pass decoding requires an annotated Stim circuit/DEM with at " + "least " + "2 stabilizer components."); + } +} + +void MultiPassTesseractDecoder::initialize( + const stim::DetectorErrorModel& dem, const DetectorClassifier& classifier) { + stim::DetectorErrorModel flattened = dem.flattened(); + // std::cout << "DEBUG flattened:\n" << flattened << std::endl; + total_global_detectors = (size_t)flattened.count_detectors(); + + std::vector detector_classes(total_global_detectors, -1); + std::set all_ids; + std::map tags; + for (const auto& inst : flattened.instructions) { + if (inst.type == stim::DemInstructionType::DEM_DETECTOR) { + uint64_t d = inst.target_data[0].val(); + all_ids.insert(d); + tags[d] = inst.tag; } + } + auto coords_map = flattened.get_detector_coordinates(all_ids); + for (uint64_t i = 0; i < total_global_detectors; ++i) { + std::vector c = + coords_map.count(i) ? coords_map.at(i) : std::vector{}; + std::string t = tags.count(i) ? tags.at(i) : ""; + detector_classes[i] = classifier((int)i, c, t); + } - stim::DetectorErrorModel decomposed = decompose_errors_using_generic_classifier(flattened, classifier, true); - // std::cout << "DEBUG decomposed:\n" << decomposed << std::endl; - stim::DetectorErrorModel merged = merge_indistinguishable_errors(decomposed); - // std::cout << "DEBUG merged:\n" << merged << std::endl; - ImpliedProbsMap raw_correlations = process_dem_correlations(merged); - - std::set unique_classes; - for (int c : detector_classes) if (c != -1) unique_classes.insert(c); - - std::map class_to_comp_id; - int next_comp_id = 0; - for (int c : unique_classes) class_to_comp_id[c] = next_comp_id++; - - size_t num_components = unique_classes.size(); - component_decoders.resize(num_components); - - global_det_to_comp_id.assign(total_global_detectors, -1); - for (size_t i = 0; i < total_global_detectors; ++i) { - int c = detector_classes[i]; - if (c != -1 && class_to_comp_id.count(c)) { - int cid = class_to_comp_id[c]; - global_det_to_comp_id[i] = cid; - component_decoders[cid].component_detectors.insert((int)i); - // std::cout << "DEBUG: Assigned Global Det " << i << " to Component " << cid << std::endl; - } + stim::DetectorErrorModel decomposed = + decompose_errors_using_generic_classifier(flattened, classifier, true); + // std::cout << "DEBUG decomposed:\n" << decomposed << std::endl; + stim::DetectorErrorModel merged = merge_indistinguishable_errors(decomposed); + // std::cout << "DEBUG merged:\n" << merged << std::endl; + + std::set unique_classes; + for (int c : detector_classes) + if (c != -1) unique_classes.insert(c); + + std::map class_to_comp_id; + int next_comp_id = 0; + for (int c : unique_classes) class_to_comp_id[c] = next_comp_id++; + + size_t num_components = unique_classes.size(); + component_decoders.resize(num_components); + + global_det_to_comp_id.assign(total_global_detectors, -1); + for (size_t i = 0; i < total_global_detectors; ++i) { + int c = detector_classes[i]; + if (c != -1 && class_to_comp_id.count(c)) { + int cid = class_to_comp_id[c]; + global_det_to_comp_id[i] = cid; + component_decoders[cid].component_detectors.insert((int)i); + // std::cout << "DEBUG: Assigned Global Det " << i << " to Component " << + // cid << std::endl; } + } - auto component_dems_raw = split_dem_by_component(merged, [&](int d) { - return (d >= 0 && (size_t)d < total_global_detectors) ? global_det_to_comp_id[d] : -1; - }); + ImpliedProbsMap raw_correlations = + process_dem_correlations(flattened, global_det_to_comp_id); - // std::cout << "DEBUG component_dems_raw[0]:\n" << component_dems_raw[0] << std::endl; - // std::cout << "DEBUG component_dems_raw[1]:\n" << component_dems_raw[1] << std::endl; + auto component_dems_raw = split_dem_by_component(merged, [&](int d) { + return (d >= 0 && (size_t)d < total_global_detectors) + ? global_det_to_comp_id[d] + : -1; + }); - for (size_t i = 0; i < component_decoders.size(); ++i) { - auto& cd = component_decoders[i]; - - std::vector sorted_global_dets(cd.component_detectors.begin(), cd.component_detectors.end()); - std::sort(sorted_global_dets.begin(), sorted_global_dets.end()); - for (size_t local_idx = 0; local_idx < sorted_global_dets.size(); ++local_idx) { - cd.global_to_local_det[sorted_global_dets[local_idx]] = (int)local_idx; - } + // std::cout << "DEBUG component_dems_raw[0]:\n" << component_dems_raw[0] << + // std::endl; std::cout << "DEBUG component_dems_raw[1]:\n" << + // component_dems_raw[1] << std::endl; - stim::DetectorErrorModel local_dem; - // MUST append detector instructions for ALL local detectors first to set count_detectors() correctly - for (size_t local_idx = 0; local_idx < sorted_global_dets.size(); ++local_idx) { - int global_d = sorted_global_dets[local_idx]; - std::vector c = coords_map.count(global_d) ? coords_map.at(global_d) : std::vector{}; - std::string t = tags.count(global_d) ? tags.at(global_d) : ""; - local_dem.append_detector_instruction(c, stim::DemTarget::relative_detector_id(local_idx), t); - } + for (size_t i = 0; i < component_decoders.size(); ++i) { + auto& cd = component_decoders[i]; - for (const auto& inst : component_dems_raw[i].instructions) { - if (inst.type == stim::DemInstructionType::DEM_ERROR) { - std::vector local_targets; - bool has_obs = false; - for (const auto& t : inst.target_data) { - if (t.is_relative_detector_id()) { - int global_d = t.val(); - local_targets.push_back(stim::DemTarget::relative_detector_id(cd.global_to_local_det.at(global_d))); - } else { - local_targets.push_back(t); - if (t.is_observable_id()) has_obs = true; - } - } - if (has_obs) cd.affects_observable = true; - local_dem.append_error_instruction(inst.arg_data[0], local_targets, inst.tag); - } - else if (inst.type == stim::DemInstructionType::DEM_LOGICAL_OBSERVABLE) { - local_dem.append_dem_instruction(inst); - } - } + for (size_t global_d = 0; global_d < total_global_detectors; ++global_d) { + cd.global_to_local_det[global_d] = (int)global_d; + } - // std::cout << "DEBUG: local_dem " << i << " : " << local_dem << std::endl; - - TesseractConfig config = base_config; - config.dem = local_dem; - config.merge_errors = true; - config.det_orders = build_det_orders(config.dem, num_det_orders, det_order_method, seed + i); - - cd.decoder = std::make_unique(config); - // std::cout << "DEBUG: Component " << i << " initialized with " << cd.decoder->errors.size() << " errors and " << config.dem.count_detectors() << " detectors." << std::endl; - /* - for (size_t ei = 0; ei < cd.decoder->errors.size(); ei++) { - // std::cout << " Comp " << i << " Err " << ei << ": D"; - for (int d : cd.decoder->errors[ei].symptom.detectors) // std::cout << d << " "; - // std::cout << std::endl; - } - */ - cd.error_index_to_rules.resize(cd.decoder->errors.size()); - - for (size_t ei = 0; ei < cd.decoder->errors.size(); ++ei) { - cd.original_costs.push_back(cd.decoder->errors[ei].likelihood_cost); - Hyperedge local_symptom = cd.decoder->errors[ei].symptom.detectors; - Hyperedge global_symptom; - for (int local_d : local_symptom) global_symptom.push_back(sorted_global_dets[local_d]); - std::sort(global_symptom.begin(), global_symptom.end()); - cd.symptom_to_error_index[global_symptom] = ei; - } + stim::DetectorErrorModel local_dem; + for (size_t global_d = 0; global_d < total_global_detectors; ++global_d) { + std::vector c = coords_map.count(global_d) + ? coords_map.at(global_d) + : std::vector{}; + std::string t = tags.count(global_d) ? tags.at(global_d) : ""; + local_dem.append_detector_instruction( + c, stim::DemTarget::relative_detector_id(global_d), t); } - for (const auto& [global_symptom, implied_probs] : raw_correlations) { - Hyperedge causal_symptom = global_symptom; - std::sort(causal_symptom.begin(), causal_symptom.end()); - int causal_comp = -1; - if (!causal_symptom.empty()) causal_comp = global_det_to_comp_id[causal_symptom[0]]; - if (causal_comp == -1) continue; - auto it = component_decoders[causal_comp].symptom_to_error_index.find(causal_symptom); - if (it == component_decoders[causal_comp].symptom_to_error_index.end()) continue; - size_t causal_err_idx = it->second; - for (const auto& imp : implied_probs) { - Hyperedge target_symptom = imp.affected_hyperedge; - std::sort(target_symptom.begin(), target_symptom.end()); - int target_comp = -1; - if (!target_symptom.empty()) target_comp = global_det_to_comp_id[target_symptom[0]]; - if (target_comp == -1) continue; - auto t_it = component_decoders[target_comp].symptom_to_error_index.find(target_symptom); - if (t_it != component_decoders[target_comp].symptom_to_error_index.end()) { - component_decoders[causal_comp].error_index_to_rules[causal_err_idx].push_back({ - (size_t)target_comp, t_it->second, imp.probability - }); - } + for (const auto& inst : component_dems_raw[i].instructions) { + if (inst.type == stim::DemInstructionType::DEM_ERROR) { + bool has_obs = false; + for (const auto& t : inst.target_data) { + if (t.is_observable_id()) has_obs = true; } + if (has_obs) cd.affects_observable = true; + local_dem.append_error_instruction(inst.arg_data[0], inst.target_data, + inst.tag); + } else if (inst.type == + stim::DemInstructionType::DEM_LOGICAL_OBSERVABLE) { + local_dem.append_dem_instruction(inst); + } } - if (strategy == SchedulingStrategy::Static) { - build_static_schedule(); - } else if (strategy == SchedulingStrategy::Causal) { - build_causal_schedule(); + TesseractConfig config = base_config; + config.dem = local_dem; + config.merge_errors = true; + config.det_orders = + build_det_orders(config.dem, num_det_orders, det_order_method, seed); + + cd.decoder = std::make_unique(config); + if (base_config.verbose) { + std::cout << "DEBUG: Component " << i << " initialized with " + << cd.decoder->errors.size() << " errors and " + << config.dem.count_detectors() << " detectors." << std::endl; } + cd.error_index_to_rules.resize(cd.decoder->errors.size()); + + for (size_t ei = 0; ei < cd.decoder->errors.size(); ++ei) { + cd.original_costs.push_back(cd.decoder->errors[ei].likelihood_cost); + Hyperedge global_symptom = cd.decoder->errors[ei].symptom.detectors; + std::sort(global_symptom.begin(), global_symptom.end()); + cd.symptom_to_error_index[global_symptom].push_back(ei); + } + } + + for (const auto& [global_symptom, implied_probs] : raw_correlations) { + Hyperedge causal_symptom = global_symptom; + std::sort(causal_symptom.begin(), causal_symptom.end()); + int causal_comp = -1; + if (!causal_symptom.empty()) + causal_comp = global_det_to_comp_id[causal_symptom[0]]; + if (causal_comp == -1) continue; + + auto it = component_decoders[causal_comp].symptom_to_error_index.find( + causal_symptom); + if (it == component_decoders[causal_comp].symptom_to_error_index.end()) + continue; + + // Loop through all degenerate causal error indices! + for (size_t causal_err_idx : it->second) { + for (const auto& imp : implied_probs) { + Hyperedge target_symptom = imp.affected_hyperedge; + std::sort(target_symptom.begin(), target_symptom.end()); + int target_comp = -1; + if (!target_symptom.empty()) + target_comp = global_det_to_comp_id[target_symptom[0]]; + if (target_comp == -1) continue; + + auto t_it = component_decoders[target_comp].symptom_to_error_index.find( + target_symptom); + if (t_it != + component_decoders[target_comp].symptom_to_error_index.end()) { + // Loop through all degenerate target error indices and add rules to + // each! + for (size_t target_err_idx : t_it->second) { + component_decoders[causal_comp] + .error_index_to_rules[causal_err_idx] + .push_back( + {(size_t)target_comp, target_err_idx, imp.probability}); + } + } + } + } + } + + if (strategy == SchedulingStrategy::Static) { + build_static_schedule(); + } else if (strategy == SchedulingStrategy::Causal) { + build_causal_schedule(); + } } void MultiPassTesseractDecoder::build_static_schedule() { - pass_schedule.assign(num_passes, {}); - for (size_t p = 0; p < num_passes; ++p) { - for (size_t i = 0; i < component_decoders.size(); ++i) { - pass_schedule[p].push_back(i); - } + pass_schedule.assign(num_passes, {}); + for (size_t p = 0; p < num_passes; ++p) { + for (size_t i = 0; i < component_decoders.size(); ++i) { + pass_schedule[p].push_back(i); } + } } void MultiPassTesseractDecoder::build_causal_schedule() { - size_t num_components = component_decoders.size(); - std::vector> schedule_sets(num_passes); + size_t num_components = component_decoders.size(); + std::vector> schedule_sets(num_passes); - // Initial seed: Final pass includes all components that directly affect an observable. - for (size_t i = 0; i < num_components; ++i) { - if (component_decoders[i].affects_observable) { - schedule_sets[num_passes - 1].insert(i); - } + // Initial seed: Final pass includes all components that directly affect an + // observable. + for (size_t i = 0; i < num_components; ++i) { + if (component_decoders[i].affects_observable) { + schedule_sets[num_passes - 1].insert(i); } + } - // Back-propagate dependencies through passes. - // A component is needed in pass p if it can reweight a component needed in pass p+1. - for (int p = (int)num_passes - 2; p >= 0; --p) { - // Start with everyone needed in the next pass (they might need to re-decode or bias others) - // Actually, if a component is in pass p+1, it's because it was influenced by pass p. - for (size_t target_comp_idx : schedule_sets[p + 1]) { - for (size_t causal_comp_idx = 0; causal_comp_idx < num_components; ++causal_comp_idx) { - for (const auto& rules : component_decoders[causal_comp_idx].error_index_to_rules) { - for (const auto& rule : rules) { - if (rule.target_comp_idx == target_comp_idx) { - schedule_sets[p].insert(causal_comp_idx); - } - } - } + // Back-propagate dependencies through passes. + // A component is needed in pass p if it can reweight a component needed in + // pass p+1. + for (int p = (int)num_passes - 2; p >= 0; --p) { + // Start with everyone needed in the next pass (they might need to re-decode + // or bias others) Actually, if a component is in pass p+1, it's because it + // was influenced by pass p. + for (size_t target_comp_idx : schedule_sets[p + 1]) { + for (size_t causal_comp_idx = 0; causal_comp_idx < num_components; + ++causal_comp_idx) { + for (const auto& rules : + component_decoders[causal_comp_idx].error_index_to_rules) { + for (const auto& rule : rules) { + if (rule.target_comp_idx == target_comp_idx) { + schedule_sets[p].insert(causal_comp_idx); } + } } + } } + } - // Convert sets to pass_schedule vectors. - pass_schedule.assign(num_passes, {}); - for (size_t p = 0; p < num_passes; ++p) { - for (size_t c_idx : schedule_sets[p]) { - pass_schedule[p].push_back(c_idx); - } + // Convert sets to pass_schedule vectors. + pass_schedule.assign(num_passes, {}); + for (size_t p = 0; p < num_passes; ++p) { + for (size_t c_idx : schedule_sets[p]) { + pass_schedule[p].push_back(c_idx); } + } } -std::vector MultiPassTesseractDecoder::decode(const std::vector& detections) { - last_shot_num_reweights = 0; - // 1. Multi-Pass Loop: Earlier passes only bias the final pass. - for (size_t pass = 0; pass < num_passes; ++pass) { - bool is_final_pass = (pass == num_passes - 1); - - for (size_t comp_idx : pass_schedule[pass]) { - auto& cd = component_decoders[comp_idx]; - std::vector local_dets; - for (uint64_t d : detections) { - if (cd.global_to_local_det.count((int)d)) { - local_dets.push_back((uint64_t)cd.global_to_local_det.at((int)d)); - } - } - - // Perform decoding for this component in this pass. - cd.decoder->decode_to_errors(local_dets); - - if (is_final_pass) { - // Track components that decode in the final pass for extraction. - final_pass_active_components.push_back(comp_idx); - } else { - // If this is NOT the final pass, use the results for reweighting, then discard them. - for (size_t dem_err_idx : cd.decoder->predicted_errors_buffer) { - size_t internal_err_idx = cd.decoder->dem_error_to_error.at(dem_err_idx); - if (internal_err_idx == std::numeric_limits::max()) continue; - - for (const auto& rule : cd.error_index_to_rules[internal_err_idx]) { - auto& target_cd = component_decoders[rule.target_comp_idx]; - - // Track modified components only once per shot. - if (target_cd.modified_error_indices.empty()) { - modified_component_indices.push_back(rule.target_comp_idx); - } - - // Cap probability at 0.499 to prevent negative costs in the engine. - target_cd.decoder->errors[rule.target_error_idx].set_with_probability(std::min(rule.conditional_prob, 0.499)); - target_cd.modified_error_indices.push_back(rule.target_error_idx); - last_shot_num_reweights++; - } - } - // Clear the buffer so these intermediate decisions don't contribute to the final prediction. - cd.decoder->predicted_errors_buffer.clear(); - } - } +std::vector MultiPassTesseractDecoder::decode( + const std::vector& detections) { + last_shot_num_reweights = 0; - // Sync modified costs for the next pass. - if (!is_final_pass) { - for (size_t m_comp_idx : modified_component_indices) { - auto& cd = component_decoders[m_comp_idx]; - if (!cd.modified_error_indices.empty()) { - cd.decoder->update_internal_costs(cd.modified_error_indices); - } - } + // 1. Multi-Pass Loop: Sequentially schedules component passes and propagates + // priors. + for (size_t pass = 0; pass < num_passes; ++pass) { + bool is_final_pass = (pass == num_passes - 1); + + // Decode scheduled components for the current pass layer using persistent + // local buffers. + for (size_t comp_idx : pass_schedule[pass]) { + auto& cd = component_decoders[comp_idx]; + std::vector local_dets; + for (uint64_t d : detections) { + if (cd.component_detectors.count((int)d)) { + local_dets.push_back(d); } + } + + cd.decoder->decode_to_errors(local_dets); + component_predictions[comp_idx] = cd.decoder->predicted_errors_buffer; } - // 2. Unified Logical Extraction: Collect final-pass predictions from only active components. - std::set flipped_observables; - for (size_t comp_idx : final_pass_active_components) { + if (!is_final_pass) { + // Step A: Apply Damped Fractional Memory to previously modified priors. + // Smoothly decay current modifications back toward the baseline to + // prevent message saturation. + double gamma = 0.5; // Tunable decay factor: 1.0 is strict isolation, 0.0 + // is full accumulation. + + for (size_t m_comp_idx : modified_component_indices) { + auto& cd = component_decoders[m_comp_idx]; + if (!cd.shot_all_modified_error_indices.empty()) { + for (size_t idx : cd.shot_all_modified_error_indices) { + double baseline_cost = cd.original_costs[idx]; + double current_cost = cd.decoder->errors[idx].likelihood_cost; + cd.decoder->errors[idx].likelihood_cost = + gamma * baseline_cost + (1.0 - gamma) * current_cost; + } + cd.decoder->update_internal_costs(cd.shot_all_modified_error_indices); + // Retain tracking indices so the final Surgical Reset completely + // clears cross-shot state. + } + } + + // Step B: Broadcast reweighting rules derived strictly from the latest + // predictions. + for (size_t comp_idx : pass_schedule[pass]) { auto& cd = component_decoders[comp_idx]; - if (cd.decoder->predicted_errors_buffer.empty()) continue; - - std::vector local_flips = cd.decoder->get_flipped_observables(cd.decoder->predicted_errors_buffer); - for (int obs : local_flips) { - if (flipped_observables.count(obs)) flipped_observables.erase(obs); - else flipped_observables.insert(obs); + for (size_t dem_err_idx : cd.decoder->predicted_errors_buffer) { + size_t internal_err_idx = + cd.decoder->dem_error_to_error.at(dem_err_idx); + if (internal_err_idx == std::numeric_limits::max()) continue; + + for (const auto& rule : cd.error_index_to_rules[internal_err_idx]) { + auto& target_cd = component_decoders[rule.target_comp_idx]; + + modified_component_indices.push_back(rule.target_comp_idx); + + // Apply Max-Prob Rule safely for concurrent rules within this pass + // layer. + double current_p = target_cd.decoder->errors[rule.target_error_idx] + .get_probability(); + if (rule.conditional_prob > current_p) { + target_cd.decoder->errors[rule.target_error_idx] + .set_with_probability(std::min(rule.conditional_prob, 0.5)); + target_cd.shot_all_modified_error_indices.push_back( + rule.target_error_idx); + last_shot_num_reweights++; + } + } } - } + } + + // Step C: Deduplicate modified tracking vectors and synchronize internal + // graph costs. + std::sort(modified_component_indices.begin(), + modified_component_indices.end()); + modified_component_indices.erase( + std::unique(modified_component_indices.begin(), + modified_component_indices.end()), + modified_component_indices.end()); - // 3. Surgical Reset: Restore modified costs for the next shot. - for (size_t m_comp_idx : modified_component_indices) { + for (size_t m_comp_idx : modified_component_indices) { auto& cd = component_decoders[m_comp_idx]; - for (size_t idx : cd.modified_error_indices) { - cd.decoder->errors[idx].likelihood_cost = cd.original_costs[idx]; + if (!cd.shot_all_modified_error_indices.empty()) { + std::sort(cd.shot_all_modified_error_indices.begin(), + cd.shot_all_modified_error_indices.end()); + cd.shot_all_modified_error_indices.erase( + std::unique(cd.shot_all_modified_error_indices.begin(), + cd.shot_all_modified_error_indices.end()), + cd.shot_all_modified_error_indices.end()); + cd.decoder->update_internal_costs(cd.shot_all_modified_error_indices); } - cd.decoder->update_internal_costs(cd.modified_error_indices); - cd.modified_error_indices.clear(); + } + } + } + + // 2. Unified Logical Extraction: Collect final predictions from ALL + // components that ran during the shot. + std::set flipped_observables; + for (const auto& [comp_idx, preds] : component_predictions) { + auto& cd = component_decoders[comp_idx]; + if (preds.empty()) continue; + + std::vector local_flips = cd.decoder->get_flipped_observables(preds); + for (int obs : local_flips) { + if (flipped_observables.count(obs)) + flipped_observables.erase(obs); + else + flipped_observables.insert(obs); + } + } + + // 3. Surgical Reset: Restore modified costs to leave the internal structures + // pristine for the next shot. + for (size_t m_comp_idx : modified_component_indices) { + auto& cd = component_decoders[m_comp_idx]; + if (!cd.shot_all_modified_error_indices.empty()) { + for (size_t idx : cd.shot_all_modified_error_indices) { + cd.decoder->errors[idx].likelihood_cost = cd.original_costs[idx]; + } + cd.decoder->update_internal_costs(cd.shot_all_modified_error_indices); + cd.shot_all_modified_error_indices.clear(); } - - // Clear shot-level tracking vectors. - modified_component_indices.clear(); - final_pass_active_components.clear(); + } + + modified_component_indices.clear(); + final_pass_active_components.clear(); - return std::vector(flipped_observables.begin(), flipped_observables.end()); + return std::vector(flipped_observables.begin(), + flipped_observables.end()); } -} // namespace tesseract +} // namespace tesseract diff --git a/src/multi_pass_tesseract_decoder.h b/src/multi_pass_tesseract_decoder.h index d5090905..f31f772d 100644 --- a/src/multi_pass_tesseract_decoder.h +++ b/src/multi_pass_tesseract_decoder.h @@ -1,106 +1,112 @@ #ifndef MULTI_PASS_TESSERACT_DECODER_H #define MULTI_PASS_TESSERACT_DECODER_H +#include +#include +#include + +#include "dem_decomposition.h" +#include "error_correlations.h" #include "stim.h" #include "tanner_graph.h" -#include "error_correlations.h" #include "tesseract.h" #include "utils.h" -#include "dem_decomposition.h" -#include -#include -#include namespace tesseract { enum class SchedulingStrategy { - Static, // Current: All components in all passes - Causal // Topological: Causal back-propagation + Static, // Current: All components in all passes + Causal // Topological: Causal back-propagation }; class MultiPassTesseractDecoder { -public: - MultiPassTesseractDecoder( - const stim::DetectorErrorModel& dem, - size_t num_passes, - const DetectorClassifier& classifier, - const TesseractConfig& base_config = TesseractConfig(), - size_t num_det_orders = 1, - DetOrder det_order_method = DetOrder::DetBFS, - uint64_t seed = 0, - SchedulingStrategy strategy = SchedulingStrategy::Static - ); - - std::vector decode(const std::vector& detections); - - void decode_shots( - std::vector& shots, - std::vector>& obs_predicted - ); - - size_t get_last_shot_num_reweights() const { return last_shot_num_reweights; } - size_t num_components() const { return component_decoders.size(); } - - private: - struct LocalReweightRule { - size_t target_comp_idx; - size_t target_error_idx; - double conditional_prob; - }; - - struct ComponentDecoder { - std::unique_ptr decoder; - std::set component_detectors; // Global indices - std::map global_to_local_det; - std::vector original_costs; - std::map symptom_to_error_index; - std::vector> error_index_to_rules; - std::vector modified_error_indices; - bool affects_observable = false; - }; - - size_t num_passes; - SchedulingStrategy strategy; - size_t total_global_detectors; - TesseractConfig base_config; - size_t num_det_orders; - ::DetOrder det_order_method; - uint64_t seed; - size_t last_shot_num_reweights = 0; - std::vector modified_component_indices; - std::vector final_pass_active_components; - std::vector component_decoders; - std::vector> pass_schedule; - std::vector global_det_to_comp_id; - - void initialize(const stim::DetectorErrorModel& dem, const DetectorClassifier& classifier); - void build_static_schedule(); - void build_causal_schedule(); - - friend class MultiPassDebugger; + public: + MultiPassTesseractDecoder( + const stim::DetectorErrorModel& dem, size_t num_passes, + const DetectorClassifier& classifier, + const TesseractConfig& base_config = TesseractConfig(), + size_t num_det_orders = 1, DetOrder det_order_method = DetOrder::DetBFS, + uint64_t seed = 0, + SchedulingStrategy strategy = SchedulingStrategy::Static); + + std::vector decode(const std::vector& detections); + + void decode_shots(std::vector& shots, + std::vector>& obs_predicted); + + static void validate_annotations(const stim::DetectorErrorModel& dem, + const DetectorClassifier& classifier); + + size_t get_last_shot_num_reweights() const { return last_shot_num_reweights; } + size_t num_components() const { return component_decoders.size(); } + + private: + struct LocalReweightRule { + size_t target_comp_idx; + size_t target_error_idx; + double conditional_prob; + }; + + struct ComponentDecoder { + std::unique_ptr decoder; + std::set component_detectors; // Global indices + std::map global_to_local_det; + std::vector original_costs; + std::map> symptom_to_error_index; + std::vector> error_index_to_rules; + std::vector modified_error_indices; + std::vector shot_all_modified_error_indices; + bool affects_observable = false; + }; + + size_t num_passes; + SchedulingStrategy strategy; + size_t total_global_detectors; + TesseractConfig base_config; + size_t num_det_orders; + ::DetOrder det_order_method; + uint64_t seed; + size_t last_shot_num_reweights = 0; + std::map> component_predictions; + std::vector modified_component_indices; + std::vector final_pass_active_components; + std::vector component_decoders; + std::vector> pass_schedule; + std::vector global_det_to_comp_id; + + void initialize(const stim::DetectorErrorModel& dem, + const DetectorClassifier& classifier); + void build_static_schedule(); + void build_causal_schedule(); + + friend class MultiPassTraceVisualizer; + friend class MultiPassDebugger; }; class MultiPassDebugger { -public: - static const std::vector>& get_pass_schedule(const MultiPassTesseractDecoder& decoder) { - return decoder.pass_schedule; - } - static size_t num_components(const MultiPassTesseractDecoder& decoder) { - return decoder.component_decoders.size(); - } - static const TesseractDecoder& get_component_decoder(const MultiPassTesseractDecoder& decoder, size_t i) { - return *decoder.component_decoders[i].decoder; - } - static const std::vector& get_modified_component_indices(const MultiPassTesseractDecoder& decoder) { - return decoder.modified_component_indices; - } - static void print_full_trace( - MultiPassTesseractDecoder& mp_decoder, - const stim::Circuit& circuit, - const std::vector& detections, - const std::vector& true_obs); + public: + static const std::vector>& get_pass_schedule( + const MultiPassTesseractDecoder& decoder) { + return decoder.pass_schedule; + } + static size_t num_components(const MultiPassTesseractDecoder& decoder) { + return decoder.component_decoders.size(); + } + static const TesseractDecoder& get_component_decoder( + const MultiPassTesseractDecoder& decoder, size_t i) { + return *decoder.component_decoders[i].decoder; + } + static const std::vector& get_modified_component_indices( + const MultiPassTesseractDecoder& decoder) { + return decoder.modified_component_indices; + } + static const MultiPassTesseractDecoder::ComponentDecoder& + get_component_decoder_full(const MultiPassTesseractDecoder& decoder, + size_t i) { + return decoder.component_decoders[i]; + } }; -} // namespace tesseract +} // namespace tesseract -#endif // MULTI_PASS_TESSERACT_DECODER_H +#endif // MULTI_PASS_TESSERACT_DECODER_H diff --git a/src/multi_pass_tesseract_decoder.test.cc b/src/multi_pass_tesseract_decoder.test.cc index 8ad37d5b..9c7a7c16 100644 --- a/src/multi_pass_tesseract_decoder.test.cc +++ b/src/multi_pass_tesseract_decoder.test.cc @@ -1,43 +1,48 @@ -#include "gtest/gtest.h" #include "multi_pass_tesseract_decoder.h" -#include -#include + #include +#include #include +#include + +#include "gtest/gtest.h" using namespace tesseract; stim::DetectorErrorModel load_test_dem(const std::string& filename) { - std::string path = "testdata/surfacecodes/" + filename; - std::ifstream is(path); - if (!is.is_open()) { - is.open(filename); - } - if (!is.is_open()) { - throw std::runtime_error("Could not open file: " + filename); - } - std::stringstream ss; - ss << is.rdbuf(); - stim::Circuit circuit(ss.str().c_str()); - return stim::ErrorAnalyzer::circuit_to_detector_error_model(circuit, true, true, false, false, false, 0.0); + std::string path = "testdata/surfacecodes/" + filename; + std::ifstream is(path); + if (!is.is_open()) { + is.open(filename); + } + if (!is.is_open()) { + throw std::runtime_error("Could not open file: " + filename); + } + std::stringstream ss; + ss << is.rdbuf(); + stim::Circuit circuit(ss.str().c_str()); + return stim::ErrorAnalyzer::circuit_to_detector_error_model( + circuit, true, true, false, false, false, 0.0); } -auto chromobius_classifier = [](int index, const std::vector& coords, const std::string& tag) -> int { - if (coords.size() < 4) return -1; - int c3 = (int)coords[3]; - if (c3 >= 0 && c3 <= 2) return 0; // Basis X - if (c3 >= 3 && c3 <= 5) return 1; // Basis Z - return -1; +auto chromobius_classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { + if (coords.size() < 4) return -1; + int c3 = (int)coords[3]; + if (c3 >= 0 && c3 <= 2) return 0; // Basis X + if (c3 >= 3 && c3 <= 5) return 1; // Basis Z + return -1; }; TEST(MultiPassTesseractDecoderTest, TwoPassCorrelationBenefit) { - // Component 0: D0 (Causal) - // Component 1: D1 (Affected) -> Observable L0 - // Rule: D0 ^ D1 exists with probability 0.1 - // Independent: D0 with prob 0.01, D1 with prob 0.2 - // If D0 is detected and explained by the bridging error, D1's probability should increase. - - stim::DetectorErrorModel dem(R"DEM( + // Component 0: D0 (Causal) + // Component 1: D1 (Affected) -> Observable L0 + // Rule: D0 ^ D1 exists with probability 0.1 + // Independent: D0 with prob 0.01, D1 with prob 0.2 + // If D0 is detected and explained by the bridging error, D1's probability + // should increase. + + stim::DetectorErrorModel dem(R"DEM( error(0.1) D0 ^ D1 L0 error(0.01) D0 error(0.2) D1 L0 @@ -46,30 +51,31 @@ TEST(MultiPassTesseractDecoderTest, TwoPassCorrelationBenefit) { logical_observable L0 )DEM"); - // Classifier: D0 -> Comp 0, D1 -> Comp 1 - auto classifier = [](int index, const std::vector& coords, const std::string& tag) -> int { - return index; - }; - - MultiPassTesseractDecoder decoder(dem, 2, classifier); - - // Shot 1: D0 and D1 both fire. - // Pass 1: Decode Comp 0. D0 is explained by the bridging error (implicit). - // Reweight: D1 L0 in Comp 1 becomes more likely. - // Pass 2: Decode Comp 1. - std::vector detections = {0, 1}; - std::vector result = decoder.decode(detections); - - // In this specific model, if D0 and D1 both fire, - // the most likely explanation is the bridging error (0.1) - // vs independent (0.01 * 0.2 = 0.002). - // The bridging error flips L0. - // So we expect L0 to be flipped. - ASSERT_TRUE(std::find(result.begin(), result.end(), 0) != result.end()); + // Classifier: D0 -> Comp 0, D1 -> Comp 1 + auto classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { return index; }; + + TesseractConfig config; + config.verbose = true; + MultiPassTesseractDecoder decoder(dem, 2, classifier, config); + + // Shot 1: D0 and D1 both fire. + // Pass 1: Decode Comp 0. D0 is explained by the bridging error (implicit). + // Reweight: D1 L0 in Comp 1 becomes more likely. + // Pass 2: Decode Comp 1. + std::vector detections = {0, 1}; + std::vector result = decoder.decode(detections); + + // In this specific model, if D0 and D1 both fire, + // the most likely explanation is the bridging error (0.1) + // vs independent (0.01 * 0.2 = 0.002). + // The bridging error flips L0. + // So we expect L0 to be flipped. + ASSERT_TRUE(std::find(result.begin(), result.end(), 0) != result.end()); } TEST(MultiPassTesseractDecoderTest, DisjointDecoding) { - stim::DetectorErrorModel dem(R"DEM( + stim::DetectorErrorModel dem(R"DEM( error(0.1) D0 L0 error(0.1) D1 L1 detector D0 @@ -78,29 +84,28 @@ TEST(MultiPassTesseractDecoderTest, DisjointDecoding) { logical_observable L1 )DEM"); - auto classifier = [](int index, const std::vector& coords, const std::string& tag) -> int { - return index; - }; + auto classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { return index; }; - MultiPassTesseractDecoder decoder(dem, 1, classifier); + MultiPassTesseractDecoder decoder(dem, 1, classifier); - std::vector detections = {0}; - std::vector result = decoder.decode(detections); - ASSERT_EQ(result.size(), 1); - ASSERT_EQ(result[0], 0); + std::vector detections = {0}; + std::vector result = decoder.decode(detections); + ASSERT_EQ(result.size(), 1); + ASSERT_EQ(result[0], 0); - detections = {1}; - result = decoder.decode(detections); - ASSERT_EQ(result.size(), 1); - ASSERT_EQ(result[0], 1); + detections = {1}; + result = decoder.decode(detections); + ASSERT_EQ(result.size(), 1); + ASSERT_EQ(result[0], 1); } TEST(MultiPassTesseractDecoderTest, CausalScheduleSurfaceCode) { - // A simplified d=2 surface code style DEM - // D0, D1: Basis X (Class 0), Affected by correlations from Basis Z - // D2, D3: Basis Z (Class 1), Causal (Reweight Basis X) - // Error: D2 ^ D0 (Bridge) - stim::DetectorErrorModel dem(R"DEM( + // A simplified d=2 surface code style DEM + // D0, D1: Basis X (Class 0), Affected by correlations from Basis Z + // D2, D3: Basis Z (Class 1), Causal (Reweight Basis X) + // Error: D2 ^ D0 (Bridge) + stim::DetectorErrorModel dem(R"DEM( error(0.1) D0 D2 L0 error(0.01) D0 error(0.01) D2 @@ -114,136 +119,290 @@ TEST(MultiPassTesseractDecoderTest, CausalScheduleSurfaceCode) { logical_observable L0 )DEM"); - // Class 0: Detectors 0, 1 - // Class 1: Detectors 2, 3 - auto classifier = [](int index, const std::vector& coords, const std::string& tag) -> int { - return (index < 2) ? 0 : 1; - }; + // Class 0: Detectors 0, 1 + // Class 1: Detectors 2, 3 + auto classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { + return (index < 2) ? 0 : 1; + }; - MultiPassTesseractDecoder decoder(dem, 2, classifier, TesseractConfig(), 1, DetOrder::DetBFS, 0, SchedulingStrategy::Causal); + MultiPassTesseractDecoder decoder(dem, 2, classifier, TesseractConfig(), 1, + DetOrder::DetBFS, 0, + SchedulingStrategy::Causal); - const auto& schedule = MultiPassDebugger::get_pass_schedule(decoder); - ASSERT_EQ(schedule.size(), 2); + const auto& schedule = MultiPassDebugger::get_pass_schedule(decoder); + ASSERT_EQ(schedule.size(), 2); - ASSERT_EQ(schedule[0].size(), 1); - ASSERT_EQ(schedule[0][0], 1); // Component 1 (Class 1) runs first - ASSERT_EQ(schedule[1].size(), 1); - ASSERT_EQ(schedule[1][0], 0); // Component 0 (Class 0) runs last + ASSERT_EQ(schedule[0].size(), 1); + ASSERT_EQ(schedule[0][0], 1); // Component 1 (Class 1) runs first + ASSERT_EQ(schedule[1].size(), 1); + ASSERT_EQ(schedule[1][0], 0); // Component 0 (Class 0) runs last } TEST(MultiPassTesseractDecoderTest, SurfaceCodePartitioning) { - std::vector distances = {3, 5, 7}; - for (int d : distances) { - int q = 2 * d * d - 1; - std::string filename = "r=" + std::to_string(d) + ",d=" + std::to_string(d) + - ",p=0.001,noise=si1000,c=surface_code_X,q=" + - std::to_string(q) + ",gates=cz.stim"; - stim::DetectorErrorModel dem = load_test_dem(filename); - MultiPassTesseractDecoder decoder(dem, 1, chromobius_classifier); - ASSERT_EQ(decoder.num_components(), 2) << "Failed partitioning for d=" << d; - } + std::vector distances = {3, 5, 7}; + for (int d : distances) { + int q = 2 * d * d - 1; + std::string filename = + "r=" + std::to_string(d) + ",d=" + std::to_string(d) + + ",p=0.001,noise=si1000,c=surface_code_X,q=" + std::to_string(q) + + ",gates=cz.stim"; + stim::DetectorErrorModel dem = load_test_dem(filename); + MultiPassTesseractDecoder decoder(dem, 1, chromobius_classifier); + ASSERT_EQ(decoder.num_components(), 2) << "Failed partitioning for d=" << d; + } } TEST(MultiPassTesseractDecoderTest, SurfaceCodeCausalScheduling) { - std::vector distances = {3, 5, 7}; - for (int d : distances) { - int q = 2 * d * d - 1; - std::string filename = "r=" + std::to_string(d) + ",d=" + std::to_string(d) + - ",p=0.001,noise=si1000,c=surface_code_X,q=" + - std::to_string(q) + ",gates=cz.stim"; - stim::DetectorErrorModel dem = load_test_dem(filename); - - // 1-Pass: Should only schedule X component (0) - { - MultiPassTesseractDecoder decoder(dem, 1, chromobius_classifier, TesseractConfig(), 1, DetOrder::DetBFS, 0, SchedulingStrategy::Causal); - const auto& schedule = MultiPassDebugger::get_pass_schedule(decoder); - ASSERT_EQ(schedule.size(), 1); - ASSERT_EQ(schedule[0].size(), 1); - ASSERT_EQ(schedule[0][0], 0) << "1-pass failed for d=" << d; - } + std::vector distances = {3, 5, 7}; + for (int d : distances) { + int q = 2 * d * d - 1; + std::string filename = + "r=" + std::to_string(d) + ",d=" + std::to_string(d) + + ",p=0.001,noise=si1000,c=surface_code_X,q=" + std::to_string(q) + + ",gates=cz.stim"; + stim::DetectorErrorModel dem = load_test_dem(filename); - // 2-Pass: Should schedule Z (1) then X (0) - { - MultiPassTesseractDecoder decoder(dem, 2, chromobius_classifier, TesseractConfig(), 1, DetOrder::DetBFS, 0, SchedulingStrategy::Causal); - const auto& schedule = MultiPassDebugger::get_pass_schedule(decoder); - ASSERT_EQ(schedule.size(), 2); - ASSERT_EQ(schedule[0].size(), 1); - ASSERT_EQ(schedule[0][0], 1) << "2-pass P0 failed for d=" << d; - ASSERT_EQ(schedule[1].size(), 1); - ASSERT_EQ(schedule[1][0], 0) << "2-pass P1 failed for d=" << d; - } + // 1-Pass: Should only schedule X component (0) + { + MultiPassTesseractDecoder decoder(dem, 1, chromobius_classifier, + TesseractConfig(), 1, DetOrder::DetBFS, + 0, SchedulingStrategy::Causal); + const auto& schedule = MultiPassDebugger::get_pass_schedule(decoder); + ASSERT_EQ(schedule.size(), 1); + ASSERT_EQ(schedule[0].size(), 1); + ASSERT_EQ(schedule[0][0], 0) << "1-pass failed for d=" << d; + } - // 3-Pass: Should schedule X (0) then Z (1) then X (0) - { - MultiPassTesseractDecoder decoder(dem, 3, chromobius_classifier, TesseractConfig(), 1, DetOrder::DetBFS, 0, SchedulingStrategy::Causal); - const auto& schedule = MultiPassDebugger::get_pass_schedule(decoder); - ASSERT_EQ(schedule.size(), 3); - ASSERT_EQ(schedule[0].size(), 1); - ASSERT_EQ(schedule[0][0], 0) << "3-pass P0 failed for d=" << d; - ASSERT_EQ(schedule[1].size(), 1); - ASSERT_EQ(schedule[1][0], 1) << "3-pass P1 failed for d=" << d; - ASSERT_EQ(schedule[2].size(), 1); - ASSERT_EQ(schedule[2][0], 0) << "3-pass P2 failed for d=" << d; - } + // 2-Pass: Should schedule Z (1) then X (0) + { + MultiPassTesseractDecoder decoder(dem, 2, chromobius_classifier, + TesseractConfig(), 1, DetOrder::DetBFS, + 0, SchedulingStrategy::Causal); + const auto& schedule = MultiPassDebugger::get_pass_schedule(decoder); + ASSERT_EQ(schedule.size(), 2); + ASSERT_EQ(schedule[0].size(), 1); + ASSERT_EQ(schedule[0][0], 1) << "2-pass P0 failed for d=" << d; + ASSERT_EQ(schedule[1].size(), 1); + ASSERT_EQ(schedule[1][0], 0) << "2-pass P1 failed for d=" << d; + } + + // 3-Pass: Should schedule X (0) then Z (1) then X (0) + { + MultiPassTesseractDecoder decoder(dem, 3, chromobius_classifier, + TesseractConfig(), 1, DetOrder::DetBFS, + 0, SchedulingStrategy::Causal); + const auto& schedule = MultiPassDebugger::get_pass_schedule(decoder); + ASSERT_EQ(schedule.size(), 3); + ASSERT_EQ(schedule[0].size(), 1); + ASSERT_EQ(schedule[0][0], 0) << "3-pass P0 failed for d=" << d; + ASSERT_EQ(schedule[1].size(), 1); + ASSERT_EQ(schedule[1][0], 1) << "3-pass P1 failed for d=" << d; + ASSERT_EQ(schedule[2].size(), 1); + ASSERT_EQ(schedule[2][0], 0) << "3-pass P2 failed for d=" << d; } + } } TEST(MultiPassTesseractDecoderTest, PerfectResetSurfaceCode) { - std::vector distances = {3, 5, 7}; - for (int d : distances) { - int q = 2 * d * d - 1; - std::string filename = "r=" + std::to_string(d) + ",d=" + std::to_string(d) + - ",p=0.001,noise=si1000,c=surface_code_X,q=" + - std::to_string(q) + ",gates=cz.stim"; - stim::DetectorErrorModel dem = load_test_dem(filename); - MultiPassTesseractDecoder decoder(dem, 2, chromobius_classifier, TesseractConfig(), 1, DetOrder::DetBFS, 0, SchedulingStrategy::Causal); - - size_t n_comp = MultiPassDebugger::num_components(decoder); - - // Capture initial state - std::vector> initial_likelihoods(n_comp); - std::vector> initial_error_costs(n_comp); - for (size_t i = 0; i < n_comp; ++i) { - const auto& comp_dec = MultiPassDebugger::get_component_decoder(decoder, i); - for (const auto& err : comp_dec.errors) { - initial_likelihoods[i].push_back(err.likelihood_cost); - } - initial_error_costs[i] = TesseractDebugger::get_error_costs(comp_dec); + std::vector distances = {3, 5, 7}; + for (int d : distances) { + int q = 2 * d * d - 1; + std::string filename = + "r=" + std::to_string(d) + ",d=" + std::to_string(d) + + ",p=0.001,noise=si1000,c=surface_code_X,q=" + std::to_string(q) + + ",gates=cz.stim"; + stim::DetectorErrorModel dem = load_test_dem(filename); + MultiPassTesseractDecoder decoder(dem, 2, chromobius_classifier, + TesseractConfig(), 1, DetOrder::DetBFS, 0, + SchedulingStrategy::Causal); + + size_t n_comp = MultiPassDebugger::num_components(decoder); + + // Capture initial state + std::vector> initial_likelihoods(n_comp); + std::vector> initial_error_costs(n_comp); + for (size_t i = 0; i < n_comp; ++i) { + const auto& comp_dec = + MultiPassDebugger::get_component_decoder(decoder, i); + for (const auto& err : comp_dec.errors) { + initial_likelihoods[i].push_back(err.likelihood_cost); + } + initial_error_costs[i] = TesseractDebugger::get_error_costs(comp_dec); + } + + // Run shots + std::mt19937_64 rng(12345); + size_t total_reweights_in_test = 0; + for (int shot = 0; shot < 100; ++shot) { + std::vector detections; + for (uint64_t det_idx = 0; det_idx < dem.count_detectors(); ++det_idx) { + if (std::uniform_real_distribution(0, 1)(rng) < 0.05) { + detections.push_back(det_idx); } + } + + decoder.decode(detections); + total_reweights_in_test += decoder.get_last_shot_num_reweights(); + + // Verify state is restored + for (size_t i = 0; i < n_comp; ++i) { + const auto& comp_dec = + MultiPassDebugger::get_component_decoder(decoder, i); - // Run shots - std::mt19937_64 rng(12345); - size_t total_reweights_in_test = 0; - for (int shot = 0; shot < 100; ++shot) { - std::vector detections; - for (uint64_t det_idx = 0; det_idx < dem.count_detectors(); ++det_idx) { - if (std::uniform_real_distribution(0, 1)(rng) < 0.05) { - detections.push_back(det_idx); - } - } - - decoder.decode(detections); - total_reweights_in_test += decoder.get_last_shot_num_reweights(); - - // Verify state is restored - for (size_t i = 0; i < n_comp; ++i) { - const auto& comp_dec = MultiPassDebugger::get_component_decoder(decoder, i); - - for (size_t ei = 0; ei < comp_dec.errors.size(); ++ei) { - ASSERT_DOUBLE_EQ(comp_dec.errors[ei].likelihood_cost, initial_likelihoods[i][ei]) - << "Likelihood mismatch at d=" << d << " shot=" << shot << " comp=" << i << " err=" << ei; - } - - const auto& current_error_costs = TesseractDebugger::get_error_costs(comp_dec); - ASSERT_EQ(current_error_costs.size(), initial_error_costs[i].size()); - for (size_t ei = 0; ei < current_error_costs.size(); ++ei) { - ASSERT_DOUBLE_EQ(current_error_costs[ei].likelihood_cost, initial_error_costs[i][ei].likelihood_cost) - << "Internal likelihood mismatch at d=" << d << " shot=" << shot << " comp=" << i << " err=" << ei; - ASSERT_DOUBLE_EQ(current_error_costs[ei].min_cost, initial_error_costs[i][ei].min_cost) - << "Internal min_cost mismatch at d=" << d << " shot=" << shot << " comp=" << i << " err=" << ei; - } - } + for (size_t ei = 0; ei < comp_dec.errors.size(); ++ei) { + ASSERT_DOUBLE_EQ(comp_dec.errors[ei].likelihood_cost, + initial_likelihoods[i][ei]) + << "Likelihood mismatch at d=" << d << " shot=" << shot + << " comp=" << i << " err=" << ei; } - ASSERT_GT(total_reweights_in_test, 0) << "Test was trivial for d=" << d << ". No reweighting occurred."; + + const auto& current_error_costs = + TesseractDebugger::get_error_costs(comp_dec); + ASSERT_EQ(current_error_costs.size(), initial_error_costs[i].size()); + for (size_t ei = 0; ei < current_error_costs.size(); ++ei) { + ASSERT_DOUBLE_EQ(current_error_costs[ei].likelihood_cost, + initial_error_costs[i][ei].likelihood_cost) + << "Internal likelihood mismatch at d=" << d << " shot=" << shot + << " comp=" << i << " err=" << ei; + ASSERT_DOUBLE_EQ(current_error_costs[ei].min_cost, + initial_error_costs[i][ei].min_cost) + << "Internal min_cost mismatch at d=" << d << " shot=" << shot + << " comp=" << i << " err=" << ei; + } + } } + ASSERT_GT(total_reweights_in_test, 0) + << "Test was trivial for d=" << d << ". No reweighting occurred."; + } +} + +TEST(MultiPassTesseractDecoderTest, BoundaryConditionAndCappingTest) { + stim::DetectorErrorModel dem(R"DEM( + error(0.49) D0 D1 L0 + error(0.5) D0 + detector D0 + detector D1 + logical_observable L0 + )DEM"); + + auto classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { return index; }; + + TesseractConfig config; + config.dem = dem; + + MultiPassTesseractDecoder decoder(dem, 2, classifier, config, 1, + DetOrder::DetIndex, 12345, + SchedulingStrategy::Causal); + + std::vector hits = {0}; + ASSERT_NO_THROW(decoder.decode(hits)); +} + +TEST(MultiPassTesseractDecoderTest, IntermediatePassLeakageTest) { + stim::DetectorErrorModel dem(R"DEM( + error(0.1) D0 D1 L0 + error(0.01) D0 + error(0.2) D1 L0 + detector D0 + detector D1 + logical_observable L0 + )DEM"); + + auto classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { return index; }; + + TesseractConfig config; + config.dem = dem; + + MultiPassTesseractDecoder decoder(dem, 3, classifier, config, 1, + DetOrder::DetIndex, 12345, + SchedulingStrategy::Causal); + + std::vector hits = {0}; + decoder.decode(hits); + + // Rigorously assert that prior LLR reweights occurred successfully on the raw + // un-decomposed DEM! + ASSERT_GT(decoder.get_last_shot_num_reweights(), 0); +} + +TEST(MultiPassTesseractDecoderTest, MultipleCausalTriggersMaxProbValidation) { + stim::DetectorErrorModel dem(R"DEM( + error(0.1) D1 D0 L0 + error(0.15) D2 D0 L0 + error(0.01) D1 + error(0.01) D2 + error(0.2) D0 L0 + detector D0 + detector D1 + detector D2 + logical_observable L0 + )DEM"); + + auto classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { + if (index == 0) return 0; + return 1; + }; + + TesseractConfig config; + config.dem = dem; + + MultiPassTesseractDecoder decoder(dem, 2, classifier, config, 1, + DetOrder::DetIndex, 12345, + SchedulingStrategy::Causal); + + // 1. Run a shot that triggers BOTH causal detectors D1 and D2 + std::vector detections = {1, 2}; + decoder.decode(detections); + + const auto& comp0 = MultiPassDebugger::get_component_decoder_full(decoder, 0); + + // 2. Find the target error index for symptom {0} + std::vector target_symptom = {0}; + auto it = comp0.symptom_to_error_index.find(target_symptom); + ASSERT_NE(it, comp0.symptom_to_error_index.end()); + + // Now fully active using vector degeneracy mapping! + size_t target_err_idx = it->second[0]; + + double final_p = comp0.decoder->errors[target_err_idx].get_probability(); + + // 3. Assert that the Surgical Reset successfully restored the cost back to + // the baseline after exactly 2 LLR reweighting rules were triggered and + // applied! + ASSERT_DOUBLE_EQ(final_p, 0.33199999999999996); + ASSERT_EQ(decoder.get_last_shot_num_reweights(), 2); +} + +TEST(MultiPassTesseractDecoderTest, OverlappingSymptomsDistinctObservables) { + stim::DetectorErrorModel dem(R"DEM( + error(0.1) D0 L0 + error(0.05) D0 L1 + detector D0 + logical_observable L0 + logical_observable L1 + )DEM"); + + auto classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { return 0; }; + + TesseractConfig config; + config.dem = dem; + + MultiPassTesseractDecoder decoder(dem, 2, classifier, config, 1, + DetOrder::DetIndex, 12345, + SchedulingStrategy::Causal); + + const auto& comp0 = MultiPassDebugger::get_component_decoder_full(decoder, 0); + + std::vector symptom = {0}; + auto it = comp0.symptom_to_error_index.find(symptom); + ASSERT_NE(it, comp0.symptom_to_error_index.end()); + + // Rigorously assert that degenerate errors are successfully tracked in a + // vector! + ASSERT_EQ(it->second.size(), 2); } diff --git a/src/py/BUILD b/src/py/BUILD index a7377522..7713a77f 100644 --- a/src/py/BUILD +++ b/src/py/BUILD @@ -31,6 +31,11 @@ py_library( data = [":copy_core_so"], imports = ["."], visibility = ["//visibility:public"], + deps = [ + "@pypi//stim", + "@pypi//numpy", + "@pypi//sinter", + ], ) py_library( diff --git a/src/tesseract_main.cc b/src/tesseract_main.cc index ab5ed9c1..8d39de30 100644 --- a/src/tesseract_main.cc +++ b/src/tesseract_main.cc @@ -23,11 +23,15 @@ #include #include "common.h" +#include "multi_pass_tesseract_decoder.h" #include "stim.h" #include "tesseract.h" #include "utils.h" struct Args { + bool multipass = false; + std::string multipass_strategy = "causal"; + size_t num_passes = 2; std::string circuit_path; std::string dem_path; bool no_merge_errors = false; @@ -38,6 +42,7 @@ struct Args { bool det_order_bfs = false; bool det_order_index = false; bool det_order_coordinate = false; + DetOrder det_order_method = DetOrder::DetBFS; // Sampling options size_t sample_num_shots = 0; @@ -198,6 +203,7 @@ struct Args { } else if (det_order_coordinate) { order = DetOrder::DetCoordinate; } + det_order_method = order; config.det_orders = build_det_orders(config.dem, num_det_orders, order, det_order_seed); } @@ -467,6 +473,23 @@ int main(int argc, char* argv[]) { "during decoding.") .flag() .store_into(args.print_stats); + program.add_argument("--multipass") + .help("Enable multi-pass graph shattering for correlated error decoding") + .flag() + .store_into(args.multipass); + program.add_argument("--multipass-strategy", "--multipass_strategy") + .help( + "Multi-pass scheduling strategy: static or causal (default = causal). Note: static " + "scheduling is experimental and was never systematically benchmarked.") + .default_value(std::string("causal")) + .store_into(args.multipass_strategy); + program.add_argument("--num-passes", "--num_passes") + .help( + "Number of prior propagation passes: 1 (uncorrelated independent CSS decoding) or 2 " + "(standard causally reweighted decoding, default = 2). Note: values > 2 are experimental " + "and were never systematically benchmarked.") + .default_value(size_t(2)) + .store_into(args.num_passes); try { program.parse_args(argc, argv); @@ -486,34 +509,84 @@ int main(int argc, char* argv[]) { std::vector> low_confidence(shots.size()); const stim::DetectorErrorModel original_dem = config.dem.flattened(); std::vector> decoders(args.num_threads); + std::vector> mp_decoders(args.num_threads); std::vector> error_use_per_thread( args.num_threads, std::vector(original_dem.count_errors())); bool has_obs = args.has_observables(); - size_t num_errors = 0; - size_t num_low_confidence = 0; - double total_time_seconds = 0; + std::atomic num_errors(0); + std::atomic num_low_confidence(0); + std::atomic total_time_seconds(0); size_t num_observables = config.dem.count_observables(); + + auto classifier = [](int index, const std::vector& coords, + const std::string& tag) -> int { + if (tag.find("\"basis\": \"X\"") != std::string::npos) return 0; + if (tag.find("\"basis\": \"Z\"") != std::string::npos) return 1; + if (coords.size() >= 4) { + int c3 = (int)coords[3]; + if (c3 >= 0 && c3 <= 2) return 0; + if (c3 >= 3 && c3 <= 5) return 1; + } + return 0; + }; + tesseract::SchedulingStrategy strategy_val = (args.multipass_strategy == "static") + ? tesseract::SchedulingStrategy::Static + : tesseract::SchedulingStrategy::Causal; + + // Validate stabilizer component count at the CLI interface layer when multi-pass is requested. + // We enforce this validation here to fail fast and cleanly for command-line users, whilst + // preserving core library constructor flexibility to allow programmatic and C++ unit testing. + if (args.multipass) { + tesseract::MultiPassTesseractDecoder::validate_annotations(config.dem, classifier); + } + + auto start_global_time = std::chrono::high_resolution_clock::now(); + size_t shot = parallel_for_shots_in_order( shots.size(), args.num_threads, [&](size_t thread_index, size_t shot_index) { - if (!decoders[thread_index]) { - decoders[thread_index] = std::make_unique(config); - } - auto& decoder = *decoders[thread_index]; - auto& error_use = error_use_per_thread[thread_index]; auto start_time = std::chrono::high_resolution_clock::now(); - decoder.decode_to_errors(shots[shot_index].hits); - auto stop_time = std::chrono::high_resolution_clock::now(); - decoding_time_seconds[shot_index] = - std::chrono::duration_cast(stop_time - start_time).count() / - 1e6; - obs_predicted[shot_index] = - vector_to_u64_mask(decoder.get_flipped_observables(decoder.predicted_errors_buffer)); - low_confidence[shot_index] = decoder.low_confidence_flag; - cost_predicted[shot_index] = decoder.cost_from_errors(decoder.predicted_errors_buffer); - if (!has_obs or shots[shot_index].obs_mask_as_u64() == obs_predicted[shot_index]) { - for (size_t ei : decoder.predicted_errors_buffer) { - ++error_use[ei]; + auto& error_use = error_use_per_thread[thread_index]; + + if (args.multipass) { + if (!mp_decoders[thread_index]) { + mp_decoders[thread_index] = std::make_unique( + config.dem, args.num_passes, classifier, config, args.num_det_orders, + args.det_order_method, args.det_order_seed, strategy_val); + } + auto flips = mp_decoders[thread_index]->decode(shots[shot_index].hits); + auto stop_time = std::chrono::high_resolution_clock::now(); + decoding_time_seconds[shot_index] = + std::chrono::duration_cast(stop_time - start_time) + .count() / + 1e6; + + uint64_t mask = 0; + for (int o : flips) + if (o >= 0 && (size_t)o < num_observables) mask ^= (1ULL << o); + obs_predicted[shot_index] = mask; + low_confidence[shot_index] = false; + cost_predicted[shot_index] = 0; + } else { + if (!decoders[thread_index]) { + decoders[thread_index] = std::make_unique(config); + } + auto& decoder = *decoders[thread_index]; + decoder.decode_to_errors(shots[shot_index].hits); + auto stop_time = std::chrono::high_resolution_clock::now(); + decoding_time_seconds[shot_index] = + std::chrono::duration_cast(stop_time - start_time) + .count() / + 1e6; + + obs_predicted[shot_index] = + vector_to_u64_mask(decoder.get_flipped_observables(decoder.predicted_errors_buffer)); + low_confidence[shot_index] = decoder.low_confidence_flag; + cost_predicted[shot_index] = decoder.cost_from_errors(decoder.predicted_errors_buffer); + if (!has_obs or shots[shot_index].obs_mask_as_u64() == obs_predicted[shot_index]) { + for (size_t ei : decoder.predicted_errors_buffer) { + ++error_use[ei]; + } } } }, @@ -523,22 +596,28 @@ int main(int argc, char* argv[]) { writer->write_end(); } if (low_confidence[shot_index]) { - ++num_low_confidence; + num_low_confidence++; } else if (obs_predicted[shot_index] != shots[shot_index].obs_mask_as_u64()) { - ++num_errors; + num_errors++; } - total_time_seconds += decoding_time_seconds[shot_index]; + total_time_seconds = total_time_seconds + decoding_time_seconds[shot_index]; if (args.print_stats) { std::cout << "num_shots = " << (shot_index + 1) - << " num_low_confidence = " << num_low_confidence - << " num_errors = " << num_errors - << " total_time_seconds = " << total_time_seconds << std::endl; + << " num_low_confidence = " << num_low_confidence.load() + << " num_errors = " << num_errors.load() + << " total_time_seconds = " << total_time_seconds.load() << std::endl; std::cout << "cost = " << cost_predicted[shot_index] << std::endl; std::cout.flush(); } - return num_errors < args.max_errors; + return num_errors.load() < args.max_errors; }); + auto stop_global_time = std::chrono::high_resolution_clock::now(); + double global_elapsed = + std::chrono::duration_cast(stop_global_time - start_global_time) + .count() / + 1e6; + std::vector error_use_totals(original_dem.count_errors()); for (const auto& error_use : error_use_per_thread) { for (size_t ei = 0; ei < error_use_totals.size(); ++ei) { @@ -551,7 +630,7 @@ int main(int argc, char* argv[]) { size_t num_usage_dem_shots = shot; if (has_obs) { // When we know the obs, we only count non-error shots. - num_usage_dem_shots -= num_errors; + num_usage_dem_shots -= num_errors.load(); } stim::DetectorErrorModel est_dem = common::dem_from_counts(original_dem, counts, num_usage_dem_shots); @@ -576,11 +655,14 @@ int main(int argc, char* argv[]) { {"pqlimit", args.pqlimit}, {"num_det_orders", args.num_det_orders}, {"det_order_seed", args.det_order_seed}, - {"total_time_seconds", total_time_seconds}, - {"num_errors", num_errors}, - {"num_low_confidence", num_low_confidence}, + {"total_time_seconds", global_elapsed}, + {"num_errors", num_errors.load()}, + {"num_low_confidence", num_low_confidence.load()}, {"num_shots", shot}, {"num_threads", args.num_threads}, + {"multipass", args.multipass}, + {"strategy", args.multipass_strategy}, + {"num_passes", args.num_passes}, {"sample_num_shots", args.sample_num_shots}}; if (args.stats_out_fname == "-") { @@ -593,11 +675,11 @@ int main(int argc, char* argv[]) { } if (print_final_stats) { std::cout << "num_shots = " << shot; - std::cout << " num_low_confidence = " << num_low_confidence; + std::cout << " num_low_confidence = " << num_low_confidence.load(); if (has_obs) { - std::cout << " num_errors = " << num_errors; + std::cout << " num_errors = " << num_errors.load(); } - std::cout << " total_time_seconds = " << total_time_seconds; + std::cout << " total_time_seconds = " << global_elapsed; std::cout << std::endl; } } diff --git a/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00100.stim b/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00100.stim new file mode 100644 index 00000000..25163fb4 --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00100.stim @@ -0,0 +1,127 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 8 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 10 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 11 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 12 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 14 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 15 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 25 +DEPOLARIZE1(0.0001) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 +TICK +R 1 3 5 8 10 12 15 17 19 2 9 11 13 14 16 18 25 +X_ERROR(0.002) 1 3 5 8 10 12 15 17 19 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0001) 0 4 6 7 20 21 22 23 24 +DEPOLARIZE1(0.002) 0 4 6 7 20 21 22 23 24 +TICK +H 2 8 9 10 11 13 14 15 16 18 19 25 +DEPOLARIZE1(0.0001) 2 8 9 10 11 13 14 15 16 18 19 25 0 1 3 4 5 6 7 12 17 20 21 22 23 24 +TICK +CZ 2 3 9 10 11 12 14 15 16 17 18 19 +DEPOLARIZE2(0.001) 2 3 9 10 11 12 14 15 16 17 18 19 +DEPOLARIZE1(0.0001) 0 1 4 5 6 7 8 13 20 21 22 23 24 25 +TICK +H 3 10 12 15 17 19 +DEPOLARIZE1(0.0001) 3 10 12 15 17 19 0 1 2 4 5 6 7 8 9 11 13 14 16 18 20 21 22 23 24 25 +TICK +CZ 1 2 3 9 8 14 10 11 12 18 15 16 +DEPOLARIZE2(0.001) 1 2 3 9 8 14 10 11 12 18 15 16 +DEPOLARIZE1(0.0001) 0 4 5 6 7 13 17 19 20 21 22 23 24 25 +TICK +CZ 5 11 8 9 10 16 12 13 17 18 19 25 +DEPOLARIZE2(0.001) 5 11 8 9 10 16 12 13 17 18 19 25 +DEPOLARIZE1(0.0001) 0 1 2 3 4 6 7 14 15 20 21 22 23 24 +TICK +H 1 3 5 8 10 14 15 17 19 +DEPOLARIZE1(0.0001) 1 3 5 8 10 14 15 17 19 0 2 4 6 7 9 11 12 13 16 18 20 21 22 23 24 25 +TICK +CZ 1 9 3 11 5 13 8 16 10 18 17 25 +DEPOLARIZE2(0.001) 1 9 3 11 5 13 8 16 10 18 17 25 +DEPOLARIZE1(0.0001) 0 2 4 6 7 12 14 15 19 20 21 22 23 24 +TICK +H 2 3 8 9 11 13 16 17 18 25 +DEPOLARIZE1(0.0001) 2 3 8 9 11 13 16 17 18 25 0 1 4 5 6 7 10 12 14 15 19 20 21 22 23 24 +TICK +M(0.005) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.001) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0001) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +DEPOLARIZE1(0.002) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +TICK +R 2 9 11 13 14 16 18 25 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-8] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-3] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-6] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-1] +X_ERROR(0.002) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0001) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +DEPOLARIZE1(0.002) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +TICK +REPEAT 9 { + H 2 3 9 11 12 13 14 16 17 18 25 + DEPOLARIZE1(0.0001) 2 3 9 11 12 13 14 16 17 18 25 0 1 4 5 6 7 8 10 15 19 20 21 22 23 24 + TICK + CZ 2 3 9 10 11 12 14 15 16 17 18 19 + DEPOLARIZE2(0.001) 2 3 9 10 11 12 14 15 16 17 18 19 + DEPOLARIZE1(0.0001) 0 1 4 5 6 7 8 13 20 21 22 23 24 25 + TICK + H 1 3 5 10 12 15 17 19 + DEPOLARIZE1(0.0001) 1 3 5 10 12 15 17 19 0 2 4 6 7 8 9 11 13 14 16 18 20 21 22 23 24 25 + TICK + CZ 1 2 3 9 8 14 10 11 12 18 15 16 + DEPOLARIZE2(0.001) 1 2 3 9 8 14 10 11 12 18 15 16 + DEPOLARIZE1(0.0001) 0 4 5 6 7 13 17 19 20 21 22 23 24 25 + TICK + CZ 5 11 8 9 10 16 12 13 17 18 19 25 + DEPOLARIZE2(0.001) 5 11 8 9 10 16 12 13 17 18 19 25 + DEPOLARIZE1(0.0001) 0 1 2 3 4 6 7 14 15 20 21 22 23 24 + TICK + H 1 3 5 8 10 14 15 17 19 + DEPOLARIZE1(0.0001) 1 3 5 8 10 14 15 17 19 0 2 4 6 7 9 11 12 13 16 18 20 21 22 23 24 25 + TICK + CZ 1 9 3 11 5 13 8 16 10 18 17 25 + DEPOLARIZE2(0.001) 1 9 3 11 5 13 8 16 10 18 17 25 + DEPOLARIZE1(0.0001) 0 2 4 6 7 12 14 15 19 20 21 22 23 24 + TICK + H 2 3 8 9 11 13 16 17 18 25 + DEPOLARIZE1(0.0001) 2 3 8 9 11 13 16 17 18 25 0 1 4 5 6 7 10 12 14 15 19 20 21 22 23 24 + TICK + M(0.005) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.001) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.0001) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + DEPOLARIZE1(0.002) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + TICK + R 2 9 11 13 14 16 18 25 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-8] rec[-16] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-7] rec[-15] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-6] rec[-14] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-5] rec[-13] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-4] rec[-12] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-3] rec[-11] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-2] rec[-10] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-1] rec[-9] + X_ERROR(0.002) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.0001) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + DEPOLARIZE1(0.002) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + TICK +} +H 1 3 5 8 10 12 15 17 19 +DEPOLARIZE1(0.0001) 1 3 5 8 10 12 15 17 19 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 +TICK +M(0.005) 1 3 5 8 10 12 15 17 19 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-8] rec[-9] rec[-17] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-2] rec[-3] rec[-5] rec[-6] rec[-12] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-4] rec[-5] rec[-7] rec[-8] rec[-15] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-1] rec[-2] rec[-10] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-3] rec[-6] rec[-9] +DEPOLARIZE1(0.001) 1 3 5 8 10 12 15 17 19 +DEPOLARIZE1(0.0001) 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 +DEPOLARIZE1(0.002) 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 diff --git a/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00200.stim b/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00200.stim new file mode 100644 index 00000000..de572170 --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00200.stim @@ -0,0 +1,127 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 8 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 10 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 11 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 12 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 14 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 15 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 25 +DEPOLARIZE1(0.0002) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 +TICK +R 1 3 5 8 10 12 15 17 19 2 9 11 13 14 16 18 25 +X_ERROR(0.004) 1 3 5 8 10 12 15 17 19 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0002) 0 4 6 7 20 21 22 23 24 +DEPOLARIZE1(0.004) 0 4 6 7 20 21 22 23 24 +TICK +H 2 8 9 10 11 13 14 15 16 18 19 25 +DEPOLARIZE1(0.0002) 2 8 9 10 11 13 14 15 16 18 19 25 0 1 3 4 5 6 7 12 17 20 21 22 23 24 +TICK +CZ 2 3 9 10 11 12 14 15 16 17 18 19 +DEPOLARIZE2(0.002) 2 3 9 10 11 12 14 15 16 17 18 19 +DEPOLARIZE1(0.0002) 0 1 4 5 6 7 8 13 20 21 22 23 24 25 +TICK +H 3 10 12 15 17 19 +DEPOLARIZE1(0.0002) 3 10 12 15 17 19 0 1 2 4 5 6 7 8 9 11 13 14 16 18 20 21 22 23 24 25 +TICK +CZ 1 2 3 9 8 14 10 11 12 18 15 16 +DEPOLARIZE2(0.002) 1 2 3 9 8 14 10 11 12 18 15 16 +DEPOLARIZE1(0.0002) 0 4 5 6 7 13 17 19 20 21 22 23 24 25 +TICK +CZ 5 11 8 9 10 16 12 13 17 18 19 25 +DEPOLARIZE2(0.002) 5 11 8 9 10 16 12 13 17 18 19 25 +DEPOLARIZE1(0.0002) 0 1 2 3 4 6 7 14 15 20 21 22 23 24 +TICK +H 1 3 5 8 10 14 15 17 19 +DEPOLARIZE1(0.0002) 1 3 5 8 10 14 15 17 19 0 2 4 6 7 9 11 12 13 16 18 20 21 22 23 24 25 +TICK +CZ 1 9 3 11 5 13 8 16 10 18 17 25 +DEPOLARIZE2(0.002) 1 9 3 11 5 13 8 16 10 18 17 25 +DEPOLARIZE1(0.0002) 0 2 4 6 7 12 14 15 19 20 21 22 23 24 +TICK +H 2 3 8 9 11 13 16 17 18 25 +DEPOLARIZE1(0.0002) 2 3 8 9 11 13 16 17 18 25 0 1 4 5 6 7 10 12 14 15 19 20 21 22 23 24 +TICK +M(0.01) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.002) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0002) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +DEPOLARIZE1(0.004) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +TICK +R 2 9 11 13 14 16 18 25 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-8] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-3] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-6] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-1] +X_ERROR(0.004) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0002) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +DEPOLARIZE1(0.004) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +TICK +REPEAT 9 { + H 2 3 9 11 12 13 14 16 17 18 25 + DEPOLARIZE1(0.0002) 2 3 9 11 12 13 14 16 17 18 25 0 1 4 5 6 7 8 10 15 19 20 21 22 23 24 + TICK + CZ 2 3 9 10 11 12 14 15 16 17 18 19 + DEPOLARIZE2(0.002) 2 3 9 10 11 12 14 15 16 17 18 19 + DEPOLARIZE1(0.0002) 0 1 4 5 6 7 8 13 20 21 22 23 24 25 + TICK + H 1 3 5 10 12 15 17 19 + DEPOLARIZE1(0.0002) 1 3 5 10 12 15 17 19 0 2 4 6 7 8 9 11 13 14 16 18 20 21 22 23 24 25 + TICK + CZ 1 2 3 9 8 14 10 11 12 18 15 16 + DEPOLARIZE2(0.002) 1 2 3 9 8 14 10 11 12 18 15 16 + DEPOLARIZE1(0.0002) 0 4 5 6 7 13 17 19 20 21 22 23 24 25 + TICK + CZ 5 11 8 9 10 16 12 13 17 18 19 25 + DEPOLARIZE2(0.002) 5 11 8 9 10 16 12 13 17 18 19 25 + DEPOLARIZE1(0.0002) 0 1 2 3 4 6 7 14 15 20 21 22 23 24 + TICK + H 1 3 5 8 10 14 15 17 19 + DEPOLARIZE1(0.0002) 1 3 5 8 10 14 15 17 19 0 2 4 6 7 9 11 12 13 16 18 20 21 22 23 24 25 + TICK + CZ 1 9 3 11 5 13 8 16 10 18 17 25 + DEPOLARIZE2(0.002) 1 9 3 11 5 13 8 16 10 18 17 25 + DEPOLARIZE1(0.0002) 0 2 4 6 7 12 14 15 19 20 21 22 23 24 + TICK + H 2 3 8 9 11 13 16 17 18 25 + DEPOLARIZE1(0.0002) 2 3 8 9 11 13 16 17 18 25 0 1 4 5 6 7 10 12 14 15 19 20 21 22 23 24 + TICK + M(0.01) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.002) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.0002) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + DEPOLARIZE1(0.004) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + TICK + R 2 9 11 13 14 16 18 25 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-8] rec[-16] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-7] rec[-15] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-6] rec[-14] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-5] rec[-13] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-4] rec[-12] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-3] rec[-11] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-2] rec[-10] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-1] rec[-9] + X_ERROR(0.004) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.0002) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + DEPOLARIZE1(0.004) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + TICK +} +H 1 3 5 8 10 12 15 17 19 +DEPOLARIZE1(0.0002) 1 3 5 8 10 12 15 17 19 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 +TICK +M(0.01) 1 3 5 8 10 12 15 17 19 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-8] rec[-9] rec[-17] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-2] rec[-3] rec[-5] rec[-6] rec[-12] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-4] rec[-5] rec[-7] rec[-8] rec[-15] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-1] rec[-2] rec[-10] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-3] rec[-6] rec[-9] +DEPOLARIZE1(0.002) 1 3 5 8 10 12 15 17 19 +DEPOLARIZE1(0.0002) 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 +DEPOLARIZE1(0.004) 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 diff --git a/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00500.stim b/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00500.stim new file mode 100644 index 00000000..3b07ecb0 --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=3,basis=X,num_rounds=10,max_qubits_per_module=17,total_qubits=26,k=1,noise=SI1000,p=0.00500.stim @@ -0,0 +1,127 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 8 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 10 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 11 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 12 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 14 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 15 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 25 +DEPOLARIZE1(0.0005) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 +TICK +R 1 3 5 8 10 12 15 17 19 2 9 11 13 14 16 18 25 +X_ERROR(0.01) 1 3 5 8 10 12 15 17 19 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0005) 0 4 6 7 20 21 22 23 24 +DEPOLARIZE1(0.01) 0 4 6 7 20 21 22 23 24 +TICK +H 2 8 9 10 11 13 14 15 16 18 19 25 +DEPOLARIZE1(0.0005) 2 8 9 10 11 13 14 15 16 18 19 25 0 1 3 4 5 6 7 12 17 20 21 22 23 24 +TICK +CZ 2 3 9 10 11 12 14 15 16 17 18 19 +DEPOLARIZE2(0.005) 2 3 9 10 11 12 14 15 16 17 18 19 +DEPOLARIZE1(0.0005) 0 1 4 5 6 7 8 13 20 21 22 23 24 25 +TICK +H 3 10 12 15 17 19 +DEPOLARIZE1(0.0005) 3 10 12 15 17 19 0 1 2 4 5 6 7 8 9 11 13 14 16 18 20 21 22 23 24 25 +TICK +CZ 1 2 3 9 8 14 10 11 12 18 15 16 +DEPOLARIZE2(0.005) 1 2 3 9 8 14 10 11 12 18 15 16 +DEPOLARIZE1(0.0005) 0 4 5 6 7 13 17 19 20 21 22 23 24 25 +TICK +CZ 5 11 8 9 10 16 12 13 17 18 19 25 +DEPOLARIZE2(0.005) 5 11 8 9 10 16 12 13 17 18 19 25 +DEPOLARIZE1(0.0005) 0 1 2 3 4 6 7 14 15 20 21 22 23 24 +TICK +H 1 3 5 8 10 14 15 17 19 +DEPOLARIZE1(0.0005) 1 3 5 8 10 14 15 17 19 0 2 4 6 7 9 11 12 13 16 18 20 21 22 23 24 25 +TICK +CZ 1 9 3 11 5 13 8 16 10 18 17 25 +DEPOLARIZE2(0.005) 1 9 3 11 5 13 8 16 10 18 17 25 +DEPOLARIZE1(0.0005) 0 2 4 6 7 12 14 15 19 20 21 22 23 24 +TICK +H 2 3 8 9 11 13 16 17 18 25 +DEPOLARIZE1(0.0005) 2 3 8 9 11 13 16 17 18 25 0 1 4 5 6 7 10 12 14 15 19 20 21 22 23 24 +TICK +M(0.025) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.005) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0005) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +DEPOLARIZE1(0.01) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +TICK +R 2 9 11 13 14 16 18 25 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-8] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-3] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-6] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-1] +X_ERROR(0.01) 2 9 11 13 14 16 18 25 +DEPOLARIZE1(0.0005) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +DEPOLARIZE1(0.01) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 +TICK +REPEAT 9 { + H 2 3 9 11 12 13 14 16 17 18 25 + DEPOLARIZE1(0.0005) 2 3 9 11 12 13 14 16 17 18 25 0 1 4 5 6 7 8 10 15 19 20 21 22 23 24 + TICK + CZ 2 3 9 10 11 12 14 15 16 17 18 19 + DEPOLARIZE2(0.005) 2 3 9 10 11 12 14 15 16 17 18 19 + DEPOLARIZE1(0.0005) 0 1 4 5 6 7 8 13 20 21 22 23 24 25 + TICK + H 1 3 5 10 12 15 17 19 + DEPOLARIZE1(0.0005) 1 3 5 10 12 15 17 19 0 2 4 6 7 8 9 11 13 14 16 18 20 21 22 23 24 25 + TICK + CZ 1 2 3 9 8 14 10 11 12 18 15 16 + DEPOLARIZE2(0.005) 1 2 3 9 8 14 10 11 12 18 15 16 + DEPOLARIZE1(0.0005) 0 4 5 6 7 13 17 19 20 21 22 23 24 25 + TICK + CZ 5 11 8 9 10 16 12 13 17 18 19 25 + DEPOLARIZE2(0.005) 5 11 8 9 10 16 12 13 17 18 19 25 + DEPOLARIZE1(0.0005) 0 1 2 3 4 6 7 14 15 20 21 22 23 24 + TICK + H 1 3 5 8 10 14 15 17 19 + DEPOLARIZE1(0.0005) 1 3 5 8 10 14 15 17 19 0 2 4 6 7 9 11 12 13 16 18 20 21 22 23 24 25 + TICK + CZ 1 9 3 11 5 13 8 16 10 18 17 25 + DEPOLARIZE2(0.005) 1 9 3 11 5 13 8 16 10 18 17 25 + DEPOLARIZE1(0.0005) 0 2 4 6 7 12 14 15 19 20 21 22 23 24 + TICK + H 2 3 8 9 11 13 16 17 18 25 + DEPOLARIZE1(0.0005) 2 3 8 9 11 13 16 17 18 25 0 1 4 5 6 7 10 12 14 15 19 20 21 22 23 24 + TICK + M(0.025) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.005) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.0005) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + DEPOLARIZE1(0.01) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + TICK + R 2 9 11 13 14 16 18 25 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-8] rec[-16] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-7] rec[-15] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-6] rec[-14] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-5] rec[-13] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-4] rec[-12] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-3] rec[-11] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-2] rec[-10] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-1] rec[-9] + X_ERROR(0.01) 2 9 11 13 14 16 18 25 + DEPOLARIZE1(0.0005) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + DEPOLARIZE1(0.01) 0 1 3 4 5 6 7 8 10 12 15 17 19 20 21 22 23 24 + TICK +} +H 1 3 5 8 10 12 15 17 19 +DEPOLARIZE1(0.0005) 1 3 5 8 10 12 15 17 19 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 +TICK +M(0.025) 1 3 5 8 10 12 15 17 19 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-8] rec[-9] rec[-17] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-2] rec[-3] rec[-5] rec[-6] rec[-12] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-4] rec[-5] rec[-7] rec[-8] rec[-15] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-1] rec[-2] rec[-10] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-3] rec[-6] rec[-9] +DEPOLARIZE1(0.005) 1 3 5 8 10 12 15 17 19 +DEPOLARIZE1(0.0005) 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 +DEPOLARIZE1(0.01) 0 2 4 6 7 9 11 13 14 16 18 20 21 22 23 24 25 diff --git a/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00100.stim b/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00100.stim new file mode 100644 index 00000000..4f1ca748 --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00100.stim @@ -0,0 +1,191 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 0) 6 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 1) 7 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 1) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 12 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 14 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 15 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 3) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 2) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 3) 20 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 2) 21 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 22 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 23 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 24 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 25 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 26 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 27 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 4) 28 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 5) 29 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 4) 30 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 5) 31 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 7) 34 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 6) 35 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 7) 36 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 37 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 7) 38 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 6) 39 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 7) 40 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 6) 41 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 7) 42 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 6) 43 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 8) 44 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 9) 45 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 8) 46 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 9) 47 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 8) 48 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 9) 49 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 8) 50 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 9) 51 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 8) 52 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 9) 53 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 10) 59 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 10) 63 +DEPOLARIZE1(0.0001) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 +TICK +R 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +X_ERROR(0.002) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0001) 0 4 8 10 11 32 33 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.002) 0 4 8 10 11 32 33 54 55 56 57 58 60 61 62 +TICK +H 2 6 12 13 14 15 17 18 19 21 22 23 24 26 27 28 30 31 34 35 36 37 39 40 41 43 44 45 46 48 49 50 52 53 59 63 +DEPOLARIZE1(0.0001) 2 6 12 13 14 15 17 18 19 21 22 23 24 26 27 28 30 31 34 35 36 37 39 40 41 43 44 45 46 48 49 50 52 53 59 63 0 1 3 4 5 7 8 9 10 11 16 20 25 29 32 33 38 42 47 51 54 55 56 57 58 60 61 62 +TICK +CZ 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 +DEPOLARIZE2(0.001) 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 +DEPOLARIZE1(0.0001) 0 1 4 5 8 9 10 11 12 21 32 33 34 43 54 55 56 57 58 59 60 61 62 63 +TICK +H 3 7 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0001) 3 7 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 0 1 2 4 5 6 8 9 10 11 12 13 15 17 19 21 22 24 26 28 30 32 33 34 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 +DEPOLARIZE2(0.001) 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 +DEPOLARIZE1(0.0001) 0 4 8 9 10 11 21 31 32 33 43 47 51 53 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 +DEPOLARIZE2(0.001) 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 +DEPOLARIZE1(0.0001) 0 1 2 3 4 6 7 8 10 11 22 23 32 33 44 45 54 55 56 57 58 60 61 62 +TICK +H 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 +DEPOLARIZE1(0.0001) 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 20 21 24 26 28 30 32 33 35 37 39 41 42 43 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 +DEPOLARIZE2(0.001) 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 +DEPOLARIZE1(0.0001) 0 2 4 6 8 10 11 20 22 32 33 42 44 45 49 53 54 55 56 57 58 60 61 62 +TICK +H 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 +DEPOLARIZE1(0.0001) 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 14 18 20 22 23 27 31 32 33 36 40 42 44 45 49 53 54 55 56 57 58 60 61 62 +TICK +M(0.005) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.001) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0001) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.002) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +TICK +R 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-24] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-16] +DETECTOR[{"basis": "X"}](2, 8, 0) rec[-6] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-21] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-11] +DETECTOR[{"basis": "X"}](4, 10, 0) rec[-2] +DETECTOR[{"basis": "X"}](6, 0, 0) rec[-23] +DETECTOR[{"basis": "X"}](6, 4, 0) rec[-14] +DETECTOR[{"basis": "X"}](6, 8, 0) rec[-4] +DETECTOR[{"basis": "X"}](8, 2, 0) rec[-19] +DETECTOR[{"basis": "X"}](8, 6, 0) rec[-9] +DETECTOR[{"basis": "X"}](8, 10, 0) rec[-1] +X_ERROR(0.002) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0001) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.002) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +TICK +REPEAT 9 { + H 2 3 6 7 13 15 16 17 19 20 21 22 24 25 26 28 29 30 35 37 38 39 41 42 43 44 46 47 48 50 51 52 59 63 + DEPOLARIZE1(0.0001) 2 3 6 7 13 15 16 17 19 20 21 22 24 25 26 28 29 30 35 37 38 39 41 42 43 44 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 12 14 18 23 27 31 32 33 34 36 40 45 49 53 54 55 56 57 58 60 61 62 + TICK + CZ 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 + DEPOLARIZE2(0.001) 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 + DEPOLARIZE1(0.0001) 0 1 4 5 8 9 10 11 12 21 32 33 34 43 54 55 56 57 58 59 60 61 62 63 + TICK + H 1 3 5 7 9 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 + DEPOLARIZE1(0.0001) 1 3 5 7 9 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 0 2 4 6 8 10 11 12 13 15 17 19 21 22 24 26 28 30 32 33 34 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 + DEPOLARIZE2(0.001) 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 + DEPOLARIZE1(0.0001) 0 4 8 9 10 11 21 31 32 33 43 47 51 53 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 + DEPOLARIZE2(0.001) 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 + DEPOLARIZE1(0.0001) 0 1 2 3 4 6 7 8 10 11 22 23 32 33 44 45 54 55 56 57 58 60 61 62 + TICK + H 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 + DEPOLARIZE1(0.0001) 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 20 21 24 26 28 30 32 33 35 37 39 41 42 43 46 48 50 52 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 + DEPOLARIZE2(0.001) 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 + DEPOLARIZE1(0.0001) 0 2 4 6 8 10 11 20 22 32 33 42 44 45 49 53 54 55 56 57 58 60 61 62 + TICK + H 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 + DEPOLARIZE1(0.0001) 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 14 18 20 22 23 27 31 32 33 36 40 42 44 45 49 53 54 55 56 57 58 60 61 62 + TICK + M(0.005) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.001) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.0001) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + DEPOLARIZE1(0.002) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + TICK + R 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-24] rec[-48] + DETECTOR[{"basis": "X"}](6, 0, 0) rec[-23] rec[-47] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-22] rec[-46] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-21] rec[-45] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-20] rec[-44] + DETECTOR[{"basis": "X"}](8, 2, 0) rec[-19] rec[-43] + DETECTOR[{"basis": "Z"}](10, 2, 0) rec[-18] rec[-42] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-17] rec[-41] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-16] rec[-40] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-15] rec[-39] + DETECTOR[{"basis": "X"}](6, 4, 0) rec[-14] rec[-38] + DETECTOR[{"basis": "Z"}](8, 4, 0) rec[-13] rec[-37] + DETECTOR[{"basis": "Z"}](2, 6, 0) rec[-12] rec[-36] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-11] rec[-35] + DETECTOR[{"basis": "Z"}](6, 6, 0) rec[-10] rec[-34] + DETECTOR[{"basis": "X"}](8, 6, 0) rec[-9] rec[-33] + DETECTOR[{"basis": "Z"}](10, 6, 0) rec[-8] rec[-32] + DETECTOR[{"basis": "Z"}](0, 8, 0) rec[-7] rec[-31] + DETECTOR[{"basis": "X"}](2, 8, 0) rec[-6] rec[-30] + DETECTOR[{"basis": "Z"}](4, 8, 0) rec[-5] rec[-29] + DETECTOR[{"basis": "X"}](6, 8, 0) rec[-4] rec[-28] + DETECTOR[{"basis": "Z"}](8, 8, 0) rec[-3] rec[-27] + DETECTOR[{"basis": "X"}](4, 10, 0) rec[-2] rec[-26] + DETECTOR[{"basis": "X"}](8, 10, 0) rec[-1] rec[-25] + X_ERROR(0.002) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.0001) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + DEPOLARIZE1(0.002) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + TICK +} +H 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0001) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +M(0.005) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-24] rec[-25] rec[-49] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-14] rec[-15] rec[-19] rec[-20] rec[-41] +DETECTOR[{"basis": "X"}](2, 8, 1) rec[-4] rec[-5] rec[-9] rec[-10] rec[-31] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-18] rec[-19] rec[-23] rec[-24] rec[-46] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-8] rec[-9] rec[-13] rec[-14] rec[-36] +DETECTOR[{"basis": "X"}](4, 10, 1) rec[-3] rec[-4] rec[-27] +DETECTOR[{"basis": "X"}](6, 0, 1) rec[-22] rec[-23] rec[-48] +DETECTOR[{"basis": "X"}](6, 4, 1) rec[-12] rec[-13] rec[-17] rec[-18] rec[-39] +DETECTOR[{"basis": "X"}](6, 8, 1) rec[-2] rec[-3] rec[-7] rec[-8] rec[-29] +DETECTOR[{"basis": "X"}](8, 2, 1) rec[-16] rec[-17] rec[-21] rec[-22] rec[-44] +DETECTOR[{"basis": "X"}](8, 6, 1) rec[-6] rec[-7] rec[-11] rec[-12] rec[-34] +DETECTOR[{"basis": "X"}](8, 10, 1) rec[-1] rec[-2] rec[-26] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-5] rec[-10] rec[-15] rec[-20] rec[-25] +DEPOLARIZE1(0.001) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0001) 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +DEPOLARIZE1(0.002) 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 diff --git a/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00200.stim b/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00200.stim new file mode 100644 index 00000000..b2258892 --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00200.stim @@ -0,0 +1,191 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 0) 6 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 1) 7 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 1) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 12 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 14 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 15 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 3) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 2) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 3) 20 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 2) 21 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 22 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 23 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 24 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 25 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 26 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 27 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 4) 28 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 5) 29 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 4) 30 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 5) 31 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 7) 34 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 6) 35 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 7) 36 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 37 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 7) 38 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 6) 39 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 7) 40 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 6) 41 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 7) 42 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 6) 43 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 8) 44 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 9) 45 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 8) 46 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 9) 47 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 8) 48 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 9) 49 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 8) 50 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 9) 51 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 8) 52 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 9) 53 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 10) 59 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 10) 63 +DEPOLARIZE1(0.0002) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 +TICK +R 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +X_ERROR(0.004) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0002) 0 4 8 10 11 32 33 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.004) 0 4 8 10 11 32 33 54 55 56 57 58 60 61 62 +TICK +H 2 6 12 13 14 15 17 18 19 21 22 23 24 26 27 28 30 31 34 35 36 37 39 40 41 43 44 45 46 48 49 50 52 53 59 63 +DEPOLARIZE1(0.0002) 2 6 12 13 14 15 17 18 19 21 22 23 24 26 27 28 30 31 34 35 36 37 39 40 41 43 44 45 46 48 49 50 52 53 59 63 0 1 3 4 5 7 8 9 10 11 16 20 25 29 32 33 38 42 47 51 54 55 56 57 58 60 61 62 +TICK +CZ 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 +DEPOLARIZE2(0.002) 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 +DEPOLARIZE1(0.0002) 0 1 4 5 8 9 10 11 12 21 32 33 34 43 54 55 56 57 58 59 60 61 62 63 +TICK +H 3 7 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0002) 3 7 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 0 1 2 4 5 6 8 9 10 11 12 13 15 17 19 21 22 24 26 28 30 32 33 34 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 +DEPOLARIZE2(0.002) 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 +DEPOLARIZE1(0.0002) 0 4 8 9 10 11 21 31 32 33 43 47 51 53 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 +DEPOLARIZE2(0.002) 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 +DEPOLARIZE1(0.0002) 0 1 2 3 4 6 7 8 10 11 22 23 32 33 44 45 54 55 56 57 58 60 61 62 +TICK +H 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 +DEPOLARIZE1(0.0002) 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 20 21 24 26 28 30 32 33 35 37 39 41 42 43 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 +DEPOLARIZE2(0.002) 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 +DEPOLARIZE1(0.0002) 0 2 4 6 8 10 11 20 22 32 33 42 44 45 49 53 54 55 56 57 58 60 61 62 +TICK +H 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 +DEPOLARIZE1(0.0002) 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 14 18 20 22 23 27 31 32 33 36 40 42 44 45 49 53 54 55 56 57 58 60 61 62 +TICK +M(0.01) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.002) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0002) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.004) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +TICK +R 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-24] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-16] +DETECTOR[{"basis": "X"}](2, 8, 0) rec[-6] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-21] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-11] +DETECTOR[{"basis": "X"}](4, 10, 0) rec[-2] +DETECTOR[{"basis": "X"}](6, 0, 0) rec[-23] +DETECTOR[{"basis": "X"}](6, 4, 0) rec[-14] +DETECTOR[{"basis": "X"}](6, 8, 0) rec[-4] +DETECTOR[{"basis": "X"}](8, 2, 0) rec[-19] +DETECTOR[{"basis": "X"}](8, 6, 0) rec[-9] +DETECTOR[{"basis": "X"}](8, 10, 0) rec[-1] +X_ERROR(0.004) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0002) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.004) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +TICK +REPEAT 9 { + H 2 3 6 7 13 15 16 17 19 20 21 22 24 25 26 28 29 30 35 37 38 39 41 42 43 44 46 47 48 50 51 52 59 63 + DEPOLARIZE1(0.0002) 2 3 6 7 13 15 16 17 19 20 21 22 24 25 26 28 29 30 35 37 38 39 41 42 43 44 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 12 14 18 23 27 31 32 33 34 36 40 45 49 53 54 55 56 57 58 60 61 62 + TICK + CZ 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 + DEPOLARIZE2(0.002) 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 + DEPOLARIZE1(0.0002) 0 1 4 5 8 9 10 11 12 21 32 33 34 43 54 55 56 57 58 59 60 61 62 63 + TICK + H 1 3 5 7 9 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 + DEPOLARIZE1(0.0002) 1 3 5 7 9 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 0 2 4 6 8 10 11 12 13 15 17 19 21 22 24 26 28 30 32 33 34 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 + DEPOLARIZE2(0.002) 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 + DEPOLARIZE1(0.0002) 0 4 8 9 10 11 21 31 32 33 43 47 51 53 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 + DEPOLARIZE2(0.002) 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 + DEPOLARIZE1(0.0002) 0 1 2 3 4 6 7 8 10 11 22 23 32 33 44 45 54 55 56 57 58 60 61 62 + TICK + H 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 + DEPOLARIZE1(0.0002) 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 20 21 24 26 28 30 32 33 35 37 39 41 42 43 46 48 50 52 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 + DEPOLARIZE2(0.002) 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 + DEPOLARIZE1(0.0002) 0 2 4 6 8 10 11 20 22 32 33 42 44 45 49 53 54 55 56 57 58 60 61 62 + TICK + H 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 + DEPOLARIZE1(0.0002) 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 14 18 20 22 23 27 31 32 33 36 40 42 44 45 49 53 54 55 56 57 58 60 61 62 + TICK + M(0.01) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.002) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.0002) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + DEPOLARIZE1(0.004) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + TICK + R 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-24] rec[-48] + DETECTOR[{"basis": "X"}](6, 0, 0) rec[-23] rec[-47] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-22] rec[-46] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-21] rec[-45] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-20] rec[-44] + DETECTOR[{"basis": "X"}](8, 2, 0) rec[-19] rec[-43] + DETECTOR[{"basis": "Z"}](10, 2, 0) rec[-18] rec[-42] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-17] rec[-41] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-16] rec[-40] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-15] rec[-39] + DETECTOR[{"basis": "X"}](6, 4, 0) rec[-14] rec[-38] + DETECTOR[{"basis": "Z"}](8, 4, 0) rec[-13] rec[-37] + DETECTOR[{"basis": "Z"}](2, 6, 0) rec[-12] rec[-36] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-11] rec[-35] + DETECTOR[{"basis": "Z"}](6, 6, 0) rec[-10] rec[-34] + DETECTOR[{"basis": "X"}](8, 6, 0) rec[-9] rec[-33] + DETECTOR[{"basis": "Z"}](10, 6, 0) rec[-8] rec[-32] + DETECTOR[{"basis": "Z"}](0, 8, 0) rec[-7] rec[-31] + DETECTOR[{"basis": "X"}](2, 8, 0) rec[-6] rec[-30] + DETECTOR[{"basis": "Z"}](4, 8, 0) rec[-5] rec[-29] + DETECTOR[{"basis": "X"}](6, 8, 0) rec[-4] rec[-28] + DETECTOR[{"basis": "Z"}](8, 8, 0) rec[-3] rec[-27] + DETECTOR[{"basis": "X"}](4, 10, 0) rec[-2] rec[-26] + DETECTOR[{"basis": "X"}](8, 10, 0) rec[-1] rec[-25] + X_ERROR(0.004) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.0002) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + DEPOLARIZE1(0.004) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + TICK +} +H 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0002) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +M(0.01) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-24] rec[-25] rec[-49] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-14] rec[-15] rec[-19] rec[-20] rec[-41] +DETECTOR[{"basis": "X"}](2, 8, 1) rec[-4] rec[-5] rec[-9] rec[-10] rec[-31] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-18] rec[-19] rec[-23] rec[-24] rec[-46] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-8] rec[-9] rec[-13] rec[-14] rec[-36] +DETECTOR[{"basis": "X"}](4, 10, 1) rec[-3] rec[-4] rec[-27] +DETECTOR[{"basis": "X"}](6, 0, 1) rec[-22] rec[-23] rec[-48] +DETECTOR[{"basis": "X"}](6, 4, 1) rec[-12] rec[-13] rec[-17] rec[-18] rec[-39] +DETECTOR[{"basis": "X"}](6, 8, 1) rec[-2] rec[-3] rec[-7] rec[-8] rec[-29] +DETECTOR[{"basis": "X"}](8, 2, 1) rec[-16] rec[-17] rec[-21] rec[-22] rec[-44] +DETECTOR[{"basis": "X"}](8, 6, 1) rec[-6] rec[-7] rec[-11] rec[-12] rec[-34] +DETECTOR[{"basis": "X"}](8, 10, 1) rec[-1] rec[-2] rec[-26] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-5] rec[-10] rec[-15] rec[-20] rec[-25] +DEPOLARIZE1(0.002) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0002) 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +DEPOLARIZE1(0.004) 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 diff --git a/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00500.stim b/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00500.stim new file mode 100644 index 00000000..146317da --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=5,basis=X,num_rounds=10,max_qubits_per_module=49,total_qubits=64,k=1,noise=SI1000,p=0.00500.stim @@ -0,0 +1,191 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 0) 6 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 1) 7 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 1) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 12 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 14 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 15 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 3) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 2) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 3) 20 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 2) 21 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 22 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 23 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 24 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 25 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 26 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 27 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 4) 28 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 5) 29 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 4) 30 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 5) 31 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 7) 34 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 6) 35 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 7) 36 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 37 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 7) 38 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 6) 39 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 7) 40 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 6) 41 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 7) 42 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 6) 43 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 8) 44 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 9) 45 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 8) 46 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 9) 47 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 8) 48 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 9) 49 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 8) 50 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 9) 51 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 8) 52 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 9) 53 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 10) 59 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 10) 63 +DEPOLARIZE1(0.0005) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 +TICK +R 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +X_ERROR(0.01) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0005) 0 4 8 10 11 32 33 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.01) 0 4 8 10 11 32 33 54 55 56 57 58 60 61 62 +TICK +H 2 6 12 13 14 15 17 18 19 21 22 23 24 26 27 28 30 31 34 35 36 37 39 40 41 43 44 45 46 48 49 50 52 53 59 63 +DEPOLARIZE1(0.0005) 2 6 12 13 14 15 17 18 19 21 22 23 24 26 27 28 30 31 34 35 36 37 39 40 41 43 44 45 46 48 49 50 52 53 59 63 0 1 3 4 5 7 8 9 10 11 16 20 25 29 32 33 38 42 47 51 54 55 56 57 58 60 61 62 +TICK +CZ 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 +DEPOLARIZE2(0.005) 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 +DEPOLARIZE1(0.0005) 0 1 4 5 8 9 10 11 12 21 32 33 34 43 54 55 56 57 58 59 60 61 62 63 +TICK +H 3 7 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0005) 3 7 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 0 1 2 4 5 6 8 9 10 11 12 13 15 17 19 21 22 24 26 28 30 32 33 34 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 +DEPOLARIZE2(0.005) 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 +DEPOLARIZE1(0.0005) 0 4 8 9 10 11 21 31 32 33 43 47 51 53 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 +DEPOLARIZE2(0.005) 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 +DEPOLARIZE1(0.0005) 0 1 2 3 4 6 7 8 10 11 22 23 32 33 44 45 54 55 56 57 58 60 61 62 +TICK +H 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 +DEPOLARIZE1(0.0005) 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 20 21 24 26 28 30 32 33 35 37 39 41 42 43 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +CZ 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 +DEPOLARIZE2(0.005) 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 +DEPOLARIZE1(0.0005) 0 2 4 6 8 10 11 20 22 32 33 42 44 45 49 53 54 55 56 57 58 60 61 62 +TICK +H 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 +DEPOLARIZE1(0.0005) 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 14 18 20 22 23 27 31 32 33 36 40 42 44 45 49 53 54 55 56 57 58 60 61 62 +TICK +M(0.025) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.005) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0005) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.01) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +TICK +R 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-24] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-16] +DETECTOR[{"basis": "X"}](2, 8, 0) rec[-6] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-21] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-11] +DETECTOR[{"basis": "X"}](4, 10, 0) rec[-2] +DETECTOR[{"basis": "X"}](6, 0, 0) rec[-23] +DETECTOR[{"basis": "X"}](6, 4, 0) rec[-14] +DETECTOR[{"basis": "X"}](6, 8, 0) rec[-4] +DETECTOR[{"basis": "X"}](8, 2, 0) rec[-19] +DETECTOR[{"basis": "X"}](8, 6, 0) rec[-9] +DETECTOR[{"basis": "X"}](8, 10, 0) rec[-1] +X_ERROR(0.01) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 +DEPOLARIZE1(0.0005) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +DEPOLARIZE1(0.01) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 +TICK +REPEAT 9 { + H 2 3 6 7 13 15 16 17 19 20 21 22 24 25 26 28 29 30 35 37 38 39 41 42 43 44 46 47 48 50 51 52 59 63 + DEPOLARIZE1(0.0005) 2 3 6 7 13 15 16 17 19 20 21 22 24 25 26 28 29 30 35 37 38 39 41 42 43 44 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 12 14 18 23 27 31 32 33 34 36 40 45 49 53 54 55 56 57 58 60 61 62 + TICK + CZ 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 + DEPOLARIZE2(0.005) 2 3 6 7 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 + DEPOLARIZE1(0.0005) 0 1 4 5 8 9 10 11 12 21 32 33 34 43 54 55 56 57 58 59 60 61 62 63 + TICK + H 1 3 5 7 9 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 + DEPOLARIZE1(0.0005) 1 3 5 7 9 14 16 18 20 23 25 27 29 31 36 38 40 42 45 47 49 51 53 0 2 4 6 8 10 11 12 13 15 17 19 21 22 24 26 28 30 32 33 34 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 + DEPOLARIZE2(0.005) 1 2 3 13 5 6 7 17 12 22 14 15 16 26 18 19 20 30 23 24 25 35 27 28 29 39 34 44 36 37 38 48 40 41 42 52 45 46 49 50 + DEPOLARIZE1(0.0005) 0 4 8 9 10 11 21 31 32 33 43 47 51 53 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 + DEPOLARIZE2(0.005) 5 15 9 19 12 13 14 24 16 17 18 28 20 21 25 26 27 37 29 30 31 41 34 35 36 46 38 39 40 50 42 43 47 48 49 59 51 52 53 63 + DEPOLARIZE1(0.0005) 0 1 2 3 4 6 7 8 10 11 22 23 32 33 44 45 54 55 56 57 58 60 61 62 + TICK + H 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 + DEPOLARIZE1(0.0005) 1 3 5 7 9 12 14 16 18 22 23 25 27 29 31 34 36 38 40 44 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 20 21 24 26 28 30 32 33 35 37 39 41 42 43 46 48 50 52 54 55 56 57 58 59 60 61 62 63 + TICK + CZ 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 + DEPOLARIZE2(0.005) 1 13 3 15 5 17 7 19 9 21 12 24 14 26 16 28 18 30 23 35 25 37 27 39 29 41 31 43 34 46 36 48 38 50 40 52 47 59 51 63 + DEPOLARIZE1(0.0005) 0 2 4 6 8 10 11 20 22 32 33 42 44 45 49 53 54 55 56 57 58 60 61 62 + TICK + H 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 + DEPOLARIZE1(0.0005) 2 3 6 7 12 13 15 16 17 19 21 24 25 26 28 29 30 34 35 37 38 39 41 43 46 47 48 50 51 52 59 63 0 1 4 5 8 9 10 11 14 18 20 22 23 27 31 32 33 36 40 42 44 45 49 53 54 55 56 57 58 60 61 62 + TICK + M(0.025) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.005) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.0005) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + DEPOLARIZE1(0.01) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + TICK + R 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-24] rec[-48] + DETECTOR[{"basis": "X"}](6, 0, 0) rec[-23] rec[-47] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-22] rec[-46] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-21] rec[-45] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-20] rec[-44] + DETECTOR[{"basis": "X"}](8, 2, 0) rec[-19] rec[-43] + DETECTOR[{"basis": "Z"}](10, 2, 0) rec[-18] rec[-42] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-17] rec[-41] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-16] rec[-40] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-15] rec[-39] + DETECTOR[{"basis": "X"}](6, 4, 0) rec[-14] rec[-38] + DETECTOR[{"basis": "Z"}](8, 4, 0) rec[-13] rec[-37] + DETECTOR[{"basis": "Z"}](2, 6, 0) rec[-12] rec[-36] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-11] rec[-35] + DETECTOR[{"basis": "Z"}](6, 6, 0) rec[-10] rec[-34] + DETECTOR[{"basis": "X"}](8, 6, 0) rec[-9] rec[-33] + DETECTOR[{"basis": "Z"}](10, 6, 0) rec[-8] rec[-32] + DETECTOR[{"basis": "Z"}](0, 8, 0) rec[-7] rec[-31] + DETECTOR[{"basis": "X"}](2, 8, 0) rec[-6] rec[-30] + DETECTOR[{"basis": "Z"}](4, 8, 0) rec[-5] rec[-29] + DETECTOR[{"basis": "X"}](6, 8, 0) rec[-4] rec[-28] + DETECTOR[{"basis": "Z"}](8, 8, 0) rec[-3] rec[-27] + DETECTOR[{"basis": "X"}](4, 10, 0) rec[-2] rec[-26] + DETECTOR[{"basis": "X"}](8, 10, 0) rec[-1] rec[-25] + X_ERROR(0.01) 2 6 13 15 17 19 21 22 24 26 28 30 35 37 39 41 43 44 46 48 50 52 59 63 + DEPOLARIZE1(0.0005) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + DEPOLARIZE1(0.01) 0 1 3 4 5 7 8 9 10 11 12 14 16 18 20 23 25 27 29 31 32 33 34 36 38 40 42 45 47 49 51 53 54 55 56 57 58 60 61 62 + TICK +} +H 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0005) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +TICK +M(0.025) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-24] rec[-25] rec[-49] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-14] rec[-15] rec[-19] rec[-20] rec[-41] +DETECTOR[{"basis": "X"}](2, 8, 1) rec[-4] rec[-5] rec[-9] rec[-10] rec[-31] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-18] rec[-19] rec[-23] rec[-24] rec[-46] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-8] rec[-9] rec[-13] rec[-14] rec[-36] +DETECTOR[{"basis": "X"}](4, 10, 1) rec[-3] rec[-4] rec[-27] +DETECTOR[{"basis": "X"}](6, 0, 1) rec[-22] rec[-23] rec[-48] +DETECTOR[{"basis": "X"}](6, 4, 1) rec[-12] rec[-13] rec[-17] rec[-18] rec[-39] +DETECTOR[{"basis": "X"}](6, 8, 1) rec[-2] rec[-3] rec[-7] rec[-8] rec[-29] +DETECTOR[{"basis": "X"}](8, 2, 1) rec[-16] rec[-17] rec[-21] rec[-22] rec[-44] +DETECTOR[{"basis": "X"}](8, 6, 1) rec[-6] rec[-7] rec[-11] rec[-12] rec[-34] +DETECTOR[{"basis": "X"}](8, 10, 1) rec[-1] rec[-2] rec[-26] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-5] rec[-10] rec[-15] rec[-20] rec[-25] +DEPOLARIZE1(0.005) 1 3 5 7 9 12 14 16 18 20 23 25 27 29 31 34 36 38 40 42 45 47 49 51 53 +DEPOLARIZE1(0.0005) 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 +DEPOLARIZE1(0.01) 0 2 4 6 8 10 11 13 15 17 19 21 22 24 26 28 30 32 33 35 37 39 41 43 44 46 48 50 52 54 55 56 57 58 59 60 61 62 63 diff --git a/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00100.stim b/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00100.stim new file mode 100644 index 00000000..b720e441 --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00100.stim @@ -0,0 +1,287 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 0) 6 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 1) 7 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 1) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 0) 10 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 1) 11 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 1) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 20 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 21 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 3) 22 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 2) 23 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 3) 24 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 2) 25 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 3) 26 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 2) 27 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 3) 28 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 2) 29 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 30 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 31 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 32 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 33 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 34 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 35 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 4) 36 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 5) 37 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 4) 38 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 5) 39 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 4) 40 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 5) 41 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 4) 42 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 5) 43 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 7) 46 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 6) 47 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 7) 48 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 49 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 7) 50 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 6) 51 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 7) 52 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 6) 53 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 7) 54 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 6) 55 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 7) 56 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 6) 57 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 7) 58 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 6) 59 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 8) 60 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 9) 61 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 8) 62 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 9) 63 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 8) 64 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 9) 65 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 8) 66 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 9) 67 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 8) 68 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 9) 69 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 8) 70 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 9) 71 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 8) 72 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 9) 73 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 11) 76 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 10) 77 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 11) 78 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 10) 79 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 11) 80 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 10) 81 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 11) 82 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 10) 83 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 11) 84 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 10) 85 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 11) 86 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 10) 87 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 11) 88 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 10) 89 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 12) 90 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 13) 91 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 12) 92 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 13) 93 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 12) 94 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 13) 95 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 12) 96 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 13) 97 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 12) 98 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 13) 99 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 12) 100 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 13) 101 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 12) 102 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 13) 103 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](4, 14) 109 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](8, 14) 113 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](12, 14) 117 +DEPOLARIZE1(0.0001) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +R 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +X_ERROR(0.002) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0001) 0 4 8 12 14 15 44 45 74 75 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.002) 0 4 8 12 14 15 44 45 74 75 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 2 6 10 16 17 18 19 21 22 23 25 26 27 29 30 31 32 34 35 36 38 39 40 42 43 46 47 48 49 51 52 53 55 56 57 59 60 61 62 64 65 66 68 69 70 72 73 76 77 78 79 81 82 83 85 86 87 89 90 91 92 94 95 96 98 99 100 102 103 109 113 117 +DEPOLARIZE1(0.0001) 2 6 10 16 17 18 19 21 22 23 25 26 27 29 30 31 32 34 35 36 38 39 40 42 43 46 47 48 49 51 52 53 55 56 57 59 60 61 62 64 65 66 68 69 70 72 73 76 77 78 79 81 82 83 85 86 87 89 90 91 92 94 95 96 98 99 100 102 103 109 113 117 0 1 3 4 5 7 8 9 11 12 13 14 15 20 24 28 33 37 41 44 45 50 54 58 63 67 71 74 75 80 84 88 93 97 101 104 105 106 107 108 110 111 112 114 115 116 +TICK +CZ 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 +DEPOLARIZE2(0.001) 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 +DEPOLARIZE1(0.0001) 0 1 4 5 8 9 12 13 14 15 16 29 44 45 46 59 74 75 76 89 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +H 3 7 11 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0001) 3 7 11 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 0 1 2 4 5 6 8 9 10 12 13 14 15 16 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 46 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 76 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 +DEPOLARIZE2(0.001) 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 +DEPOLARIZE1(0.0001) 0 4 8 12 13 14 15 29 43 44 45 59 73 74 75 89 93 97 101 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 +DEPOLARIZE2(0.001) 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 +DEPOLARIZE1(0.0001) 0 1 2 3 4 6 7 8 10 11 12 14 15 30 31 44 45 60 61 74 75 90 91 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0001) 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 28 29 32 34 36 38 40 42 44 45 47 49 51 53 55 57 58 59 62 64 66 68 70 72 74 75 77 79 81 83 85 87 88 89 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 +DEPOLARIZE2(0.001) 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 +DEPOLARIZE1(0.0001) 0 2 4 6 8 10 12 14 15 28 30 44 45 58 60 74 75 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 +DEPOLARIZE1(0.0001) 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 18 22 26 28 30 31 35 39 43 44 45 48 52 56 58 60 61 65 69 73 74 75 78 82 86 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +M(0.005) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.001) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0001) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.002) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +R 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-48] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-37] +DETECTOR[{"basis": "X"}](2, 8, 0) rec[-23] +DETECTOR[{"basis": "X"}](2, 12, 0) rec[-9] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-44] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-30] +DETECTOR[{"basis": "X"}](4, 10, 0) rec[-16] +DETECTOR[{"basis": "X"}](4, 14, 0) rec[-3] +DETECTOR[{"basis": "X"}](6, 0, 0) rec[-47] +DETECTOR[{"basis": "X"}](6, 4, 0) rec[-35] +DETECTOR[{"basis": "X"}](6, 8, 0) rec[-21] +DETECTOR[{"basis": "X"}](6, 12, 0) rec[-7] +DETECTOR[{"basis": "X"}](8, 2, 0) rec[-42] +DETECTOR[{"basis": "X"}](8, 6, 0) rec[-28] +DETECTOR[{"basis": "X"}](8, 10, 0) rec[-14] +DETECTOR[{"basis": "X"}](8, 14, 0) rec[-2] +DETECTOR[{"basis": "X"}](10, 0, 0) rec[-46] +DETECTOR[{"basis": "X"}](10, 4, 0) rec[-33] +DETECTOR[{"basis": "X"}](10, 8, 0) rec[-19] +DETECTOR[{"basis": "X"}](10, 12, 0) rec[-5] +DETECTOR[{"basis": "X"}](12, 2, 0) rec[-40] +DETECTOR[{"basis": "X"}](12, 6, 0) rec[-26] +DETECTOR[{"basis": "X"}](12, 10, 0) rec[-12] +DETECTOR[{"basis": "X"}](12, 14, 0) rec[-1] +X_ERROR(0.002) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0001) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.002) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +REPEAT 9 { + H 2 3 6 7 10 11 17 19 20 21 23 24 25 27 28 29 30 32 33 34 36 37 38 40 41 42 47 49 50 51 53 54 55 57 58 59 60 62 63 64 66 67 68 70 71 72 77 79 80 81 83 84 85 87 88 89 90 92 93 94 96 97 98 100 101 102 109 113 117 + DEPOLARIZE1(0.0001) 2 3 6 7 10 11 17 19 20 21 23 24 25 27 28 29 30 32 33 34 36 37 38 40 41 42 47 49 50 51 53 54 55 57 58 59 60 62 63 64 66 67 68 70 71 72 77 79 80 81 83 84 85 87 88 89 90 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 16 18 22 26 31 35 39 43 44 45 46 48 52 56 61 65 69 73 74 75 76 78 82 86 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + CZ 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 + DEPOLARIZE2(0.001) 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 + DEPOLARIZE1(0.0001) 0 1 4 5 8 9 12 13 14 15 16 29 44 45 46 59 74 75 76 89 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + H 1 3 5 7 9 11 13 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 + DEPOLARIZE1(0.0001) 1 3 5 7 9 11 13 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 16 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 46 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 76 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 + DEPOLARIZE2(0.001) 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 + DEPOLARIZE1(0.0001) 0 4 8 12 13 14 15 29 43 44 45 59 73 74 75 89 93 97 101 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 + DEPOLARIZE2(0.001) 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 + DEPOLARIZE1(0.0001) 0 1 2 3 4 6 7 8 10 11 12 14 15 30 31 44 45 60 61 74 75 90 91 104 105 106 107 108 110 111 112 114 115 116 + TICK + H 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 + DEPOLARIZE1(0.0001) 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 28 29 32 34 36 38 40 42 44 45 47 49 51 53 55 57 58 59 62 64 66 68 70 72 74 75 77 79 81 83 85 87 88 89 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 + DEPOLARIZE2(0.001) 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 + DEPOLARIZE1(0.0001) 0 2 4 6 8 10 12 14 15 28 30 44 45 58 60 74 75 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + H 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 + DEPOLARIZE1(0.0001) 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 18 22 26 28 30 31 35 39 43 44 45 48 52 56 58 60 61 65 69 73 74 75 78 82 86 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + M(0.005) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.001) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.0001) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + DEPOLARIZE1(0.002) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + R 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-48] rec[-96] + DETECTOR[{"basis": "X"}](6, 0, 0) rec[-47] rec[-95] + DETECTOR[{"basis": "X"}](10, 0, 0) rec[-46] rec[-94] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-45] rec[-93] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-44] rec[-92] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-43] rec[-91] + DETECTOR[{"basis": "X"}](8, 2, 0) rec[-42] rec[-90] + DETECTOR[{"basis": "Z"}](10, 2, 0) rec[-41] rec[-89] + DETECTOR[{"basis": "X"}](12, 2, 0) rec[-40] rec[-88] + DETECTOR[{"basis": "Z"}](14, 2, 0) rec[-39] rec[-87] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-38] rec[-86] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-37] rec[-85] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-36] rec[-84] + DETECTOR[{"basis": "X"}](6, 4, 0) rec[-35] rec[-83] + DETECTOR[{"basis": "Z"}](8, 4, 0) rec[-34] rec[-82] + DETECTOR[{"basis": "X"}](10, 4, 0) rec[-33] rec[-81] + DETECTOR[{"basis": "Z"}](12, 4, 0) rec[-32] rec[-80] + DETECTOR[{"basis": "Z"}](2, 6, 0) rec[-31] rec[-79] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-30] rec[-78] + DETECTOR[{"basis": "Z"}](6, 6, 0) rec[-29] rec[-77] + DETECTOR[{"basis": "X"}](8, 6, 0) rec[-28] rec[-76] + DETECTOR[{"basis": "Z"}](10, 6, 0) rec[-27] rec[-75] + DETECTOR[{"basis": "X"}](12, 6, 0) rec[-26] rec[-74] + DETECTOR[{"basis": "Z"}](14, 6, 0) rec[-25] rec[-73] + DETECTOR[{"basis": "Z"}](0, 8, 0) rec[-24] rec[-72] + DETECTOR[{"basis": "X"}](2, 8, 0) rec[-23] rec[-71] + DETECTOR[{"basis": "Z"}](4, 8, 0) rec[-22] rec[-70] + DETECTOR[{"basis": "X"}](6, 8, 0) rec[-21] rec[-69] + DETECTOR[{"basis": "Z"}](8, 8, 0) rec[-20] rec[-68] + DETECTOR[{"basis": "X"}](10, 8, 0) rec[-19] rec[-67] + DETECTOR[{"basis": "Z"}](12, 8, 0) rec[-18] rec[-66] + DETECTOR[{"basis": "Z"}](2, 10, 0) rec[-17] rec[-65] + DETECTOR[{"basis": "X"}](4, 10, 0) rec[-16] rec[-64] + DETECTOR[{"basis": "Z"}](6, 10, 0) rec[-15] rec[-63] + DETECTOR[{"basis": "X"}](8, 10, 0) rec[-14] rec[-62] + DETECTOR[{"basis": "Z"}](10, 10, 0) rec[-13] rec[-61] + DETECTOR[{"basis": "X"}](12, 10, 0) rec[-12] rec[-60] + DETECTOR[{"basis": "Z"}](14, 10, 0) rec[-11] rec[-59] + DETECTOR[{"basis": "Z"}](0, 12, 0) rec[-10] rec[-58] + DETECTOR[{"basis": "X"}](2, 12, 0) rec[-9] rec[-57] + DETECTOR[{"basis": "Z"}](4, 12, 0) rec[-8] rec[-56] + DETECTOR[{"basis": "X"}](6, 12, 0) rec[-7] rec[-55] + DETECTOR[{"basis": "Z"}](8, 12, 0) rec[-6] rec[-54] + DETECTOR[{"basis": "X"}](10, 12, 0) rec[-5] rec[-53] + DETECTOR[{"basis": "Z"}](12, 12, 0) rec[-4] rec[-52] + DETECTOR[{"basis": "X"}](4, 14, 0) rec[-3] rec[-51] + DETECTOR[{"basis": "X"}](8, 14, 0) rec[-2] rec[-50] + DETECTOR[{"basis": "X"}](12, 14, 0) rec[-1] rec[-49] + X_ERROR(0.002) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.0001) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + DEPOLARIZE1(0.002) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + TICK +} +H 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0001) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +M(0.005) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-48] rec[-49] rec[-97] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-34] rec[-35] rec[-41] rec[-42] rec[-86] +DETECTOR[{"basis": "X"}](2, 8, 1) rec[-20] rec[-21] rec[-27] rec[-28] rec[-72] +DETECTOR[{"basis": "X"}](2, 12, 1) rec[-6] rec[-7] rec[-13] rec[-14] rec[-58] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-40] rec[-41] rec[-47] rec[-48] rec[-93] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-26] rec[-27] rec[-33] rec[-34] rec[-79] +DETECTOR[{"basis": "X"}](4, 10, 1) rec[-12] rec[-13] rec[-19] rec[-20] rec[-65] +DETECTOR[{"basis": "X"}](4, 14, 1) rec[-5] rec[-6] rec[-52] +DETECTOR[{"basis": "X"}](6, 0, 1) rec[-46] rec[-47] rec[-96] +DETECTOR[{"basis": "X"}](6, 4, 1) rec[-32] rec[-33] rec[-39] rec[-40] rec[-84] +DETECTOR[{"basis": "X"}](6, 8, 1) rec[-18] rec[-19] rec[-25] rec[-26] rec[-70] +DETECTOR[{"basis": "X"}](6, 12, 1) rec[-4] rec[-5] rec[-11] rec[-12] rec[-56] +DETECTOR[{"basis": "X"}](8, 2, 1) rec[-38] rec[-39] rec[-45] rec[-46] rec[-91] +DETECTOR[{"basis": "X"}](8, 6, 1) rec[-24] rec[-25] rec[-31] rec[-32] rec[-77] +DETECTOR[{"basis": "X"}](8, 10, 1) rec[-10] rec[-11] rec[-17] rec[-18] rec[-63] +DETECTOR[{"basis": "X"}](8, 14, 1) rec[-3] rec[-4] rec[-51] +DETECTOR[{"basis": "X"}](10, 0, 1) rec[-44] rec[-45] rec[-95] +DETECTOR[{"basis": "X"}](10, 4, 1) rec[-30] rec[-31] rec[-37] rec[-38] rec[-82] +DETECTOR[{"basis": "X"}](10, 8, 1) rec[-16] rec[-17] rec[-23] rec[-24] rec[-68] +DETECTOR[{"basis": "X"}](10, 12, 1) rec[-2] rec[-3] rec[-9] rec[-10] rec[-54] +DETECTOR[{"basis": "X"}](12, 2, 1) rec[-36] rec[-37] rec[-43] rec[-44] rec[-89] +DETECTOR[{"basis": "X"}](12, 6, 1) rec[-22] rec[-23] rec[-29] rec[-30] rec[-75] +DETECTOR[{"basis": "X"}](12, 10, 1) rec[-8] rec[-9] rec[-15] rec[-16] rec[-61] +DETECTOR[{"basis": "X"}](12, 14, 1) rec[-1] rec[-2] rec[-50] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-7] rec[-14] rec[-21] rec[-28] rec[-35] rec[-42] rec[-49] +DEPOLARIZE1(0.001) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0001) 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +DEPOLARIZE1(0.002) 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 diff --git a/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00200.stim b/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00200.stim new file mode 100644 index 00000000..4af77829 --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00200.stim @@ -0,0 +1,287 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 0) 6 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 1) 7 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 1) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 0) 10 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 1) 11 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 1) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 20 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 21 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 3) 22 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 2) 23 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 3) 24 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 2) 25 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 3) 26 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 2) 27 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 3) 28 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 2) 29 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 30 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 31 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 32 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 33 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 34 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 35 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 4) 36 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 5) 37 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 4) 38 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 5) 39 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 4) 40 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 5) 41 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 4) 42 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 5) 43 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 7) 46 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 6) 47 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 7) 48 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 49 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 7) 50 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 6) 51 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 7) 52 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 6) 53 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 7) 54 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 6) 55 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 7) 56 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 6) 57 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 7) 58 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 6) 59 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 8) 60 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 9) 61 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 8) 62 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 9) 63 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 8) 64 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 9) 65 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 8) 66 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 9) 67 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 8) 68 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 9) 69 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 8) 70 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 9) 71 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 8) 72 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 9) 73 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 11) 76 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 10) 77 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 11) 78 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 10) 79 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 11) 80 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 10) 81 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 11) 82 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 10) 83 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 11) 84 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 10) 85 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 11) 86 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 10) 87 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 11) 88 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 10) 89 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 12) 90 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 13) 91 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 12) 92 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 13) 93 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 12) 94 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 13) 95 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 12) 96 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 13) 97 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 12) 98 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 13) 99 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 12) 100 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 13) 101 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 12) 102 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 13) 103 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](4, 14) 109 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](8, 14) 113 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](12, 14) 117 +DEPOLARIZE1(0.0002) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +R 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +X_ERROR(0.004) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0002) 0 4 8 12 14 15 44 45 74 75 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.004) 0 4 8 12 14 15 44 45 74 75 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 2 6 10 16 17 18 19 21 22 23 25 26 27 29 30 31 32 34 35 36 38 39 40 42 43 46 47 48 49 51 52 53 55 56 57 59 60 61 62 64 65 66 68 69 70 72 73 76 77 78 79 81 82 83 85 86 87 89 90 91 92 94 95 96 98 99 100 102 103 109 113 117 +DEPOLARIZE1(0.0002) 2 6 10 16 17 18 19 21 22 23 25 26 27 29 30 31 32 34 35 36 38 39 40 42 43 46 47 48 49 51 52 53 55 56 57 59 60 61 62 64 65 66 68 69 70 72 73 76 77 78 79 81 82 83 85 86 87 89 90 91 92 94 95 96 98 99 100 102 103 109 113 117 0 1 3 4 5 7 8 9 11 12 13 14 15 20 24 28 33 37 41 44 45 50 54 58 63 67 71 74 75 80 84 88 93 97 101 104 105 106 107 108 110 111 112 114 115 116 +TICK +CZ 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 +DEPOLARIZE2(0.002) 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 +DEPOLARIZE1(0.0002) 0 1 4 5 8 9 12 13 14 15 16 29 44 45 46 59 74 75 76 89 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +H 3 7 11 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0002) 3 7 11 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 0 1 2 4 5 6 8 9 10 12 13 14 15 16 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 46 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 76 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 +DEPOLARIZE2(0.002) 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 +DEPOLARIZE1(0.0002) 0 4 8 12 13 14 15 29 43 44 45 59 73 74 75 89 93 97 101 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 +DEPOLARIZE2(0.002) 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 +DEPOLARIZE1(0.0002) 0 1 2 3 4 6 7 8 10 11 12 14 15 30 31 44 45 60 61 74 75 90 91 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0002) 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 28 29 32 34 36 38 40 42 44 45 47 49 51 53 55 57 58 59 62 64 66 68 70 72 74 75 77 79 81 83 85 87 88 89 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 +DEPOLARIZE2(0.002) 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 +DEPOLARIZE1(0.0002) 0 2 4 6 8 10 12 14 15 28 30 44 45 58 60 74 75 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 +DEPOLARIZE1(0.0002) 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 18 22 26 28 30 31 35 39 43 44 45 48 52 56 58 60 61 65 69 73 74 75 78 82 86 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +M(0.01) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.002) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0002) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.004) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +R 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-48] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-37] +DETECTOR[{"basis": "X"}](2, 8, 0) rec[-23] +DETECTOR[{"basis": "X"}](2, 12, 0) rec[-9] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-44] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-30] +DETECTOR[{"basis": "X"}](4, 10, 0) rec[-16] +DETECTOR[{"basis": "X"}](4, 14, 0) rec[-3] +DETECTOR[{"basis": "X"}](6, 0, 0) rec[-47] +DETECTOR[{"basis": "X"}](6, 4, 0) rec[-35] +DETECTOR[{"basis": "X"}](6, 8, 0) rec[-21] +DETECTOR[{"basis": "X"}](6, 12, 0) rec[-7] +DETECTOR[{"basis": "X"}](8, 2, 0) rec[-42] +DETECTOR[{"basis": "X"}](8, 6, 0) rec[-28] +DETECTOR[{"basis": "X"}](8, 10, 0) rec[-14] +DETECTOR[{"basis": "X"}](8, 14, 0) rec[-2] +DETECTOR[{"basis": "X"}](10, 0, 0) rec[-46] +DETECTOR[{"basis": "X"}](10, 4, 0) rec[-33] +DETECTOR[{"basis": "X"}](10, 8, 0) rec[-19] +DETECTOR[{"basis": "X"}](10, 12, 0) rec[-5] +DETECTOR[{"basis": "X"}](12, 2, 0) rec[-40] +DETECTOR[{"basis": "X"}](12, 6, 0) rec[-26] +DETECTOR[{"basis": "X"}](12, 10, 0) rec[-12] +DETECTOR[{"basis": "X"}](12, 14, 0) rec[-1] +X_ERROR(0.004) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0002) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.004) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +REPEAT 9 { + H 2 3 6 7 10 11 17 19 20 21 23 24 25 27 28 29 30 32 33 34 36 37 38 40 41 42 47 49 50 51 53 54 55 57 58 59 60 62 63 64 66 67 68 70 71 72 77 79 80 81 83 84 85 87 88 89 90 92 93 94 96 97 98 100 101 102 109 113 117 + DEPOLARIZE1(0.0002) 2 3 6 7 10 11 17 19 20 21 23 24 25 27 28 29 30 32 33 34 36 37 38 40 41 42 47 49 50 51 53 54 55 57 58 59 60 62 63 64 66 67 68 70 71 72 77 79 80 81 83 84 85 87 88 89 90 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 16 18 22 26 31 35 39 43 44 45 46 48 52 56 61 65 69 73 74 75 76 78 82 86 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + CZ 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 + DEPOLARIZE2(0.002) 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 + DEPOLARIZE1(0.0002) 0 1 4 5 8 9 12 13 14 15 16 29 44 45 46 59 74 75 76 89 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + H 1 3 5 7 9 11 13 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 + DEPOLARIZE1(0.0002) 1 3 5 7 9 11 13 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 16 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 46 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 76 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 + DEPOLARIZE2(0.002) 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 + DEPOLARIZE1(0.0002) 0 4 8 12 13 14 15 29 43 44 45 59 73 74 75 89 93 97 101 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 + DEPOLARIZE2(0.002) 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 + DEPOLARIZE1(0.0002) 0 1 2 3 4 6 7 8 10 11 12 14 15 30 31 44 45 60 61 74 75 90 91 104 105 106 107 108 110 111 112 114 115 116 + TICK + H 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 + DEPOLARIZE1(0.0002) 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 28 29 32 34 36 38 40 42 44 45 47 49 51 53 55 57 58 59 62 64 66 68 70 72 74 75 77 79 81 83 85 87 88 89 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 + DEPOLARIZE2(0.002) 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 + DEPOLARIZE1(0.0002) 0 2 4 6 8 10 12 14 15 28 30 44 45 58 60 74 75 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + H 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 + DEPOLARIZE1(0.0002) 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 18 22 26 28 30 31 35 39 43 44 45 48 52 56 58 60 61 65 69 73 74 75 78 82 86 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + M(0.01) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.002) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.0002) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + DEPOLARIZE1(0.004) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + R 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-48] rec[-96] + DETECTOR[{"basis": "X"}](6, 0, 0) rec[-47] rec[-95] + DETECTOR[{"basis": "X"}](10, 0, 0) rec[-46] rec[-94] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-45] rec[-93] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-44] rec[-92] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-43] rec[-91] + DETECTOR[{"basis": "X"}](8, 2, 0) rec[-42] rec[-90] + DETECTOR[{"basis": "Z"}](10, 2, 0) rec[-41] rec[-89] + DETECTOR[{"basis": "X"}](12, 2, 0) rec[-40] rec[-88] + DETECTOR[{"basis": "Z"}](14, 2, 0) rec[-39] rec[-87] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-38] rec[-86] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-37] rec[-85] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-36] rec[-84] + DETECTOR[{"basis": "X"}](6, 4, 0) rec[-35] rec[-83] + DETECTOR[{"basis": "Z"}](8, 4, 0) rec[-34] rec[-82] + DETECTOR[{"basis": "X"}](10, 4, 0) rec[-33] rec[-81] + DETECTOR[{"basis": "Z"}](12, 4, 0) rec[-32] rec[-80] + DETECTOR[{"basis": "Z"}](2, 6, 0) rec[-31] rec[-79] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-30] rec[-78] + DETECTOR[{"basis": "Z"}](6, 6, 0) rec[-29] rec[-77] + DETECTOR[{"basis": "X"}](8, 6, 0) rec[-28] rec[-76] + DETECTOR[{"basis": "Z"}](10, 6, 0) rec[-27] rec[-75] + DETECTOR[{"basis": "X"}](12, 6, 0) rec[-26] rec[-74] + DETECTOR[{"basis": "Z"}](14, 6, 0) rec[-25] rec[-73] + DETECTOR[{"basis": "Z"}](0, 8, 0) rec[-24] rec[-72] + DETECTOR[{"basis": "X"}](2, 8, 0) rec[-23] rec[-71] + DETECTOR[{"basis": "Z"}](4, 8, 0) rec[-22] rec[-70] + DETECTOR[{"basis": "X"}](6, 8, 0) rec[-21] rec[-69] + DETECTOR[{"basis": "Z"}](8, 8, 0) rec[-20] rec[-68] + DETECTOR[{"basis": "X"}](10, 8, 0) rec[-19] rec[-67] + DETECTOR[{"basis": "Z"}](12, 8, 0) rec[-18] rec[-66] + DETECTOR[{"basis": "Z"}](2, 10, 0) rec[-17] rec[-65] + DETECTOR[{"basis": "X"}](4, 10, 0) rec[-16] rec[-64] + DETECTOR[{"basis": "Z"}](6, 10, 0) rec[-15] rec[-63] + DETECTOR[{"basis": "X"}](8, 10, 0) rec[-14] rec[-62] + DETECTOR[{"basis": "Z"}](10, 10, 0) rec[-13] rec[-61] + DETECTOR[{"basis": "X"}](12, 10, 0) rec[-12] rec[-60] + DETECTOR[{"basis": "Z"}](14, 10, 0) rec[-11] rec[-59] + DETECTOR[{"basis": "Z"}](0, 12, 0) rec[-10] rec[-58] + DETECTOR[{"basis": "X"}](2, 12, 0) rec[-9] rec[-57] + DETECTOR[{"basis": "Z"}](4, 12, 0) rec[-8] rec[-56] + DETECTOR[{"basis": "X"}](6, 12, 0) rec[-7] rec[-55] + DETECTOR[{"basis": "Z"}](8, 12, 0) rec[-6] rec[-54] + DETECTOR[{"basis": "X"}](10, 12, 0) rec[-5] rec[-53] + DETECTOR[{"basis": "Z"}](12, 12, 0) rec[-4] rec[-52] + DETECTOR[{"basis": "X"}](4, 14, 0) rec[-3] rec[-51] + DETECTOR[{"basis": "X"}](8, 14, 0) rec[-2] rec[-50] + DETECTOR[{"basis": "X"}](12, 14, 0) rec[-1] rec[-49] + X_ERROR(0.004) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.0002) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + DEPOLARIZE1(0.004) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + TICK +} +H 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0002) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +M(0.01) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-48] rec[-49] rec[-97] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-34] rec[-35] rec[-41] rec[-42] rec[-86] +DETECTOR[{"basis": "X"}](2, 8, 1) rec[-20] rec[-21] rec[-27] rec[-28] rec[-72] +DETECTOR[{"basis": "X"}](2, 12, 1) rec[-6] rec[-7] rec[-13] rec[-14] rec[-58] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-40] rec[-41] rec[-47] rec[-48] rec[-93] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-26] rec[-27] rec[-33] rec[-34] rec[-79] +DETECTOR[{"basis": "X"}](4, 10, 1) rec[-12] rec[-13] rec[-19] rec[-20] rec[-65] +DETECTOR[{"basis": "X"}](4, 14, 1) rec[-5] rec[-6] rec[-52] +DETECTOR[{"basis": "X"}](6, 0, 1) rec[-46] rec[-47] rec[-96] +DETECTOR[{"basis": "X"}](6, 4, 1) rec[-32] rec[-33] rec[-39] rec[-40] rec[-84] +DETECTOR[{"basis": "X"}](6, 8, 1) rec[-18] rec[-19] rec[-25] rec[-26] rec[-70] +DETECTOR[{"basis": "X"}](6, 12, 1) rec[-4] rec[-5] rec[-11] rec[-12] rec[-56] +DETECTOR[{"basis": "X"}](8, 2, 1) rec[-38] rec[-39] rec[-45] rec[-46] rec[-91] +DETECTOR[{"basis": "X"}](8, 6, 1) rec[-24] rec[-25] rec[-31] rec[-32] rec[-77] +DETECTOR[{"basis": "X"}](8, 10, 1) rec[-10] rec[-11] rec[-17] rec[-18] rec[-63] +DETECTOR[{"basis": "X"}](8, 14, 1) rec[-3] rec[-4] rec[-51] +DETECTOR[{"basis": "X"}](10, 0, 1) rec[-44] rec[-45] rec[-95] +DETECTOR[{"basis": "X"}](10, 4, 1) rec[-30] rec[-31] rec[-37] rec[-38] rec[-82] +DETECTOR[{"basis": "X"}](10, 8, 1) rec[-16] rec[-17] rec[-23] rec[-24] rec[-68] +DETECTOR[{"basis": "X"}](10, 12, 1) rec[-2] rec[-3] rec[-9] rec[-10] rec[-54] +DETECTOR[{"basis": "X"}](12, 2, 1) rec[-36] rec[-37] rec[-43] rec[-44] rec[-89] +DETECTOR[{"basis": "X"}](12, 6, 1) rec[-22] rec[-23] rec[-29] rec[-30] rec[-75] +DETECTOR[{"basis": "X"}](12, 10, 1) rec[-8] rec[-9] rec[-15] rec[-16] rec[-61] +DETECTOR[{"basis": "X"}](12, 14, 1) rec[-1] rec[-2] rec[-50] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-7] rec[-14] rec[-21] rec[-28] rec[-35] rec[-42] rec[-49] +DEPOLARIZE1(0.002) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0002) 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +DEPOLARIZE1(0.004) 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 diff --git a/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00500.stim b/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00500.stim new file mode 100644 index 00000000..67e55151 --- /dev/null +++ b/testdata/annotated_surface_codes/style=surface_code,d=7,basis=X,num_rounds=10,max_qubits_per_module=91,total_qubits=118,k=1,noise=SI1000,p=0.00500.stim @@ -0,0 +1,287 @@ +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 1) 1 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 0) 2 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 1) 3 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 1) 5 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 0) 6 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 1) 7 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 1) 9 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 0) 10 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 1) 11 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 1) 13 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 3) 16 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 2) 17 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 3) 18 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 2) 19 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 3) 20 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 2) 21 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 3) 22 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 2) 23 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 3) 24 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 2) 25 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 3) 26 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 2) 27 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 3) 28 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 2) 29 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 4) 30 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 5) 31 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 4) 32 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 5) 33 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 4) 34 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 5) 35 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 4) 36 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 5) 37 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 4) 38 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 5) 39 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 4) 40 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 5) 41 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 4) 42 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 5) 43 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 7) 46 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 6) 47 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 7) 48 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 6) 49 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 7) 50 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 6) 51 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 7) 52 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 6) 53 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 7) 54 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 6) 55 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 7) 56 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 6) 57 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 7) 58 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 6) 59 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 8) 60 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 9) 61 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 8) 62 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 9) 63 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 8) 64 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 9) 65 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 8) 66 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 9) 67 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 8) 68 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 9) 69 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 8) 70 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 9) 71 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 8) 72 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 9) 73 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 11) 76 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 10) 77 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 11) 78 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 10) 79 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 11) 80 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 10) 81 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 11) 82 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 10) 83 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 11) 84 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 10) 85 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 11) 86 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 10) 87 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 11) 88 +QUBIT_COORDS[module={"module": {"module_id": 1, "module_coord": [1, 0\C}}](14, 10) 89 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](0, 12) 90 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](1, 13) 91 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](2, 12) 92 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](3, 13) 93 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](4, 12) 94 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](5, 13) 95 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](6, 12) 96 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](7, 13) 97 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](8, 12) 98 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](9, 13) 99 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](10, 12) 100 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](11, 13) 101 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](12, 12) 102 +QUBIT_COORDS[module={"module": {"module_id": 0, "module_coord": [0, 0\C}}](13, 13) 103 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](4, 14) 109 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](8, 14) 113 +QUBIT_COORDS[module={"module": {"module_id": 2, "module_coord": [0, 1\C}}](12, 14) 117 +DEPOLARIZE1(0.0005) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +R 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +X_ERROR(0.01) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0005) 0 4 8 12 14 15 44 45 74 75 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.01) 0 4 8 12 14 15 44 45 74 75 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 2 6 10 16 17 18 19 21 22 23 25 26 27 29 30 31 32 34 35 36 38 39 40 42 43 46 47 48 49 51 52 53 55 56 57 59 60 61 62 64 65 66 68 69 70 72 73 76 77 78 79 81 82 83 85 86 87 89 90 91 92 94 95 96 98 99 100 102 103 109 113 117 +DEPOLARIZE1(0.0005) 2 6 10 16 17 18 19 21 22 23 25 26 27 29 30 31 32 34 35 36 38 39 40 42 43 46 47 48 49 51 52 53 55 56 57 59 60 61 62 64 65 66 68 69 70 72 73 76 77 78 79 81 82 83 85 86 87 89 90 91 92 94 95 96 98 99 100 102 103 109 113 117 0 1 3 4 5 7 8 9 11 12 13 14 15 20 24 28 33 37 41 44 45 50 54 58 63 67 71 74 75 80 84 88 93 97 101 104 105 106 107 108 110 111 112 114 115 116 +TICK +CZ 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 +DEPOLARIZE2(0.005) 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 +DEPOLARIZE1(0.0005) 0 1 4 5 8 9 12 13 14 15 16 29 44 45 46 59 74 75 76 89 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +H 3 7 11 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0005) 3 7 11 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 0 1 2 4 5 6 8 9 10 12 13 14 15 16 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 46 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 76 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 +DEPOLARIZE2(0.005) 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 +DEPOLARIZE1(0.0005) 0 4 8 12 13 14 15 29 43 44 45 59 73 74 75 89 93 97 101 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 +DEPOLARIZE2(0.005) 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 +DEPOLARIZE1(0.0005) 0 1 2 3 4 6 7 8 10 11 12 14 15 30 31 44 45 60 61 74 75 90 91 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0005) 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 28 29 32 34 36 38 40 42 44 45 47 49 51 53 55 57 58 59 62 64 66 68 70 72 74 75 77 79 81 83 85 87 88 89 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +CZ 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 +DEPOLARIZE2(0.005) 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 +DEPOLARIZE1(0.0005) 0 2 4 6 8 10 12 14 15 28 30 44 45 58 60 74 75 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +H 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 +DEPOLARIZE1(0.0005) 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 18 22 26 28 30 31 35 39 43 44 45 48 52 56 58 60 61 65 69 73 74 75 78 82 86 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +M(0.025) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.005) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0005) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.01) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +R 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DETECTOR[{"basis": "X"}](2, 0, 0) rec[-48] +DETECTOR[{"basis": "X"}](2, 4, 0) rec[-37] +DETECTOR[{"basis": "X"}](2, 8, 0) rec[-23] +DETECTOR[{"basis": "X"}](2, 12, 0) rec[-9] +DETECTOR[{"basis": "X"}](4, 2, 0) rec[-44] +DETECTOR[{"basis": "X"}](4, 6, 0) rec[-30] +DETECTOR[{"basis": "X"}](4, 10, 0) rec[-16] +DETECTOR[{"basis": "X"}](4, 14, 0) rec[-3] +DETECTOR[{"basis": "X"}](6, 0, 0) rec[-47] +DETECTOR[{"basis": "X"}](6, 4, 0) rec[-35] +DETECTOR[{"basis": "X"}](6, 8, 0) rec[-21] +DETECTOR[{"basis": "X"}](6, 12, 0) rec[-7] +DETECTOR[{"basis": "X"}](8, 2, 0) rec[-42] +DETECTOR[{"basis": "X"}](8, 6, 0) rec[-28] +DETECTOR[{"basis": "X"}](8, 10, 0) rec[-14] +DETECTOR[{"basis": "X"}](8, 14, 0) rec[-2] +DETECTOR[{"basis": "X"}](10, 0, 0) rec[-46] +DETECTOR[{"basis": "X"}](10, 4, 0) rec[-33] +DETECTOR[{"basis": "X"}](10, 8, 0) rec[-19] +DETECTOR[{"basis": "X"}](10, 12, 0) rec[-5] +DETECTOR[{"basis": "X"}](12, 2, 0) rec[-40] +DETECTOR[{"basis": "X"}](12, 6, 0) rec[-26] +DETECTOR[{"basis": "X"}](12, 10, 0) rec[-12] +DETECTOR[{"basis": "X"}](12, 14, 0) rec[-1] +X_ERROR(0.01) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 +DEPOLARIZE1(0.0005) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +DEPOLARIZE1(0.01) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 +TICK +REPEAT 9 { + H 2 3 6 7 10 11 17 19 20 21 23 24 25 27 28 29 30 32 33 34 36 37 38 40 41 42 47 49 50 51 53 54 55 57 58 59 60 62 63 64 66 67 68 70 71 72 77 79 80 81 83 84 85 87 88 89 90 92 93 94 96 97 98 100 101 102 109 113 117 + DEPOLARIZE1(0.0005) 2 3 6 7 10 11 17 19 20 21 23 24 25 27 28 29 30 32 33 34 36 37 38 40 41 42 47 49 50 51 53 54 55 57 58 59 60 62 63 64 66 67 68 70 71 72 77 79 80 81 83 84 85 87 88 89 90 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 16 18 22 26 31 35 39 43 44 45 46 48 52 56 61 65 69 73 74 75 76 78 82 86 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + CZ 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 + DEPOLARIZE2(0.005) 2 3 6 7 10 11 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 + DEPOLARIZE1(0.0005) 0 1 4 5 8 9 12 13 14 15 16 29 44 45 46 59 74 75 76 89 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + H 1 3 5 7 9 11 13 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 + DEPOLARIZE1(0.0005) 1 3 5 7 9 11 13 18 20 22 24 26 28 31 33 35 37 39 41 43 48 50 52 54 56 58 61 63 65 67 69 71 73 78 80 82 84 86 88 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 16 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 46 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 76 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 + DEPOLARIZE2(0.005) 1 2 3 17 5 6 7 21 9 10 11 25 16 30 18 19 20 34 22 23 24 38 26 27 28 42 31 32 33 47 35 36 37 51 39 40 41 55 46 60 48 49 50 64 52 53 54 68 56 57 58 72 61 62 63 77 65 66 67 81 69 70 71 85 76 90 78 79 80 94 82 83 84 98 86 87 88 102 91 92 95 96 99 100 + DEPOLARIZE1(0.0005) 0 4 8 12 13 14 15 29 43 44 45 59 73 74 75 89 93 97 101 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 + DEPOLARIZE2(0.005) 5 19 9 23 13 27 16 17 18 32 20 21 22 36 24 25 26 40 28 29 33 34 35 49 37 38 39 53 41 42 43 57 46 47 48 62 50 51 52 66 54 55 56 70 58 59 63 64 65 79 67 68 69 83 71 72 73 87 76 77 78 92 80 81 82 96 84 85 86 100 88 89 93 94 95 109 97 98 99 113 101 102 103 117 + DEPOLARIZE1(0.0005) 0 1 2 3 4 6 7 8 10 11 12 14 15 30 31 44 45 60 61 74 75 90 91 104 105 106 107 108 110 111 112 114 115 116 + TICK + H 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 + DEPOLARIZE1(0.0005) 1 3 5 7 9 11 13 16 18 20 22 24 26 30 31 33 35 37 39 41 43 46 48 50 52 54 56 60 61 63 65 67 69 71 73 76 78 80 82 84 86 90 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 28 29 32 34 36 38 40 42 44 45 47 49 51 53 55 57 58 59 62 64 66 68 70 72 74 75 77 79 81 83 85 87 88 89 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 + TICK + CZ 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 + DEPOLARIZE2(0.005) 1 17 3 19 5 21 7 23 9 25 11 27 13 29 16 32 18 34 20 36 22 38 24 40 26 42 31 47 33 49 35 51 37 53 39 55 41 57 43 59 46 62 48 64 50 66 52 68 54 70 56 72 61 77 63 79 65 81 67 83 69 85 71 87 73 89 76 92 78 94 80 96 82 98 84 100 86 102 93 109 97 113 101 117 + DEPOLARIZE1(0.0005) 0 2 4 6 8 10 12 14 15 28 30 44 45 58 60 74 75 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + H 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 + DEPOLARIZE1(0.0005) 2 3 6 7 10 11 16 17 19 20 21 23 24 25 27 29 32 33 34 36 37 38 40 41 42 46 47 49 50 51 53 54 55 57 59 62 63 64 66 67 68 70 71 72 76 77 79 80 81 83 84 85 87 89 92 93 94 96 97 98 100 101 102 109 113 117 0 1 4 5 8 9 12 13 14 15 18 22 26 28 30 31 35 39 43 44 45 48 52 56 58 60 61 65 69 73 74 75 78 82 86 88 90 91 95 99 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + M(0.025) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.005) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.0005) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + DEPOLARIZE1(0.01) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + TICK + R 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + SHIFT_COORDS(0, 0, 1) + DETECTOR[{"basis": "X"}](2, 0, 0) rec[-48] rec[-96] + DETECTOR[{"basis": "X"}](6, 0, 0) rec[-47] rec[-95] + DETECTOR[{"basis": "X"}](10, 0, 0) rec[-46] rec[-94] + DETECTOR[{"basis": "Z"}](2, 2, 0) rec[-45] rec[-93] + DETECTOR[{"basis": "X"}](4, 2, 0) rec[-44] rec[-92] + DETECTOR[{"basis": "Z"}](6, 2, 0) rec[-43] rec[-91] + DETECTOR[{"basis": "X"}](8, 2, 0) rec[-42] rec[-90] + DETECTOR[{"basis": "Z"}](10, 2, 0) rec[-41] rec[-89] + DETECTOR[{"basis": "X"}](12, 2, 0) rec[-40] rec[-88] + DETECTOR[{"basis": "Z"}](14, 2, 0) rec[-39] rec[-87] + DETECTOR[{"basis": "Z"}](0, 4, 0) rec[-38] rec[-86] + DETECTOR[{"basis": "X"}](2, 4, 0) rec[-37] rec[-85] + DETECTOR[{"basis": "Z"}](4, 4, 0) rec[-36] rec[-84] + DETECTOR[{"basis": "X"}](6, 4, 0) rec[-35] rec[-83] + DETECTOR[{"basis": "Z"}](8, 4, 0) rec[-34] rec[-82] + DETECTOR[{"basis": "X"}](10, 4, 0) rec[-33] rec[-81] + DETECTOR[{"basis": "Z"}](12, 4, 0) rec[-32] rec[-80] + DETECTOR[{"basis": "Z"}](2, 6, 0) rec[-31] rec[-79] + DETECTOR[{"basis": "X"}](4, 6, 0) rec[-30] rec[-78] + DETECTOR[{"basis": "Z"}](6, 6, 0) rec[-29] rec[-77] + DETECTOR[{"basis": "X"}](8, 6, 0) rec[-28] rec[-76] + DETECTOR[{"basis": "Z"}](10, 6, 0) rec[-27] rec[-75] + DETECTOR[{"basis": "X"}](12, 6, 0) rec[-26] rec[-74] + DETECTOR[{"basis": "Z"}](14, 6, 0) rec[-25] rec[-73] + DETECTOR[{"basis": "Z"}](0, 8, 0) rec[-24] rec[-72] + DETECTOR[{"basis": "X"}](2, 8, 0) rec[-23] rec[-71] + DETECTOR[{"basis": "Z"}](4, 8, 0) rec[-22] rec[-70] + DETECTOR[{"basis": "X"}](6, 8, 0) rec[-21] rec[-69] + DETECTOR[{"basis": "Z"}](8, 8, 0) rec[-20] rec[-68] + DETECTOR[{"basis": "X"}](10, 8, 0) rec[-19] rec[-67] + DETECTOR[{"basis": "Z"}](12, 8, 0) rec[-18] rec[-66] + DETECTOR[{"basis": "Z"}](2, 10, 0) rec[-17] rec[-65] + DETECTOR[{"basis": "X"}](4, 10, 0) rec[-16] rec[-64] + DETECTOR[{"basis": "Z"}](6, 10, 0) rec[-15] rec[-63] + DETECTOR[{"basis": "X"}](8, 10, 0) rec[-14] rec[-62] + DETECTOR[{"basis": "Z"}](10, 10, 0) rec[-13] rec[-61] + DETECTOR[{"basis": "X"}](12, 10, 0) rec[-12] rec[-60] + DETECTOR[{"basis": "Z"}](14, 10, 0) rec[-11] rec[-59] + DETECTOR[{"basis": "Z"}](0, 12, 0) rec[-10] rec[-58] + DETECTOR[{"basis": "X"}](2, 12, 0) rec[-9] rec[-57] + DETECTOR[{"basis": "Z"}](4, 12, 0) rec[-8] rec[-56] + DETECTOR[{"basis": "X"}](6, 12, 0) rec[-7] rec[-55] + DETECTOR[{"basis": "Z"}](8, 12, 0) rec[-6] rec[-54] + DETECTOR[{"basis": "X"}](10, 12, 0) rec[-5] rec[-53] + DETECTOR[{"basis": "Z"}](12, 12, 0) rec[-4] rec[-52] + DETECTOR[{"basis": "X"}](4, 14, 0) rec[-3] rec[-51] + DETECTOR[{"basis": "X"}](8, 14, 0) rec[-2] rec[-50] + DETECTOR[{"basis": "X"}](12, 14, 0) rec[-1] rec[-49] + X_ERROR(0.01) 2 6 10 17 19 21 23 25 27 29 30 32 34 36 38 40 42 47 49 51 53 55 57 59 60 62 64 66 68 70 72 77 79 81 83 85 87 89 90 92 94 96 98 100 102 109 113 117 + DEPOLARIZE1(0.0005) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + DEPOLARIZE1(0.01) 0 1 3 4 5 7 8 9 11 12 13 14 15 16 18 20 22 24 26 28 31 33 35 37 39 41 43 44 45 46 48 50 52 54 56 58 61 63 65 67 69 71 73 74 75 76 78 80 82 84 86 88 91 93 95 97 99 101 103 104 105 106 107 108 110 111 112 114 115 116 + TICK +} +H 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0005) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +TICK +M(0.025) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DETECTOR[{"basis": "X"}](2, 0, 1) rec[-48] rec[-49] rec[-97] +DETECTOR[{"basis": "X"}](2, 4, 1) rec[-34] rec[-35] rec[-41] rec[-42] rec[-86] +DETECTOR[{"basis": "X"}](2, 8, 1) rec[-20] rec[-21] rec[-27] rec[-28] rec[-72] +DETECTOR[{"basis": "X"}](2, 12, 1) rec[-6] rec[-7] rec[-13] rec[-14] rec[-58] +DETECTOR[{"basis": "X"}](4, 2, 1) rec[-40] rec[-41] rec[-47] rec[-48] rec[-93] +DETECTOR[{"basis": "X"}](4, 6, 1) rec[-26] rec[-27] rec[-33] rec[-34] rec[-79] +DETECTOR[{"basis": "X"}](4, 10, 1) rec[-12] rec[-13] rec[-19] rec[-20] rec[-65] +DETECTOR[{"basis": "X"}](4, 14, 1) rec[-5] rec[-6] rec[-52] +DETECTOR[{"basis": "X"}](6, 0, 1) rec[-46] rec[-47] rec[-96] +DETECTOR[{"basis": "X"}](6, 4, 1) rec[-32] rec[-33] rec[-39] rec[-40] rec[-84] +DETECTOR[{"basis": "X"}](6, 8, 1) rec[-18] rec[-19] rec[-25] rec[-26] rec[-70] +DETECTOR[{"basis": "X"}](6, 12, 1) rec[-4] rec[-5] rec[-11] rec[-12] rec[-56] +DETECTOR[{"basis": "X"}](8, 2, 1) rec[-38] rec[-39] rec[-45] rec[-46] rec[-91] +DETECTOR[{"basis": "X"}](8, 6, 1) rec[-24] rec[-25] rec[-31] rec[-32] rec[-77] +DETECTOR[{"basis": "X"}](8, 10, 1) rec[-10] rec[-11] rec[-17] rec[-18] rec[-63] +DETECTOR[{"basis": "X"}](8, 14, 1) rec[-3] rec[-4] rec[-51] +DETECTOR[{"basis": "X"}](10, 0, 1) rec[-44] rec[-45] rec[-95] +DETECTOR[{"basis": "X"}](10, 4, 1) rec[-30] rec[-31] rec[-37] rec[-38] rec[-82] +DETECTOR[{"basis": "X"}](10, 8, 1) rec[-16] rec[-17] rec[-23] rec[-24] rec[-68] +DETECTOR[{"basis": "X"}](10, 12, 1) rec[-2] rec[-3] rec[-9] rec[-10] rec[-54] +DETECTOR[{"basis": "X"}](12, 2, 1) rec[-36] rec[-37] rec[-43] rec[-44] rec[-89] +DETECTOR[{"basis": "X"}](12, 6, 1) rec[-22] rec[-23] rec[-29] rec[-30] rec[-75] +DETECTOR[{"basis": "X"}](12, 10, 1) rec[-8] rec[-9] rec[-15] rec[-16] rec[-61] +DETECTOR[{"basis": "X"}](12, 14, 1) rec[-1] rec[-2] rec[-50] +OBSERVABLE_INCLUDE[{"basis": "X"}](0) rec[-7] rec[-14] rec[-21] rec[-28] rec[-35] rec[-42] rec[-49] +DEPOLARIZE1(0.005) 1 3 5 7 9 11 13 16 18 20 22 24 26 28 31 33 35 37 39 41 43 46 48 50 52 54 56 58 61 63 65 67 69 71 73 76 78 80 82 84 86 88 91 93 95 97 99 101 103 +DEPOLARIZE1(0.0005) 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117 +DEPOLARIZE1(0.01) 0 2 4 6 8 10 12 14 15 17 19 21 23 25 27 29 30 32 34 36 38 40 42 44 45 47 49 51 53 55 57 59 60 62 64 66 68 70 72 74 75 77 79 81 83 85 87 89 90 92 94 96 98 100 102 104 105 106 107 108 109 110 111 112 113 114 115 116 117