pyqrack-cuda 1.47.0__tar.gz → 1.47.1__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.47.0/pyqrack_cuda.egg-info → pyqrack_cuda-1.47.1}/PKG-INFO +1 -1
  2. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/qrack_ace_backend.py +9 -9
  3. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1/pyqrack_cuda.egg-info}/PKG-INFO +1 -1
  4. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/setup.py +1 -1
  5. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/LICENSE +0 -0
  6. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/MANIFEST.in +0 -0
  7. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/Makefile +0 -0
  8. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/README.md +0 -0
  9. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyproject.toml +0 -0
  10. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/__init__.py +0 -0
  11. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/neuron_activation_fn.py +0 -0
  12. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/pauli.py +0 -0
  13. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/qrack_circuit.py +0 -0
  14. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/qrack_neuron.py +0 -0
  15. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  16. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/qrack_simulator.py +0 -0
  17. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/qrack_stabilizer.py +0 -0
  18. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/qrack_system/__init__.py +0 -0
  19. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/qrack_system/qrack_system.py +0 -0
  20. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/quimb_circuit_type.py +0 -0
  21. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/stats/__init__.py +0 -0
  22. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/stats/load_quantized_data.py +0 -0
  23. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack/stats/quantize_by_range.py +0 -0
  24. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack_cuda.egg-info/SOURCES.txt +0 -0
  25. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack_cuda.egg-info/dependency_links.txt +0 -0
  26. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack_cuda.egg-info/not-zip-safe +0 -0
  27. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack_cuda.egg-info/requires.txt +0 -0
  28. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/pyqrack_cuda.egg-info/top_level.txt +0 -0
  29. {pyqrack_cuda-1.47.0 → pyqrack_cuda-1.47.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cuda
3
- Version: 1.47.0
3
+ Version: 1.47.1
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -51,13 +51,15 @@ class QrackAceBackend:
51
51
  isBinaryDecisionTree=False,
52
52
  toClone=None,
53
53
  ):
54
+ if long_range_rows < 0:
55
+ long_range_rows = 0
56
+ if qubit_count < 0:
57
+ qubit_count = 0
54
58
  if toClone:
55
59
  qubit_count = toClone.num_qubits()
56
60
  recursive_stack_depth = toClone.recursive_stack_depth
57
61
  if recursive_stack_depth < 1:
58
62
  recursive_stack_depth = 1
59
- if long_range_rows < 0:
60
- long_range_rows = 0
61
63
 
62
64
  self.recursive_stack_depth = recursive_stack_depth
63
65
  self._factor_width(qubit_count, reverse_row_and_col)
@@ -65,13 +67,11 @@ class QrackAceBackend:
65
67
  self._is_init = [False] * qubit_count
66
68
 
67
69
  col_seq = [False] + [True] * long_range_rows
68
- self._is_col_long_range = col_seq * (self.row_length // len(col_seq))
69
- self._is_col_long_range += [True] * (
70
- self.row_length - len(self._is_col_long_range)
71
- )
70
+ len_col_seq = len(col_seq)
71
+ self._is_col_long_range = (col_seq * ((self.row_length + len_col_seq - 1) // len_col_seq))[:self.row_length]
72
72
  self._hardware_offset = []
73
73
  tot_qubits = 0
74
- for _ in range(self.row_length):
74
+ for _ in range(self.col_length):
75
75
  for c in self._is_col_long_range:
76
76
  self._hardware_offset.append(tot_qubits)
77
77
  tot_qubits += 1 if c else 3
@@ -621,6 +621,7 @@ class QrackAceBackend:
621
621
  self.swap(lq1, lq2)
622
622
 
623
623
  def m(self, lq):
624
+ self._is_init[lq] = False
624
625
  hq = self._unpack(lq)
625
626
  if self._is_col_long_range[lq % self.row_length]:
626
627
  return self.sim.m(hq[0])
@@ -639,19 +640,18 @@ class QrackAceBackend:
639
640
  # but not non-locally, via entanglement.
640
641
  # Collapse the other separable part toward agreement.
641
642
  syndrome += self.sim.force_m(hq[single_bit], bool(syndrome))
642
- self._is_init[lq] = False
643
643
 
644
644
  return True if (syndrome > 1) else False
645
645
 
646
646
  def force_m(self, lq, c):
647
647
  hq = self._unpack(lq)
648
+ self._is_init[lq] = False
648
649
  if self._is_col_long_range[lq % self.row_length]:
649
650
  return self.sim.force_m(hq[0])
650
651
 
651
652
  self._correct(lq)
652
653
  for q in hq:
653
654
  self.sim.force_m(q, c)
654
- self._is_init[lq] = False
655
655
 
656
656
  return c
657
657
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cuda
3
- Version: 1.47.0
3
+ Version: 1.47.1
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.47.0"
10
+ VERSION = "1.47.1"
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