pyqrack-cuda 1.44.4__tar.gz → 1.44.5__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_cuda-1.44.4 → pyqrack_cuda-1.44.5}/Makefile +1 -1
  2. {pyqrack_cuda-1.44.4/pyqrack_cuda.egg-info → pyqrack_cuda-1.44.5}/PKG-INFO +1 -1
  3. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_ace_backend.py +16 -4
  4. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5/pyqrack_cuda.egg-info}/PKG-INFO +1 -1
  5. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/setup.py +1 -1
  6. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/LICENSE +0 -0
  7. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/MANIFEST.in +0 -0
  8. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/README.md +0 -0
  9. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyproject.toml +0 -0
  10. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/__init__.py +0 -0
  11. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/neuron_activation_fn.py +0 -0
  12. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/pauli.py +0 -0
  13. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_circuit.py +0 -0
  14. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_neuron.py +0 -0
  15. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  16. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_simulator.py +0 -0
  17. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_stabilizer.py +0 -0
  18. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_system/__init__.py +0 -0
  19. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.so +0 -0
  20. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/qrack_system/qrack_system.py +0 -0
  21. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/quimb_circuit_type.py +0 -0
  22. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/stats/__init__.py +0 -0
  23. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/stats/load_quantized_data.py +0 -0
  24. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack/stats/quantize_by_range.py +0 -0
  25. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack_cuda.egg-info/SOURCES.txt +0 -0
  26. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack_cuda.egg-info/dependency_links.txt +0 -0
  27. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack_cuda.egg-info/not-zip-safe +0 -0
  28. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack_cuda.egg-info/requires.txt +0 -0
  29. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/pyqrack_cuda.egg-info/top_level.txt +0 -0
  30. {pyqrack_cuda-1.44.4 → pyqrack_cuda-1.44.5}/setup.cfg +0 -0
@@ -18,7 +18,7 @@ help:
18
18
  build-deps:
19
19
  ifneq ($(OS),Windows_NT)
20
20
  ifeq ($(QRACK_PRESENT),)
21
- git clone https://github.com/unitaryfund/qrack.git; cd qrack; git checkout 63806a65a9ebf64e57e4a44bcc68237d2947568a; cd ..
21
+ git clone https://github.com/unitaryfund/qrack.git; cd qrack; git checkout 87cf2078438f931afadd74d5f8abaaf933c01c6d; cd ..
22
22
  endif
23
23
  mkdir -p qrack/build
24
24
  ifeq ($(UNAME_S),Linux)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cuda
3
- Version: 1.44.4
3
+ Version: 1.44.5
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -24,10 +24,17 @@ class QrackAceBackend:
24
24
  """A back end for elided quantum error correction
25
25
 
26
26
  This back end uses elided repetition code on a nearest-neighbor topology to emulate
27
- a utility-scale superconducting chip quantum computer in very little memory.
27
+ a utility-scale superconducting chip quantum computer in very little memory.4
28
+
29
+ The backend was originally designed assuming a 2D qubit grid like 2019 Sycamore.
30
+ However, it quickly became apparent that users can basically design their own
31
+ connectivity topologies, without breaking the concept. (Not all will work equally well.)
32
+ For maximum flexibility, set "alternating_codes=False". (For best performance on
33
+ Sycamore-like topologies, leave it "True.")
28
34
 
29
35
  Attributes:
30
36
  sim(QrackSimulator): Corresponding simulator.
37
+ alternating_codes(bool): Alternate repetition code elision by index?
31
38
  row_length(int): Qubits per row.
32
39
  col_length(int): Qubits per column.
33
40
  """
@@ -35,10 +42,12 @@ class QrackAceBackend:
35
42
  def __init__(
36
43
  self,
37
44
  qubit_count=-1,
45
+ alternating_codes=True,
38
46
  toClone=None
39
47
  ):
40
48
  self.sim = toClone.sim.clone() if toClone else QrackSimulator(3 * qubit_count)
41
49
  self._factor_width(qubit_count)
50
+ self.alternating_codes = alternating_codes
42
51
 
43
52
 
44
53
  def _factor_width(self, width):
@@ -103,7 +112,7 @@ class QrackAceBackend:
103
112
  def _encode(self, hq, reverse = False):
104
113
  row = (hq[0] // 3) // self.row_length
105
114
  even_row = not (row & 1)
106
- if even_row == reverse:
115
+ if ((not self.alternating_codes) and reverse) or (even_row == reverse):
107
116
  self._cx_shadow(hq[0], hq[1])
108
117
  self.sim.mcx([hq[1]], hq[2])
109
118
  else:
@@ -114,7 +123,7 @@ class QrackAceBackend:
114
123
  def _decode(self, hq, reverse = False):
115
124
  row = (hq[0] // 3) // self.row_length
116
125
  even_row = not (row & 1)
117
- if even_row == reverse:
126
+ if ((not self.alternating_codes) and reverse) or (even_row == reverse):
118
127
  self.sim.mcx([hq[1]], hq[2])
119
128
  self._cx_shadow(hq[0], hq[1])
120
129
  else:
@@ -227,7 +236,10 @@ class QrackAceBackend:
227
236
  hq1 = self._unpack(lq1)
228
237
  hq2 = self._unpack(lq2)
229
238
  gate([hq1[0]], hq2[0])
230
- shadow(hq1[1], hq2[1])
239
+ if self.alternating_codes:
240
+ shadow(hq1[1], hq2[1])
241
+ else:
242
+ gate([hq1[1]], hq2[1])
231
243
  gate([hq1[2]], hq2[2])
232
244
 
233
245
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cuda
3
- Version: 1.44.4
3
+ Version: 1.44.5
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.44.4"
10
+ VERSION = "1.44.5"
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