pyqrack-cpu 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.

Potentially problematic release.


This version of pyqrack-cpu might be problematic. Click here for more details.

Files changed (29) hide show
  1. {pyqrack_cpu-1.44.4/pyqrack_cpu.egg-info → pyqrack_cpu-1.44.5}/PKG-INFO +1 -1
  2. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_ace_backend.py +16 -4
  3. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5/pyqrack_cpu.egg-info}/PKG-INFO +1 -1
  4. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/setup.py +1 -1
  5. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/LICENSE +0 -0
  6. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/MANIFEST.in +0 -0
  7. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/README.md +0 -0
  8. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyproject.toml +0 -0
  9. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/__init__.py +0 -0
  10. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/neuron_activation_fn.py +0 -0
  11. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/pauli.py +0 -0
  12. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_circuit.py +0 -0
  13. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_neuron.py +0 -0
  14. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  15. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_simulator.py +0 -0
  16. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_stabilizer.py +0 -0
  17. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_system/__init__.py +0 -0
  18. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.so +0 -0
  19. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/qrack_system/qrack_system.py +0 -0
  20. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/quimb_circuit_type.py +0 -0
  21. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/stats/__init__.py +0 -0
  22. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/stats/load_quantized_data.py +0 -0
  23. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack/stats/quantize_by_range.py +0 -0
  24. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack_cpu.egg-info/SOURCES.txt +0 -0
  25. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack_cpu.egg-info/dependency_links.txt +0 -0
  26. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack_cpu.egg-info/not-zip-safe +0 -0
  27. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack_cpu.egg-info/requires.txt +0 -0
  28. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/pyqrack_cpu.egg-info/top_level.txt +0 -0
  29. {pyqrack_cpu-1.44.4 → pyqrack_cpu-1.44.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cpu
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-cpu
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
@@ -4,7 +4,7 @@ import os
4
4
  from setuptools import setup
5
5
 
6
6
 
7
- VERSION = "1.44.4"
7
+ VERSION = "1.44.5"
8
8
 
9
9
  # Read long description from README.
10
10
  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