qLDPC 0.4.1__tar.gz → 0.4.2.dev20261023__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/PKG-INFO +86 -80
  2. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/README.md +76 -73
  3. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/pyproject.toml +18 -8
  4. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/pyproject.toml.orig +19 -9
  5. qldpc-0.4.2.dev20261023/src/qldpc/__init__.py +35 -0
  6. qldpc-0.4.2.dev20261023/src/qldpc/_deprecations/__init__.py +31 -0
  7. qldpc-0.4.2.dev20261023/src/qldpc/_deprecations/core.py +499 -0
  8. qldpc-0.4.2.dev20261023/src/qldpc/_deprecations/core_test.py +229 -0
  9. qldpc-0.4.2.dev20261023/src/qldpc/_deprecations/decoders.py +693 -0
  10. qldpc-0.4.2.dev20261023/src/qldpc/_deprecations/decoders_test.py +587 -0
  11. qldpc-0.4.2.dev20261023/src/qldpc/_deprecations/lookup.py +154 -0
  12. qldpc-0.4.2.dev20261023/src/qldpc/_deprecations/lookup_test.py +155 -0
  13. qldpc-0.4.1/src/qldpc/_util.py → qldpc-0.4.2.dev20261023/src/qldpc/_utils.py +38 -96
  14. qldpc-0.4.1/src/qldpc/_util_test.py → qldpc-0.4.2.dev20261023/src/qldpc/_utils_test.py +19 -49
  15. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/__init__.py +13 -23
  16. qldpc-0.4.2.dev20261023/src/qldpc/abstract/_coefficients.py +223 -0
  17. qldpc-0.4.2.dev20261023/src/qldpc/abstract/_coefficients_test.py +104 -0
  18. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/groups.py +269 -418
  19. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/groups_test.py +65 -79
  20. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/linalg.py +47 -39
  21. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/linalg_test.py +2 -2
  22. qldpc-0.4.1/src/qldpc/abstract/_monomials_test.py → qldpc-0.4.2.dev20261023/src/qldpc/abstract/monomials_test.py +1 -1
  23. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/ring_array.py +77 -259
  24. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/ring_array_test.py +18 -95
  25. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/rings.py +26 -41
  26. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/rings_test.py +15 -50
  27. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/wedderburn_artin.py +130 -128
  28. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/cache.py +60 -57
  29. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/cache_test.py +6 -6
  30. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/__init__.py +13 -4
  31. qldpc-0.4.2.dev20261023/src/qldpc/circuits/benchmarking/__init__.py +16 -0
  32. qldpc-0.4.2.dev20261023/src/qldpc/circuits/benchmarking/logical_errors.py +260 -0
  33. qldpc-0.4.2.dev20261023/src/qldpc/circuits/benchmarking/logical_errors_test.py +133 -0
  34. qldpc-0.4.1/src/qldpc/circuits/benchmarking.py → qldpc-0.4.2.dev20261023/src/qldpc/circuits/benchmarking/state_prep_diagnostics.py +79 -194
  35. qldpc-0.4.2.dev20261023/src/qldpc/circuits/benchmarking/state_prep_diagnostics_test.py +149 -0
  36. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/bookkeeping.py +2 -2
  37. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/common.py +29 -20
  38. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/common_test.py +16 -13
  39. qldpc-0.4.2.dev20261023/src/qldpc/circuits/conftest.py +62 -0
  40. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/encoding.py +74 -30
  41. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/encoding_test.py +38 -22
  42. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/memory/__init__.py +11 -2
  43. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/memory/alpha_syndrome.py +50 -41
  44. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/memory/alpha_syndrome_test.py +75 -37
  45. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/memory/memory.py +158 -151
  46. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/memory/memory_test.py +18 -3
  47. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/memory/syndrome_measurement.py +56 -55
  48. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/memory/syndrome_measurement_test.py +12 -11
  49. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/__init__.py +172 -0
  50. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/_moments.py +316 -0
  51. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/_moments_test.py +163 -0
  52. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/_operations.py +208 -0
  53. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/_operations_test.py +81 -0
  54. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/channels.py +476 -0
  55. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/channels_test.py +223 -0
  56. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/noise_model.py +810 -0
  57. {qldpc-0.4.1/src/qldpc/circuits → qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model}/noise_model_test.py +170 -586
  58. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/rules.py +413 -0
  59. qldpc-0.4.2.dev20261023/src/qldpc/circuits/noise_model/rules_test.py +255 -0
  60. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/transversal.py +31 -18
  61. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/transversal_test.py +7 -9
  62. qldpc-0.4.2.dev20261023/src/qldpc/code_style_test.py +47 -0
  63. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/__init__.py +23 -6
  64. qldpc-0.4.1/src/qldpc/codes/code_capacity.py → qldpc-0.4.2.dev20261023/src/qldpc/codes/_code_capacity.py +251 -176
  65. qldpc-0.4.1/src/qldpc/codes/code_capacity_test.py → qldpc-0.4.2.dev20261023/src/qldpc/codes/_code_capacity_test.py +307 -117
  66. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/classical.py +28 -25
  67. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/classical_test.py +48 -36
  68. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/common.py +776 -767
  69. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/common_test.py +499 -226
  70. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/__init__.py +36 -0
  71. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_binary.py +322 -0
  72. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_binary_test.py +239 -0
  73. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_brouwer_zimmermann.py +512 -0
  74. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_brouwer_zimmermann_test.py +484 -0
  75. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_brute_force.py +123 -0
  76. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_brute_force_test.py +165 -0
  77. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_information_sets.py +361 -0
  78. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_information_sets_test.py +174 -0
  79. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_macwilliams.py +247 -0
  80. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/_macwilliams_test.py +45 -0
  81. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/brouwer_zimmermann.md +632 -0
  82. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/conftest.py +48 -0
  83. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/core.py +221 -0
  84. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/core_test.py +196 -0
  85. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/logical_counts.py +1062 -0
  86. qldpc-0.4.2.dev20261023/src/qldpc/codes/distance/logical_counts_test.py +660 -0
  87. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/monte_carlo.py +145 -76
  88. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/monte_carlo_test.py +38 -27
  89. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/quantum.py +190 -162
  90. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/codes/quantum_test.py +85 -176
  91. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/conftest.py +57 -1
  92. qldpc-0.4.2.dev20261023/src/qldpc/decoders/__init__.py +118 -0
  93. qldpc-0.4.1/src/qldpc/decoders/capabilities.py → qldpc-0.4.2.dev20261023/src/qldpc/decoders/_capabilities.py +21 -33
  94. qldpc-0.4.2.dev20261023/src/qldpc/decoders/_capabilities_test.py +95 -0
  95. qldpc-0.4.2.dev20261023/src/qldpc/decoders/adapters/__init__.py +18 -0
  96. qldpc-0.4.2.dev20261023/src/qldpc/decoders/adapters/_observable_decoders.py +111 -0
  97. qldpc-0.4.1/src/qldpc/decoders/adapters/observable_decoders_test.py → qldpc-0.4.2.dev20261023/src/qldpc/decoders/adapters/_observable_decoders_test.py +27 -52
  98. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/adapters/error_decoders.py +87 -35
  99. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/adapters/error_decoders_test.py +49 -17
  100. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/common.py +36 -59
  101. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/common_test.py +20 -58
  102. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/conftest.py +11 -8
  103. qldpc-0.4.2.dev20261023/src/qldpc/decoders/construction/__init__.py +11 -0
  104. qldpc-0.4.2.dev20261023/src/qldpc/decoders/construction/_resolution.py +138 -0
  105. qldpc-0.4.2.dev20261023/src/qldpc/decoders/construction/_resolution_test.py +399 -0
  106. qldpc-0.4.2.dev20261023/src/qldpc/decoders/construction/factories.py +60 -0
  107. qldpc-0.4.2.dev20261023/src/qldpc/decoders/construction/factories_test.py +87 -0
  108. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/construction/specs.py +97 -167
  109. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/construction/specs_test.py +109 -200
  110. qldpc-0.4.2.dev20261023/src/qldpc/decoders/custom/__init__.py +37 -0
  111. qldpc-0.4.2.dev20261023/src/qldpc/decoders/custom/_lookup_enumeration.py +238 -0
  112. qldpc-0.4.2.dev20261023/src/qldpc/decoders/custom/_lookup_enumeration_test.py +169 -0
  113. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/custom/composition.py +41 -36
  114. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/custom/composition_test.py +20 -17
  115. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/custom/guf.py +42 -52
  116. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/custom/guf_test.py +11 -11
  117. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/custom/ilp.py +103 -72
  118. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/custom/ilp_test.py +39 -20
  119. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/custom/lookup.py +302 -504
  120. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/custom/lookup_test.py +128 -143
  121. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/dems.py +73 -69
  122. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/dems_test.py +15 -9
  123. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/frontier.py +71 -48
  124. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/frontier_test.py +105 -79
  125. qldpc-0.4.2.dev20261023/src/qldpc/decoders/external/ldpc.py +397 -0
  126. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/ldpc_test.py +73 -27
  127. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/pymatching.py +168 -103
  128. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/pymatching_test.py +63 -16
  129. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/relay_bp.py +262 -184
  130. qldpc-0.4.2.dev20261023/src/qldpc/decoders/external/relay_bp_test.py +257 -0
  131. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/tesseract.py +187 -137
  132. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/tesseract_test.py +98 -95
  133. qldpc-0.4.2.dev20261023/src/qldpc/decoders/legacy_api_test.py +235 -0
  134. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/protocols.py +115 -36
  135. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/protocols_test.py +42 -29
  136. qldpc-0.4.2.dev20261023/src/qldpc/decoders/sinter/__init__.py +37 -0
  137. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/sinter/core.py +34 -92
  138. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/sinter/core_test.py +60 -40
  139. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/sinter/subgraph.py +13 -12
  140. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/sinter/subgraph_test.py +2 -3
  141. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/sinter/window.py +47 -48
  142. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/sinter/window_test.py +31 -5
  143. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/__init__.py +4 -2
  144. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/__init__.py +3 -1
  145. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/_compiler.py +111 -132
  146. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/_compiler_test.py +51 -142
  147. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/bridge.py +167 -172
  148. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/bridge_test.py +80 -291
  149. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/cheeger.py +139 -143
  150. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/cheeger_test.py +92 -177
  151. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/circuit.py +261 -340
  152. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/circuit_test.py +258 -1108
  153. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/conftest.py +6 -18
  154. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/construction.py +20 -18
  155. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/construction_test.py +2 -0
  156. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/experimental/surgery/gadget.py +117 -150
  157. qldpc-0.4.2.dev20261023/src/qldpc/experimental/surgery/gadget_test.py +442 -0
  158. qldpc-0.4.2.dev20261023/src/qldpc/external/__init__.py +16 -0
  159. qldpc-0.4.1/src/qldpc/external/codes.py → qldpc-0.4.2.dev20261023/src/qldpc/external/_codes.py +121 -83
  160. qldpc-0.4.1/src/qldpc/external/codes_test.py → qldpc-0.4.2.dev20261023/src/qldpc/external/_codes_test.py +44 -30
  161. qldpc-0.4.1/src/qldpc/external/groups.py → qldpc-0.4.2.dev20261023/src/qldpc/external/_groups.py +155 -111
  162. qldpc-0.4.1/src/qldpc/external/groups_test.py → qldpc-0.4.2.dev20261023/src/qldpc/external/_groups_test.py +133 -79
  163. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/external/gap.py +203 -179
  164. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/external/gap_test.py +67 -48
  165. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/external/sqetch.py +49 -41
  166. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/external/sqetch_test.py +1 -10
  167. qldpc-0.4.2.dev20261023/src/qldpc/import_test.py +14 -0
  168. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/math.py +101 -75
  169. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/math_test.py +39 -29
  170. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/objects.py +139 -28
  171. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/objects_test.py +51 -2
  172. qldpc-0.4.1/src/qldpc/__init__.py +0 -20
  173. qldpc-0.4.1/src/qldpc/circuits/benchmarking_test.py +0 -219
  174. qldpc-0.4.1/src/qldpc/circuits/conftest.py +0 -35
  175. qldpc-0.4.1/src/qldpc/circuits/noise_model.py +0 -2068
  176. qldpc-0.4.1/src/qldpc/codes/distance.py +0 -1099
  177. qldpc-0.4.1/src/qldpc/codes/distance_test.py +0 -1058
  178. qldpc-0.4.1/src/qldpc/decoders/__init__.py +0 -230
  179. qldpc-0.4.1/src/qldpc/decoders/adapters/__init__.py +0 -28
  180. qldpc-0.4.1/src/qldpc/decoders/adapters/observable_decoders.py +0 -130
  181. qldpc-0.4.1/src/qldpc/decoders/capabilities_test.py +0 -113
  182. qldpc-0.4.1/src/qldpc/decoders/construction/__init__.py +0 -3
  183. qldpc-0.4.1/src/qldpc/decoders/construction/legacy.py +0 -510
  184. qldpc-0.4.1/src/qldpc/decoders/construction/legacy_test.py +0 -383
  185. qldpc-0.4.1/src/qldpc/decoders/construction/resolution.py +0 -118
  186. qldpc-0.4.1/src/qldpc/decoders/construction/resolution_test.py +0 -452
  187. qldpc-0.4.1/src/qldpc/decoders/custom/__init__.py +0 -48
  188. qldpc-0.4.1/src/qldpc/decoders/custom_test.py +0 -20
  189. qldpc-0.4.1/src/qldpc/decoders/external/ldpc.py +0 -400
  190. qldpc-0.4.1/src/qldpc/decoders/external/relay_bp_test.py +0 -188
  191. qldpc-0.4.1/src/qldpc/decoders/sinter/__init__.py +0 -56
  192. qldpc-0.4.1/src/qldpc/decoders/sinter_test.py +0 -21
  193. qldpc-0.4.1/src/qldpc/decoders_test.py +0 -40
  194. qldpc-0.4.1/src/qldpc/experimental/surgery/gadget_test.py +0 -737
  195. qldpc-0.4.1/src/qldpc/external/__init__.py +0 -5
  196. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/COPYRIGHT +0 -0
  197. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/LICENSE +0 -0
  198. /qldpc-0.4.1/src/qldpc/abstract/_monomials.py → /qldpc-0.4.2.dev20261023/src/qldpc/abstract/monomials.py +0 -0
  199. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/abstract/wedderburn_artin_test.py +0 -0
  200. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/circuits/bookkeeping_test.py +0 -0
  201. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/decoders/external/__init__.py +0 -0
  202. {qldpc-0.4.1 → qldpc-0.4.2.dev20261023}/src/qldpc/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qldpc
3
- Version: 0.4.1
3
+ Version: 0.4.2.dev20261023
4
4
  Summary: Tools for constructing and analyzing quantum low density parity check (qLDPC) codes.
5
5
  Keywords: LDPC,low density parity check codes,quantum computing,quantum error correction
6
6
  Author: Michael A. Perlin
@@ -18,20 +18,21 @@ Classifier: Programming Language :: Python :: 3.13
18
18
  Classifier: Programming Language :: Python :: 3.14
19
19
  Classifier: Topic :: Scientific/Engineering :: Mathematics
20
20
  Classifier: Topic :: Scientific/Engineering :: Physics
21
- Requires-Dist: cvxpy>=1.3.2
22
21
  Requires-Dist: diskcache>=5
23
- Requires-Dist: galois>=0.4.2
22
+ Requires-Dist: galois>=0.4.11
24
23
  Requires-Dist: ldpc>=2.4.1
25
- Requires-Dist: networkx>=2.6.2
26
- Requires-Dist: numpy>=1.24
24
+ Requires-Dist: networkx>=2.7
25
+ Requires-Dist: numba>=0.61.2
26
+ Requires-Dist: numpy>=2.1
27
27
  Requires-Dist: platformdirs>=4
28
28
  Requires-Dist: pymatching>=2.3
29
29
  Requires-Dist: pyperclip>=1.11
30
- Requires-Dist: scipy>=1.14.1
30
+ Requires-Dist: scipy>=1.16
31
31
  Requires-Dist: sinter>=1.16
32
32
  Requires-Dist: stim>=1.16
33
- Requires-Dist: sympy>=1.12
33
+ Requires-Dist: sympy>=1.12.1
34
34
  Requires-Dist: tqdm>=4
35
+ Requires-Dist: qldpc[ilp] ; extra == 'decoders'
35
36
  Requires-Dist: qldpc[relay-bp] ; extra == 'decoders'
36
37
  Requires-Dist: qldpc[tesseract] ; (python_full_version < '3.15' and platform_machine == 'arm64' and sys_platform == 'darwin' and extra == 'decoders') or (python_full_version < '3.15' and platform_machine == 'x86_64' and sys_platform == 'linux' and extra == 'decoders')
37
38
  Requires-Dist: checks-superstaq>=0.5.67 ; extra == 'dev'
@@ -49,6 +50,7 @@ Requires-Dist: sphinx>=7 ; extra == 'docs'
49
50
  Requires-Dist: sphinx-autoapi>=3 ; extra == 'docs'
50
51
  Requires-Dist: sphinx-rtd-theme>=2 ; extra == 'docs'
51
52
  Requires-Dist: passagemath-gap==10.8.12 ; python_full_version == '3.13.*' and sys_platform != 'win32' and extra == 'gap'
53
+ Requires-Dist: cvxpy>=1.5.3 ; extra == 'ilp'
52
54
  Requires-Dist: relay-bp[stim]==0.2.2 ; extra == 'relay-bp'
53
55
  Requires-Dist: tesseract-decoder==0.1.1.dev20260910235247 ; python_full_version >= '3.12' and extra == 'tesseract'
54
56
  Requires-Python: >=3.11
@@ -59,6 +61,7 @@ Provides-Extra: decoders
59
61
  Provides-Extra: dev
60
62
  Provides-Extra: docs
61
63
  Provides-Extra: gap
64
+ Provides-Extra: ilp
62
65
  Provides-Extra: relay-bp
63
66
  Provides-Extra: tesseract
64
67
  Description-Content-Type: text/markdown
@@ -66,30 +69,73 @@ Description-Content-Type: text/markdown
66
69
  # qLDPC
67
70
 
68
71
  `qLDPC` is a Python toolkit for constructing and analyzing finite-size [quantum low-density parity-check codes](https://errorcorrectionzoo.org/c/qldpc), as well as stabilizer and subsystem codes more broadly.
69
- The goal is simple: make the quantum error-correction literature easier to explore, reproduce, and build on.
70
- Codes can start from parity-check matrices or from higher-level ingredients such as polynomials, group rings, Tanner graphs, and chain complexes.
71
- Once a code is built, you can inspect its logical operators, compute or bound its distance, plug in a decoder, estimate logical error rates, and—for qubit codes—build [`stim`](https://github.com/quantumlib/Stim) circuits.
72
+ It aims to make constructions and algorithms from the quantum error-correction literature easier to explore, reproduce, and build on.
73
+ You can define codes using parity-check matrices or higher-level ingredients such as polynomials, group rings, Tanner graphs, and chain complexes.
74
+ From there, you can inspect logical operators, compute or bound code distance, choose a decoder, estimate logical error rates, and—for qubit codes—build [`stim`](https://github.com/quantumlib/Stim) circuits.
72
75
 
73
76
  Most code-level tools work over arbitrary finite fields.
74
77
  Circuit tools currently only support qubit codes.
75
78
 
76
- ## ✨ A taste of qLDPC
77
-
78
- - **From textbook codes to the research frontier.**
79
- Build familiar surface, toric, Hamming, and Reed–Muller codes alongside hypergraph-product, lifted-product, bivariate-bicycle, quantum Tanner, SHYPS, GALA, and other modern families.
80
- - **Go beyond binary.**
81
- Many constructions and core algorithms work over arbitrary prime-power finite fields, not just qubits.
82
- - **Ask more of a code than `[[n, k, d]]`.**
83
- Work with check matrices, Tanner graphs, canonical logical operators, subsystem gauges, exact distances, upper bounds, and code-capacity error estimates.
84
- - **Move from codes to circuits.**
85
- Build memory experiments, encoding circuits, Pauli noise models, state-preparation diagnostics, Sinter decoders, sliding-window decoders, and transversal Clifford searches.
86
- - **Use the algebra that modern constructions need.**
87
- qLDPC includes finite groups, group rings, lifted matrices, Cayley complexes, chain complexes, and optional GAP integration.
88
- - **Steal from the examples.**
89
- The notebooks progress from the basics to circuit-level logical error rates, custom noise, transversal gates, and experimental lattice surgery.
90
-
91
- qLDPC is still research software, and it is honest about the tradeoffs.
92
- Some searches are expensive, some bounds are heuristic, experimental APIs can change, and optional tools may have side effects.
79
+ ## ✨ A few things to try
80
+
81
+ - **Code families.**
82
+ Construct surface, toric, Hamming, and Reed–Muller codes, along with hypergraph-product, lifted-product, bivariate-bicycle, quantum Tanner, SHYPS, GALA, and other families.
83
+ - **Distance calculations.**
84
+ Compute exact distances of binary codes with an [optimized Brouwer–Zimmermann search](src/qldpc/codes/distance/brouwer_zimmermann.md), or bound code distance using [QDistRnd](https://arxiv.org/abs/2308.15140) or [`sqetch`](https://github.com/a7b/yarn/tree/main/sqetch).
85
+ - **Code structure and analysis.**
86
+ Work with check matrices, Tanner graphs, canonical logical operators, subsystem gauge operators, and code-capacity error estimates.
87
+ - **Circuits and decoding workflows.**
88
+ Build memory experiments, encoding circuits, Pauli noise models, and state-preparation diagnostics; use Sinter and sliding-window decoders, or search for transversal Clifford gates.
89
+ - **Algebraic tools.**
90
+ Work with finite groups, group rings, lifted matrices, Cayley complexes, chain complexes, and optional GAP integration.
91
+
92
+ The [example notebooks](https://qldpc.readthedocs.io/examples/index.html) cover (among other things) code construction, custom noise models, and circuit-level logical error rates.
93
+
94
+ ## 🚀 Quickstart
95
+
96
+ ```python
97
+ from sympy.abc import x, y
98
+
99
+ from qldpc import codes
100
+
101
+ # The [[144, 12, 12]] bivariate bicycle "gross code".
102
+ code = codes.BBCode({x: 12, y: 6}, x**3 + y + y**2, y**3 + x + x**2)
103
+
104
+ print(code)
105
+ print("physical qubits:", len(code))
106
+ print("logical qubits:", code.dimension)
107
+ ```
108
+
109
+ The gross code is also available as the named construction, `codes.GrossCode()`.
110
+
111
+ ### A subsystem lifted-product code
112
+
113
+ This example builds a parity-check matrix over the group algebra `GF(2)[C₅]`, lifts each group-ring entry to a 5×5 binary block, and passes the result to `SLPCode`.
114
+ The [subsystem lifted-product construction](https://arxiv.org/abs/2404.18302) produces an 80-qubit CSS subsystem code with 5 logical qubits and 45 gauge qubits.
115
+
116
+ ```python
117
+ from qldpc import abstract, codes
118
+
119
+ group = abstract.CyclicGroup(5)
120
+ ring = abstract.GroupRing(group)
121
+ x = ring.generators[0]
122
+
123
+ repetition = abstract.RingArray.build(
124
+ [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]],
125
+ ring,
126
+ )
127
+ connections = abstract.RingArray.build(
128
+ [[0, x, 0, 0], [0, 0, x, 0], [0, 0, 0, x]],
129
+ ring,
130
+ )
131
+ code = codes.SLPCode(repetition + connections)
132
+
133
+ print("physical qubits:", len(code)) # 80
134
+ print("logical qubits:", code.dimension) # 5
135
+ print("gauge qubits:", code.gauge_dimension) # 45
136
+ ```
137
+
138
+ The [library map](https://qldpc.readthedocs.io/library_map.html) explains the data model and package structure.
93
139
 
94
140
  ## 📦 Installation
95
141
 
@@ -105,8 +151,8 @@ python -m pip install qldpc
105
151
 
106
152
  #### Decoders
107
153
 
108
- qLDPC installs `ldpc` and `pymatching` by default, which include a host of decoders.
109
- You can install every decoder available in `qldpc` for your platform with:
154
+ qLDPC installs `ldpc` and `pymatching` by default, which provide several decoding algorithms.
155
+ Install the optional decoder integrations published as qLDPC extras for your platform with:
110
156
 
111
157
  ```bash
112
158
  python -m pip install 'qldpc[decoders]'
@@ -115,11 +161,13 @@ python -m pip install 'qldpc[decoders]'
115
161
  You can also use individual extras to install a specific optional decoder:
116
162
 
117
163
  ```bash
164
+ python -m pip install 'qldpc[ilp]'
118
165
  python -m pip install 'qldpc[relay-bp]'
119
166
  python -m pip install 'qldpc[tesseract]'
120
167
  ```
121
168
 
122
169
  The [Tesseract](https://github.com/quantumlib/tesseract-decoder) decoder requires CPython 3.12–3.14 on macOS arm64 or Linux x86-64.
170
+ [Frontier](https://github.com/aleverrier/frontier) is not published on PyPI and is not included in an extra; see the [decoder guide](https://qldpc.readthedocs.io/decoders.html) for availability and build-time installation guidance.
123
171
 
124
172
  #### GAP integration
125
173
 
@@ -149,7 +197,7 @@ For binary CSS codes, you can select this backend with `code.get_distance_bound(
149
197
 
150
198
  ### Troubleshooting
151
199
 
152
- On macOS, you may need to install `cvxpy` manually by following its [installation instructions](https://www.cvxpy.org/install) before installing qLDPC.
200
+ On macOS, you may need to install `cvxpy`, which the ILP decoder requires, manually by following its [installation instructions](https://www.cvxpy.org/install) before installing `qldpc[ilp]` or `qldpc[decoders]`.
153
201
  If you use Conda to manage your Python environment, install `cvxpy` with:
154
202
 
155
203
  ```bash
@@ -166,50 +214,6 @@ cd qLDPC
166
214
  python -m pip install -e '.[dev]'
167
215
  ```
168
216
 
169
- ## 🚀 Quickstart
170
-
171
- ```python
172
- from sympy.abc import x, y
173
-
174
- from qldpc import codes
175
-
176
- # The [[144, 12, 12]] bivariate bicycle "gross code".
177
- code = codes.BBCode({x: 12, y: 6}, x**3 + y + y**2, y**3 + x + x**2)
178
-
179
- print(code)
180
- print("physical qubits:", len(code))
181
- print("logical qubits:", code.dimension)
182
- ```
183
-
184
- ### Go deeper: a subsystem lifted-product code
185
-
186
- The next example builds a parity-check matrix over the group algebra `GF(2)[C₅]`, lifts each group-ring entry to a 5×5 binary block, and hands the result to `SLPCode`.
187
- The [subsystem lifted-product construction](https://arxiv.org/abs/2404.18302) produces an 80-qubit CSS subsystem code with 5 logical qubits and 45 gauge qubits.
188
-
189
- ```python
190
- from qldpc import abstract, codes
191
-
192
- group = abstract.CyclicGroup(5)
193
- ring = abstract.GroupRing(group)
194
- x = ring.generators[0]
195
-
196
- repetition = abstract.RingArray.build(
197
- [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]],
198
- ring,
199
- )
200
- connections = abstract.RingArray.build(
201
- [[0, x, 0, 0], [0, 0, x, 0], [0, 0, 0, x]],
202
- ring,
203
- )
204
- code = codes.SLPCode(repetition + connections)
205
-
206
- print("physical qubits:", len(code)) # 80
207
- print("logical qubits:", code.dimension) # 5
208
- print("gauge qubits:", code.gauge_dimension) # 45
209
- ```
210
-
211
- Continue with the [library map](https://qldpc.readthedocs.io/library_map.html) for the data model and package structure, or open the [example notebooks](https://qldpc.readthedocs.io/examples/index.html) for complete workflows.
212
-
213
217
  ## 🧭 Find your way around
214
218
 
215
219
  | Goal | Start here |
@@ -217,24 +221,26 @@ Continue with the [library map](https://qldpc.readthedocs.io/library_map.html) f
217
221
  | Understand code representations and how packages fit together | [Library map](https://qldpc.readthedocs.io/library_map.html) |
218
222
  | Learn by running complete workflows | [Examples](https://qldpc.readthedocs.io/examples/index.html) |
219
223
  | Browse code families, functions, and exact signatures | [API reference](https://qldpc.readthedocs.io/autoapi/index.html) |
220
- | Construct and analyze a first code | [qLDPC basics](https://qldpc.readthedocs.io/examples/basics.html) |
224
+ | Construct and analyze a code | [qLDPC basics](https://qldpc.readthedocs.io/examples/basics.html) |
221
225
  | Estimate logical error rates | [Logical-error-rate examples](https://qldpc.readthedocs.io/examples/index.html#logical-error-rates) |
222
226
  | Build memory circuits or noise models | [Circuit examples](https://qldpc.readthedocs.io/examples/index.html) |
223
227
  | Change or extend qLDPC safely | [Agent and contributor guide](https://github.com/qLDPCOrg/qLDPC/blob/main/AGENTS.md) |
224
228
 
225
- For the complete list of classes and functions, including construction-specific literature, use the API reference and source docstrings.
226
- This README focuses on getting started and finding the right documentation.
227
-
228
229
  ## ⚠️ Limitations and caveats
229
230
 
231
+ qLDPC is research software.
232
+ Some searches are expensive, some bounds are heuristic, experimental APIs can change, and optional tools may have side effects.
233
+
230
234
  - Circuit and tableau tools only work with qubit codes, even though other parts of qLDPC support prime-power-dimensional qudits.
231
235
  - Circuits returned by `get_encoding_circuit` are not fault-tolerant.
232
236
  Fault-tolerant encoding is tracked in [issue #327](https://github.com/qLDPCOrg/qLDPC/issues/327).
233
237
  - Exact distance calculations and transversal-gate searches can be exponential.
234
238
  When a method returns a bound rather than an exact distance, its docstring explains what kind of bound it is.
235
- - Features that use GAP may start subprocesses, use local disk caches, access online resources, or ask for manual input or permission to install a package.
239
+ - Features that use GAP may start subprocesses, access online resources, or ask for manual input or permission to install a package.
240
+ - Code lookups such as `QuditCode.from_qecdb_id` access online resources and cache results on disk; pass `refresh=True` to fetch the latest data.
236
241
  - Everything under `qldpc.experimental` has an unstable public API and may change without deprecation.
237
- In particular, lattice-surgery support has not yet received independent expert review; validate its results independently and pin the qLDPC version if you depend on it.
242
+ - Lattice-surgery support in `qldpc.experimental.surgery` is experimental and unstable, and its implementation is still pending careful expert review.
243
+ Validate its results independently, and pin the qLDPC version if you depend on it.
238
244
 
239
245
  ## 📚 Documentation and support
240
246
 
@@ -1,30 +1,73 @@
1
1
  # qLDPC
2
2
 
3
3
  `qLDPC` is a Python toolkit for constructing and analyzing finite-size [quantum low-density parity-check codes](https://errorcorrectionzoo.org/c/qldpc), as well as stabilizer and subsystem codes more broadly.
4
- The goal is simple: make the quantum error-correction literature easier to explore, reproduce, and build on.
5
- Codes can start from parity-check matrices or from higher-level ingredients such as polynomials, group rings, Tanner graphs, and chain complexes.
6
- Once a code is built, you can inspect its logical operators, compute or bound its distance, plug in a decoder, estimate logical error rates, and—for qubit codes—build [`stim`](https://github.com/quantumlib/Stim) circuits.
4
+ It aims to make constructions and algorithms from the quantum error-correction literature easier to explore, reproduce, and build on.
5
+ You can define codes using parity-check matrices or higher-level ingredients such as polynomials, group rings, Tanner graphs, and chain complexes.
6
+ From there, you can inspect logical operators, compute or bound code distance, choose a decoder, estimate logical error rates, and—for qubit codes—build [`stim`](https://github.com/quantumlib/Stim) circuits.
7
7
 
8
8
  Most code-level tools work over arbitrary finite fields.
9
9
  Circuit tools currently only support qubit codes.
10
10
 
11
- ## ✨ A taste of qLDPC
12
-
13
- - **From textbook codes to the research frontier.**
14
- Build familiar surface, toric, Hamming, and Reed–Muller codes alongside hypergraph-product, lifted-product, bivariate-bicycle, quantum Tanner, SHYPS, GALA, and other modern families.
15
- - **Go beyond binary.**
16
- Many constructions and core algorithms work over arbitrary prime-power finite fields, not just qubits.
17
- - **Ask more of a code than `[[n, k, d]]`.**
18
- Work with check matrices, Tanner graphs, canonical logical operators, subsystem gauges, exact distances, upper bounds, and code-capacity error estimates.
19
- - **Move from codes to circuits.**
20
- Build memory experiments, encoding circuits, Pauli noise models, state-preparation diagnostics, Sinter decoders, sliding-window decoders, and transversal Clifford searches.
21
- - **Use the algebra that modern constructions need.**
22
- qLDPC includes finite groups, group rings, lifted matrices, Cayley complexes, chain complexes, and optional GAP integration.
23
- - **Steal from the examples.**
24
- The notebooks progress from the basics to circuit-level logical error rates, custom noise, transversal gates, and experimental lattice surgery.
25
-
26
- qLDPC is still research software, and it is honest about the tradeoffs.
27
- Some searches are expensive, some bounds are heuristic, experimental APIs can change, and optional tools may have side effects.
11
+ ## ✨ A few things to try
12
+
13
+ - **Code families.**
14
+ Construct surface, toric, Hamming, and Reed–Muller codes, along with hypergraph-product, lifted-product, bivariate-bicycle, quantum Tanner, SHYPS, GALA, and other families.
15
+ - **Distance calculations.**
16
+ Compute exact distances of binary codes with an [optimized Brouwer–Zimmermann search](src/qldpc/codes/distance/brouwer_zimmermann.md), or bound code distance using [QDistRnd](https://arxiv.org/abs/2308.15140) or [`sqetch`](https://github.com/a7b/yarn/tree/main/sqetch).
17
+ - **Code structure and analysis.**
18
+ Work with check matrices, Tanner graphs, canonical logical operators, subsystem gauge operators, and code-capacity error estimates.
19
+ - **Circuits and decoding workflows.**
20
+ Build memory experiments, encoding circuits, Pauli noise models, and state-preparation diagnostics; use Sinter and sliding-window decoders, or search for transversal Clifford gates.
21
+ - **Algebraic tools.**
22
+ Work with finite groups, group rings, lifted matrices, Cayley complexes, chain complexes, and optional GAP integration.
23
+
24
+ The [example notebooks](https://qldpc.readthedocs.io/examples/index.html) cover (among other things) code construction, custom noise models, and circuit-level logical error rates.
25
+
26
+ ## 🚀 Quickstart
27
+
28
+ ```python
29
+ from sympy.abc import x, y
30
+
31
+ from qldpc import codes
32
+
33
+ # The [[144, 12, 12]] bivariate bicycle "gross code".
34
+ code = codes.BBCode({x: 12, y: 6}, x**3 + y + y**2, y**3 + x + x**2)
35
+
36
+ print(code)
37
+ print("physical qubits:", len(code))
38
+ print("logical qubits:", code.dimension)
39
+ ```
40
+
41
+ The gross code is also available as the named construction, `codes.GrossCode()`.
42
+
43
+ ### A subsystem lifted-product code
44
+
45
+ This example builds a parity-check matrix over the group algebra `GF(2)[C₅]`, lifts each group-ring entry to a 5×5 binary block, and passes the result to `SLPCode`.
46
+ The [subsystem lifted-product construction](https://arxiv.org/abs/2404.18302) produces an 80-qubit CSS subsystem code with 5 logical qubits and 45 gauge qubits.
47
+
48
+ ```python
49
+ from qldpc import abstract, codes
50
+
51
+ group = abstract.CyclicGroup(5)
52
+ ring = abstract.GroupRing(group)
53
+ x = ring.generators[0]
54
+
55
+ repetition = abstract.RingArray.build(
56
+ [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]],
57
+ ring,
58
+ )
59
+ connections = abstract.RingArray.build(
60
+ [[0, x, 0, 0], [0, 0, x, 0], [0, 0, 0, x]],
61
+ ring,
62
+ )
63
+ code = codes.SLPCode(repetition + connections)
64
+
65
+ print("physical qubits:", len(code)) # 80
66
+ print("logical qubits:", code.dimension) # 5
67
+ print("gauge qubits:", code.gauge_dimension) # 45
68
+ ```
69
+
70
+ The [library map](https://qldpc.readthedocs.io/library_map.html) explains the data model and package structure.
28
71
 
29
72
  ## 📦 Installation
30
73
 
@@ -40,8 +83,8 @@ python -m pip install qldpc
40
83
 
41
84
  #### Decoders
42
85
 
43
- qLDPC installs `ldpc` and `pymatching` by default, which include a host of decoders.
44
- You can install every decoder available in `qldpc` for your platform with:
86
+ qLDPC installs `ldpc` and `pymatching` by default, which provide several decoding algorithms.
87
+ Install the optional decoder integrations published as qLDPC extras for your platform with:
45
88
 
46
89
  ```bash
47
90
  python -m pip install 'qldpc[decoders]'
@@ -50,11 +93,13 @@ python -m pip install 'qldpc[decoders]'
50
93
  You can also use individual extras to install a specific optional decoder:
51
94
 
52
95
  ```bash
96
+ python -m pip install 'qldpc[ilp]'
53
97
  python -m pip install 'qldpc[relay-bp]'
54
98
  python -m pip install 'qldpc[tesseract]'
55
99
  ```
56
100
 
57
101
  The [Tesseract](https://github.com/quantumlib/tesseract-decoder) decoder requires CPython 3.12–3.14 on macOS arm64 or Linux x86-64.
102
+ [Frontier](https://github.com/aleverrier/frontier) is not published on PyPI and is not included in an extra; see the [decoder guide](https://qldpc.readthedocs.io/decoders.html) for availability and build-time installation guidance.
58
103
 
59
104
  #### GAP integration
60
105
 
@@ -84,7 +129,7 @@ For binary CSS codes, you can select this backend with `code.get_distance_bound(
84
129
 
85
130
  ### Troubleshooting
86
131
 
87
- On macOS, you may need to install `cvxpy` manually by following its [installation instructions](https://www.cvxpy.org/install) before installing qLDPC.
132
+ On macOS, you may need to install `cvxpy`, which the ILP decoder requires, manually by following its [installation instructions](https://www.cvxpy.org/install) before installing `qldpc[ilp]` or `qldpc[decoders]`.
88
133
  If you use Conda to manage your Python environment, install `cvxpy` with:
89
134
 
90
135
  ```bash
@@ -101,50 +146,6 @@ cd qLDPC
101
146
  python -m pip install -e '.[dev]'
102
147
  ```
103
148
 
104
- ## 🚀 Quickstart
105
-
106
- ```python
107
- from sympy.abc import x, y
108
-
109
- from qldpc import codes
110
-
111
- # The [[144, 12, 12]] bivariate bicycle "gross code".
112
- code = codes.BBCode({x: 12, y: 6}, x**3 + y + y**2, y**3 + x + x**2)
113
-
114
- print(code)
115
- print("physical qubits:", len(code))
116
- print("logical qubits:", code.dimension)
117
- ```
118
-
119
- ### Go deeper: a subsystem lifted-product code
120
-
121
- The next example builds a parity-check matrix over the group algebra `GF(2)[C₅]`, lifts each group-ring entry to a 5×5 binary block, and hands the result to `SLPCode`.
122
- The [subsystem lifted-product construction](https://arxiv.org/abs/2404.18302) produces an 80-qubit CSS subsystem code with 5 logical qubits and 45 gauge qubits.
123
-
124
- ```python
125
- from qldpc import abstract, codes
126
-
127
- group = abstract.CyclicGroup(5)
128
- ring = abstract.GroupRing(group)
129
- x = ring.generators[0]
130
-
131
- repetition = abstract.RingArray.build(
132
- [[1, 1, 0, 0], [0, 1, 1, 0], [0, 0, 1, 1]],
133
- ring,
134
- )
135
- connections = abstract.RingArray.build(
136
- [[0, x, 0, 0], [0, 0, x, 0], [0, 0, 0, x]],
137
- ring,
138
- )
139
- code = codes.SLPCode(repetition + connections)
140
-
141
- print("physical qubits:", len(code)) # 80
142
- print("logical qubits:", code.dimension) # 5
143
- print("gauge qubits:", code.gauge_dimension) # 45
144
- ```
145
-
146
- Continue with the [library map](https://qldpc.readthedocs.io/library_map.html) for the data model and package structure, or open the [example notebooks](https://qldpc.readthedocs.io/examples/index.html) for complete workflows.
147
-
148
149
  ## 🧭 Find your way around
149
150
 
150
151
  | Goal | Start here |
@@ -152,24 +153,26 @@ Continue with the [library map](https://qldpc.readthedocs.io/library_map.html) f
152
153
  | Understand code representations and how packages fit together | [Library map](https://qldpc.readthedocs.io/library_map.html) |
153
154
  | Learn by running complete workflows | [Examples](https://qldpc.readthedocs.io/examples/index.html) |
154
155
  | Browse code families, functions, and exact signatures | [API reference](https://qldpc.readthedocs.io/autoapi/index.html) |
155
- | Construct and analyze a first code | [qLDPC basics](https://qldpc.readthedocs.io/examples/basics.html) |
156
+ | Construct and analyze a code | [qLDPC basics](https://qldpc.readthedocs.io/examples/basics.html) |
156
157
  | Estimate logical error rates | [Logical-error-rate examples](https://qldpc.readthedocs.io/examples/index.html#logical-error-rates) |
157
158
  | Build memory circuits or noise models | [Circuit examples](https://qldpc.readthedocs.io/examples/index.html) |
158
159
  | Change or extend qLDPC safely | [Agent and contributor guide](https://github.com/qLDPCOrg/qLDPC/blob/main/AGENTS.md) |
159
160
 
160
- For the complete list of classes and functions, including construction-specific literature, use the API reference and source docstrings.
161
- This README focuses on getting started and finding the right documentation.
162
-
163
161
  ## ⚠️ Limitations and caveats
164
162
 
163
+ qLDPC is research software.
164
+ Some searches are expensive, some bounds are heuristic, experimental APIs can change, and optional tools may have side effects.
165
+
165
166
  - Circuit and tableau tools only work with qubit codes, even though other parts of qLDPC support prime-power-dimensional qudits.
166
167
  - Circuits returned by `get_encoding_circuit` are not fault-tolerant.
167
168
  Fault-tolerant encoding is tracked in [issue #327](https://github.com/qLDPCOrg/qLDPC/issues/327).
168
169
  - Exact distance calculations and transversal-gate searches can be exponential.
169
170
  When a method returns a bound rather than an exact distance, its docstring explains what kind of bound it is.
170
- - Features that use GAP may start subprocesses, use local disk caches, access online resources, or ask for manual input or permission to install a package.
171
+ - Features that use GAP may start subprocesses, access online resources, or ask for manual input or permission to install a package.
172
+ - Code lookups such as `QuditCode.from_qecdb_id` access online resources and cache results on disk; pass `refresh=True` to fetch the latest data.
171
173
  - Everything under `qldpc.experimental` has an unstable public API and may change without deprecation.
172
- In particular, lattice-surgery support has not yet received independent expert review; validate its results independently and pin the qLDPC version if you depend on it.
174
+ - Lattice-surgery support in `qldpc.experimental.surgery` is experimental and unstable, and its implementation is still pending careful expert review.
175
+ Validate its results independently, and pin the qLDPC version if you depend on it.
173
176
 
174
177
  ## 📚 Documentation and support
175
178
 
@@ -4,7 +4,7 @@ requires = ["uv-build>=0.9.18,<0.13"]
4
4
 
5
5
  [project]
6
6
  name = "qldpc"
7
- version = "0.4.1"
7
+ version = "0.4.2.dev20261023"
8
8
  description = "Tools for constructing and analyzing quantum low density parity check (qLDPC) codes."
9
9
  readme = "README.md"
10
10
  keywords = [
@@ -32,19 +32,19 @@ classifiers = [
32
32
  "Topic :: Scientific/Engineering :: Physics",
33
33
  ]
34
34
  dependencies = [
35
- "cvxpy>=1.3.2",
36
35
  "diskcache>=5",
37
- "galois>=0.4.2",
36
+ "galois>=0.4.11",
38
37
  "ldpc>=2.4.1",
39
- "networkx>=2.6.2",
40
- "numpy>=1.24",
38
+ "networkx>=2.7",
39
+ "numba>=0.61.2",
40
+ "numpy>=2.1",
41
41
  "platformdirs>=4",
42
42
  "pymatching>=2.3",
43
43
  "pyperclip>=1.11",
44
- "scipy>=1.14.1",
44
+ "scipy>=1.16",
45
45
  "sinter>=1.16",
46
46
  "stim>=1.16",
47
- "sympy>=1.12",
47
+ "sympy>=1.12.1",
48
48
  "tqdm>=4",
49
49
  ]
50
50
 
@@ -54,6 +54,7 @@ email = "mika.perlin@gmail.com"
54
54
 
55
55
  [project.optional-dependencies]
56
56
  decoders = [
57
+ "qldpc[ilp]",
57
58
  "qldpc[relay-bp]",
58
59
  "qldpc[tesseract]; ((sys_platform=='darwin' and platform_machine=='arm64') or (sys_platform=='linux' and platform_machine=='x86_64')) and python_version<'3.15'",
59
60
  ]
@@ -76,6 +77,7 @@ docs = [
76
77
  "sphinx-rtd-theme>=2",
77
78
  ]
78
79
  gap = ["passagemath-gap==10.8.12; python_version=='3.13' and sys_platform!='win32'"]
80
+ ilp = ["cvxpy>=1.5.3"]
79
81
  relay-bp = ["relay-bp[stim]==0.2.2"]
80
82
  tesseract = ["tesseract-decoder==0.1.1.dev20260910235247; python_version>='3.12'"]
81
83
 
@@ -93,6 +95,11 @@ ci-lint = [
93
95
  "checks-superstaq>=0.5.67",
94
96
  "pyproject-fmt>=2",
95
97
  ]
98
+ ci-notebooks = [
99
+ "jupyter>=1.1.1",
100
+ "matplotlib>=3.10",
101
+ "pip>=24",
102
+ ]
96
103
  ci-test = [
97
104
  "checks-superstaq>=0.5.67",
98
105
  "pytest>=8",
@@ -141,7 +148,10 @@ show_error_codes = true
141
148
 
142
149
  [tool.pytest.ini_options]
143
150
  addopts = "--disable-socket"
144
- filterwarnings = ["ignore:(?s).*The problem is either infeasible or unbounded.*:UserWarning"]
151
+ filterwarnings = [
152
+ "error::DeprecationWarning",
153
+ "ignore:(?s).*The problem is either infeasible or unbounded.*:UserWarning",
154
+ ]
145
155
 
146
156
  [tool.coverage.run]
147
157
  include = ["./*"]
@@ -4,7 +4,7 @@ requires = [ "uv-build>=0.9.18,<0.13" ]
4
4
 
5
5
  [project]
6
6
  name = "qldpc"
7
- version = "0.4.1"
7
+ version = "0.4.2.dev20261023"
8
8
  description = "Tools for constructing and analyzing quantum low density parity check (qLDPC) codes."
9
9
  readme = "README.md"
10
10
  keywords = [
@@ -30,22 +30,23 @@ classifiers = [
30
30
  "Topic :: Scientific/Engineering :: Physics",
31
31
  ]
32
32
  dependencies = [
33
- "cvxpy>=1.3.2",
34
33
  "diskcache>=5",
35
- "galois>=0.4.2",
34
+ "galois>=0.4.11",
36
35
  "ldpc>=2.4.1",
37
- "networkx>=2.6.2",
38
- "numpy>=1.24",
36
+ "networkx>=2.7",
37
+ "numba>=0.61.2", # floor tested with Python 3.11 and NumPy 2.1
38
+ "numpy>=2.1",
39
39
  "platformdirs>=4",
40
40
  "pymatching>=2.3",
41
41
  "pyperclip>=1.11",
42
- "scipy>=1.14.1",
42
+ "scipy>=1.16", # earlier MILP solvers can return non-solutions to ILP decoding
43
43
  "sinter>=1.16",
44
44
  "stim>=1.16",
45
- "sympy>=1.12",
45
+ "sympy>=1.12.1", # 1.12 accepts mpmath 1.4, which it cannot import
46
46
  "tqdm>=4",
47
47
  ]
48
48
  optional-dependencies.decoders = [
49
+ "qldpc[ilp]",
49
50
  "qldpc[relay-bp]",
50
51
  """\
51
52
  qldpc[tesseract]; ((sys_platform=='darwin' and platform_machine=='arm64') or (sys_platform=='linux' and \
@@ -73,6 +74,9 @@ optional-dependencies.docs = [
73
74
  optional-dependencies.gap = [
74
75
  "passagemath-gap==10.8.12; python_version=='3.13' and sys_platform!='win32'",
75
76
  ]
77
+ optional-dependencies.ilp = [
78
+ "cvxpy>=1.5.3", # earlier releases do not import with NumPy 2
79
+ ]
76
80
  optional-dependencies.relay-bp = [ "relay-bp[stim]==0.2.2" ]
77
81
  optional-dependencies.tesseract = [
78
82
  "tesseract-decoder==0.1.1.dev20260910235247; python_version>='3.12'",
@@ -90,6 +94,11 @@ ci-lint = [
90
94
  "checks-superstaq>=0.5.67",
91
95
  "pyproject-fmt>=2",
92
96
  ]
97
+ ci-notebooks = [
98
+ "jupyter>=1.1.1",
99
+ "matplotlib>=3.10",
100
+ "pip>=24",
101
+ ]
93
102
  ci-test = [
94
103
  "checks-superstaq>=0.5.67",
95
104
  "pytest>=8",
@@ -136,6 +145,7 @@ show_error_codes = true
136
145
  [tool.pytest]
137
146
  ini_options.addopts = "--disable-socket" # forbid tests from making network calls
138
147
  ini_options.filterwarnings = [
148
+ "error::DeprecationWarning", # tests use the modern API
139
149
  "ignore:(?s).*The problem is either infeasible or unbounded.*:UserWarning", # from cvxpy
140
150
  ]
141
151
 
@@ -144,8 +154,8 @@ run.include = [ "./*" ]
144
154
  run.parallel = true
145
155
  run.patch = [ "subprocess" ]
146
156
  # Statement coverage only. Branch coverage is deliberately not gated: a handful of arcs flip with
147
- # the pytest-randomly seed and with the installed numpy version, so gating it would make pass/fail
148
- # nondeterministic. Audit it on demand with "checks/coverage_.py --branch".
157
+ # the pytest-randomly seed, so gating it would make pass/fail nondeterministic. Audit it on demand
158
+ # with "checks/coverage_.py --branch".
149
159
  report.fail_under = 100
150
160
  report.skip_covered = true
151
161
  report.show_missing = true