pyqrack-cuda 1.46.4__tar.gz → 1.46.6__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 (29) hide show
  1. {pyqrack_cuda-1.46.4/pyqrack_cuda.egg-info → pyqrack_cuda-1.46.6}/PKG-INFO +1 -1
  2. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_ace_backend.py +8 -13
  3. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6/pyqrack_cuda.egg-info}/PKG-INFO +1 -1
  4. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/setup.py +1 -1
  5. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/LICENSE +0 -0
  6. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/MANIFEST.in +0 -0
  7. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/Makefile +0 -0
  8. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/README.md +0 -0
  9. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyproject.toml +0 -0
  10. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/__init__.py +0 -0
  11. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/neuron_activation_fn.py +0 -0
  12. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/pauli.py +0 -0
  13. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_circuit.py +0 -0
  14. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_neuron.py +0 -0
  15. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  16. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_simulator.py +0 -0
  17. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_stabilizer.py +0 -0
  18. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_system/__init__.py +0 -0
  19. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_system/qrack_system.py +0 -0
  20. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/quimb_circuit_type.py +0 -0
  21. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/stats/__init__.py +0 -0
  22. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/stats/load_quantized_data.py +0 -0
  23. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/stats/quantize_by_range.py +0 -0
  24. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/SOURCES.txt +0 -0
  25. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/dependency_links.txt +0 -0
  26. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/not-zip-safe +0 -0
  27. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/requires.txt +0 -0
  28. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/top_level.txt +0 -0
  29. {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cuda
3
- Version: 1.46.4
3
+ Version: 1.46.6
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -485,18 +485,12 @@ class QrackAceBackend:
485
485
  other_bits = [1, 2]
486
486
  # The syndrome of "other_bits" is guaranteed to be fixed, after this.
487
487
  self._correct(lq)
488
- syndrome = 0
489
- for q in other_bits:
490
- syndrome += self.sim.m(hq[q])
488
+ syndrome = self.sim.m(hq[other_bits[0]])
489
+ syndrome += self.sim.force_m(hq[other_bits[1]], bool(syndrome))
491
490
  # The two separable parts of the code are correlated,
492
491
  # but not non-locally, via entanglement.
493
492
  # Collapse the other separable part toward agreement.
494
- if syndrome == 0:
495
- self.sim.force_m(hq[single_bit], False)
496
- elif syndrome == 2:
497
- syndrome += self.sim.force_m(hq[single_bit], True)
498
- else:
499
- raise RuntimeError("Unexpected syndrome in m()!")
493
+ syndrome += self.sim.force_m(hq[single_bit], bool(syndrome))
500
494
  self._is_init[lq] = False
501
495
 
502
496
  return True if (syndrome > 1) else False
@@ -514,10 +508,11 @@ class QrackAceBackend:
514
508
  result = 0
515
509
  # Randomize the order of measurement to amortize error.
516
510
  # However, locality of collapse matters:
517
- # always measure across rows, and by consecutive rows.
518
- rows = list(range(range(self.col_length)))
511
+ # always measure across rows, and by row directionality.
512
+ rows = list(range(self.col_length))
513
+ random.shuffle(rows)
519
514
  for lq_row in rows:
520
- col_offset = rand.randint(0, self.row_length - 1)
515
+ col_offset = random.randint(0, self.row_length - 1)
521
516
  col_reverse = self.alternating_codes and (lq_row & 1)
522
517
  for c in range(self.row_length):
523
518
  lq_col = (((self.row_length - (c + 1)) if col_reverse else c) + col_offset) % self.row_length
@@ -531,7 +526,7 @@ class QrackAceBackend:
531
526
  if high_accuracy:
532
527
  samples = []
533
528
  for _ in range(s):
534
- clone = self.sim.clone()
529
+ clone = self.clone()
535
530
  _sample = clone.m_all()
536
531
  sample = 0
537
532
  for i in range(len(q)):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cuda
3
- Version: 1.46.4
3
+ Version: 1.46.6
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 = "1.46.4"
10
+ VERSION = "1.46.6"
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')
File without changes
File without changes
File without changes
File without changes
File without changes