pyqrack-cpu-complex128 2.29.1__tar.gz → 2.29.3__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 (31) hide show
  1. {pyqrack_cpu_complex128-2.29.1/pyqrack_cpu_complex128.egg-info → pyqrack_cpu_complex128-2.29.3}/PKG-INFO +1 -1
  2. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_ace_backend.py +52 -6
  3. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3/pyqrack_cpu_complex128.egg-info}/PKG-INFO +1 -1
  4. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/setup.py +1 -1
  5. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/LICENSE +0 -0
  6. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/MANIFEST.in +0 -0
  7. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/Makefile +0 -0
  8. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/README.md +0 -0
  9. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyproject.toml +0 -0
  10. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/__init__.py +0 -0
  11. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/neuron_activation_fn.py +0 -0
  12. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/pauli.py +0 -0
  13. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_ace_mps_backend.py +0 -0
  14. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_circuit.py +0 -0
  15. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_near_clifford_qec_backend.py +0 -0
  16. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_neuron.py +0 -0
  17. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  18. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_simulator.py +0 -0
  19. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_stabilizer.py +0 -0
  20. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_system/__init__.py +0 -0
  21. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/qrack_system/qrack_system.py +0 -0
  22. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/quimb_circuit_type.py +0 -0
  23. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/stats/__init__.py +0 -0
  24. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/stats/load_quantized_data.py +0 -0
  25. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack/stats/quantize_by_range.py +0 -0
  26. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack_cpu_complex128.egg-info/SOURCES.txt +0 -0
  27. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack_cpu_complex128.egg-info/dependency_links.txt +0 -0
  28. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack_cpu_complex128.egg-info/not-zip-safe +0 -0
  29. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack_cpu_complex128.egg-info/requires.txt +0 -0
  30. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/pyqrack_cpu_complex128.egg-info/top_level.txt +0 -0
  31. {pyqrack_cpu_complex128-2.29.1 → pyqrack_cpu_complex128-2.29.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cpu-complex128
3
- Version: 2.29.1
3
+ Version: 2.29.3
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -2209,14 +2209,60 @@ class QrackAceBackend:
2209
2209
  self.t(c1)
2210
2210
  self.adjt(c2)
2211
2211
  self.cx(c1, c2)
2212
- else:
2213
- self.correct(c1)
2214
- self.correct(c2)
2215
2212
 
2216
- for (b1, b2, bt) in witnesses:
2217
- self.sim[b1[0]].mcx([b1[1], b2[1]], bt[1])
2213
+ return
2214
+
2215
+ anc_and = None
2216
+ if self.is_error_detection and not self._in_gadget_capture and ((len(hqt) > 1) or (len(hq1) > 1) or (len(hq2) > 1)):
2217
+ found = False
2218
+ anc_sim = hq1[0][0]
2219
+ t_sims = {y[0] for y in hqt if y[0] >= 0}
2220
+ for x in hq1:
2221
+ if (x[0] < 0) or (x[0] not in t_sims):
2222
+ continue
2223
+ anc_sim = x[0]
2224
+ for y in hq2:
2225
+ if (y[0] < 0) or (y[0] not in t_sims):
2226
+ continue
2227
+ if anc_sim == y[0]:
2228
+ found = True
2229
+ break
2230
+ if found:
2231
+ break
2232
+ self._in_gadget_capture = True
2233
+ anc_and = self.detect_ancilla_lq[anc_sim]
2234
+ self.cx(t, anc_and)
2235
+ c1_idx = next((r[1] for r in hq1 if r[0] == anc_sim), None)
2236
+ c2_idx = next((r[1] for r in hq2 if r[0] == anc_sim), None)
2237
+ if (c1_idx is not None) and (c2_idx is not None):
2238
+ _, anc_and_idx = self.qubits[anc_and][0]
2239
+ self.sim[anc_sim].mcx([c1_idx, c2_idx], anc_and_idx)
2240
+ else:
2241
+ self.ccx(c1, c2, anc_and)
2242
+ self._in_gadget_capture = False
2218
2243
 
2219
- self.correct(t)
2244
+ self.correct(c1)
2245
+ self.correct(c2)
2246
+
2247
+ for (b1, b2, bt) in witnesses:
2248
+ self.sim[b1[0]].mcx([b1[1], b2[1]], bt[1])
2249
+
2250
+ self.correct(t)
2251
+
2252
+ if anc_and is not None:
2253
+ self._in_gadget_capture = True
2254
+ self.cx(t, anc_and)
2255
+ anc_sim, anc_idx = self.qubits[anc_and][0]
2256
+ p = self.sim[anc_sim].prob(anc_idx)
2257
+ p = 1.0 - p
2258
+ if self._ps_epsilon >= p:
2259
+ b = self.m(anc_and)
2260
+ else:
2261
+ b = self.force_m(anc_and, False)
2262
+ if b:
2263
+ self.x(anc_and)
2264
+ self.x(t)
2265
+ self._in_gadget_capture = False
2220
2266
 
2221
2267
  def ccz(self, c1, c2, t):
2222
2268
  self.h(t)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cpu-complex128
3
- Version: 2.29.1
3
+ Version: 2.29.3
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -7,7 +7,7 @@ from setuptools import setup
7
7
  from setuptools.command.build_py import build_py
8
8
 
9
9
 
10
- VERSION = "2.29.1"
10
+ VERSION = "2.29.3"
11
11
 
12
12
  # Read long description from README.
13
13
  README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md')