pyqrack-cpu-complex128 2.19.0__tar.gz → 2.19.2__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 (30) hide show
  1. {pyqrack_cpu_complex128-2.19.0/pyqrack_cpu_complex128.egg-info → pyqrack_cpu_complex128-2.19.2}/PKG-INFO +1 -1
  2. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_ace_backend.py +18 -29
  3. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2/pyqrack_cpu_complex128.egg-info}/PKG-INFO +1 -1
  4. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/setup.py +1 -1
  5. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/LICENSE +0 -0
  6. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/MANIFEST.in +0 -0
  7. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/Makefile +0 -0
  8. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/README.md +0 -0
  9. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyproject.toml +0 -0
  10. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/__init__.py +0 -0
  11. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/neuron_activation_fn.py +0 -0
  12. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/pauli.py +0 -0
  13. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_circuit.py +0 -0
  14. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_near_clifford_qec_backend.py +0 -0
  15. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_neuron.py +0 -0
  16. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  17. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_simulator.py +0 -0
  18. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_stabilizer.py +0 -0
  19. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_system/__init__.py +0 -0
  20. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/qrack_system/qrack_system.py +0 -0
  21. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/quimb_circuit_type.py +0 -0
  22. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/stats/__init__.py +0 -0
  23. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/stats/load_quantized_data.py +0 -0
  24. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack/stats/quantize_by_range.py +0 -0
  25. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack_cpu_complex128.egg-info/SOURCES.txt +0 -0
  26. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack_cpu_complex128.egg-info/dependency_links.txt +0 -0
  27. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack_cpu_complex128.egg-info/not-zip-safe +0 -0
  28. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack_cpu_complex128.egg-info/requires.txt +0 -0
  29. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/pyqrack_cpu_complex128.egg-info/top_level.txt +0 -0
  30. {pyqrack_cpu_complex128-2.19.0 → pyqrack_cpu_complex128-2.19.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cpu-complex128
3
- Version: 2.19.0
3
+ Version: 2.19.2
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -242,7 +242,7 @@ class QrackAceBackend:
242
242
  is_torus=True,
243
243
  is_1d_chain=False,
244
244
  is_error_detection=True,
245
- is_boundary_repetition_code=True,
245
+ is_boundary_repetition_code=False,
246
246
  to_clone=None,
247
247
  ):
248
248
  if to_clone:
@@ -487,8 +487,6 @@ class QrackAceBackend:
487
487
  self._qubits.append([(sim_id, phys_idx)])
488
488
  self._rep_code_ancilla2_lq.append(lq_idx)
489
489
 
490
- self._rep_code_correcting = False
491
-
492
490
  # capture calls (see _apply_coupling): those calls go through
493
491
  # the ordinary _cpauli -> _apply_coupling path themselves, which
494
492
  # would otherwise try to wrap ITSELF in another capture,
@@ -1399,14 +1397,7 @@ class QrackAceBackend:
1399
1397
  sim.mcx([anc1_idx], anc2_idx)
1400
1398
 
1401
1399
  p = sim.prob(anc2_idx)
1402
- if p < self._ps_epsilon:
1403
- sim.force_m(anc2_idx, False)
1404
- bit = False
1405
- elif p >= (1.0 - self._ps_epsilon):
1406
- sim.force_m(anc2_idx, True)
1407
- bit = True
1408
- else:
1409
- bit = sim.m(anc2_idx)
1400
+ bit = sim.m(anc2_idx)
1410
1401
  if bit:
1411
1402
  sim.x(anc2_idx) # reset ancilla2 to |0> for reuse
1412
1403
 
@@ -1416,31 +1407,29 @@ class QrackAceBackend:
1416
1407
  disagree = sum(1 for bit, _, _ in syndrome if bit)
1417
1408
  if disagree > 0:
1418
1409
  if disagree > n - disagree:
1419
- self._rep_code_correcting = True
1420
- try:
1410
+ # Flip all bits
1411
+ if phase:
1412
+ self.z(lq)
1413
+ else:
1414
+ self.x(lq)
1415
+ # Necessary either way, even if all flipped
1416
+ for bit, sim_id, anc1_idx in syndrome:
1417
+ if bit:
1421
1418
  if phase:
1422
- self.z(lq)
1419
+ self.sim[sim_id].z(anc1_idx)
1423
1420
  else:
1424
- self.x(lq)
1425
- finally:
1426
- self._rep_code_correcting = False
1427
- elif disagree == 1:
1428
- for bit, sim_id, anc1_idx in syndrome:
1429
- if bit:
1430
- if phase:
1431
- self.sim[sim_id].z(anc1_idx)
1432
- else:
1433
- self.sim[sim_id].x(anc1_idx)
1434
- # else: strict minority > 1 (only possible with the 5-qubit
1435
- # corner code) -- not explainable by any single-qubit error,
1436
- # left uncorrected; the explicit reset below still cleans
1437
- # up ancilla1 for reuse regardless.
1421
+ self.sim[sim_id].x(anc1_idx)
1438
1422
 
1439
1423
  for (sim_id, b_idx), anc1_lq, _ in triples:
1440
1424
  anc1_idx = self._qubits[anc1_lq][0][1]
1441
1425
  sim = self.sim[sim_id]
1442
1426
  sim.mcx([b_idx], anc1_idx)
1443
- if sim.m(anc1_idx):
1427
+ p = sim.prob(anc1_idx)
1428
+ if self._ps_epsilon >= (1.0 - p):
1429
+ b = sim.m(anc1_idx)
1430
+ else:
1431
+ b = sim.force_m(anc1_idx, False)
1432
+ if b:
1444
1433
  sim.x(anc1_idx)
1445
1434
 
1446
1435
  def x(self, lq):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cpu-complex128
3
- Version: 2.19.0
3
+ Version: 2.19.2
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.19.0"
10
+ VERSION = "2.19.2"
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')