pyqrack-cpu-complex128 2.26.0__tar.gz → 2.26.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 (33) hide show
  1. {pyqrack_cpu_complex128-2.26.0/pyqrack_cpu_complex128.egg-info → pyqrack_cpu_complex128-2.26.1}/PKG-INFO +1 -1
  2. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_ace_backend.py +38 -42
  3. pyqrack_cpu_complex128-2.26.1/pyqrack/qrack_system/qrack_cl_precompile/qrack_cl_precompile +0 -0
  4. pyqrack_cpu_complex128-2.26.1/pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.so +0 -0
  5. pyqrack_cpu_complex128-2.26.1/pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.so.10.13.1 +0 -0
  6. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1/pyqrack_cpu_complex128.egg-info}/PKG-INFO +1 -1
  7. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack_cpu_complex128.egg-info/SOURCES.txt +3 -0
  8. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/setup.py +1 -1
  9. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/LICENSE +0 -0
  10. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/MANIFEST.in +0 -0
  11. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/Makefile +0 -0
  12. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/README.md +0 -0
  13. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyproject.toml +0 -0
  14. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/__init__.py +0 -0
  15. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/neuron_activation_fn.py +0 -0
  16. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/pauli.py +0 -0
  17. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_circuit.py +0 -0
  18. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_near_clifford_qec_backend.py +0 -0
  19. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_neuron.py +0 -0
  20. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  21. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_simulator.py +0 -0
  22. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_stabilizer.py +0 -0
  23. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_system/__init__.py +0 -0
  24. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/qrack_system/qrack_system.py +0 -0
  25. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/quimb_circuit_type.py +0 -0
  26. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/stats/__init__.py +0 -0
  27. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/stats/load_quantized_data.py +0 -0
  28. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack/stats/quantize_by_range.py +0 -0
  29. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack_cpu_complex128.egg-info/dependency_links.txt +0 -0
  30. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack_cpu_complex128.egg-info/not-zip-safe +0 -0
  31. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack_cpu_complex128.egg-info/requires.txt +0 -0
  32. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/pyqrack_cpu_complex128.egg-info/top_level.txt +0 -0
  33. {pyqrack_cpu_complex128-2.26.0 → pyqrack_cpu_complex128-2.26.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cpu-complex128
3
- Version: 2.26.0
3
+ Version: 2.26.1
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -1813,39 +1813,6 @@ class QrackAceBackend:
1813
1813
  sims1 = {r[0] for r in hq1}
1814
1814
  sims2 = {r[0] for r in hq2}
1815
1815
 
1816
- if sims1.isdisjoint(sims2):
1817
- self._correct(lq1)
1818
- self._correct(lq2)
1819
-
1820
- # Once fully resolved, the swap itself is nothing but a
1821
- # reference exchange: self._qubits[lq] is a reference to the
1822
- # replica-list object, so swapping which index points to
1823
- # which object IS the swap -- no separate content to copy.
1824
- self._qubits[lq1], self._qubits[lq2] = self._qubits[lq2], self._qubits[lq1]
1825
-
1826
- lhv1 = self._lhv.pop(lq1, None)
1827
- lhv2 = self._lhv.pop(lq2, None)
1828
- if lhv2 is not None:
1829
- self._lhv[lq1] = lhv2
1830
- if lhv1 is not None:
1831
- self._lhv[lq2] = lhv1
1832
-
1833
- # Boundary repetition code needs no bookkeeping here, unlike
1834
- # self._qubits/self._lhv just above: it's on-demand now, not
1835
- # a permanent, per-logical-index dict of pre-allocated
1836
- # partners -- eligibility is just len(self._qubits[lq]) > 1,
1837
- # computed fresh on every coupling event, so the reference
1838
- # swap of self._qubits above already, automatically carries
1839
- # the right eligibility with it. Nothing else to move.
1840
- return
1841
-
1842
- # Boundary-to-boundary handling
1843
- if (len(hq1) > 1) and (len(hq2) > 1):
1844
- self.cx(lq1, lq2)
1845
- self.cx(lq2, lq1)
1846
- self.cx(lq1, lq2)
1847
- return
1848
-
1849
1816
  # Fast/exact path: every replica of lq1 lines up, position-for-
1850
1817
  # position, with the corresponding replica of lq2 on the SAME
1851
1818
  # underlying simulator. A native swap() there is pure index
@@ -1872,8 +1839,6 @@ class QrackAceBackend:
1872
1839
  # two sides can land on different simulators (the partial-match
1873
1840
  # branches below) needs separate, careful treatment -- not
1874
1841
  # reused as-is from _cpauli's helper.
1875
- self._correct(lq1)
1876
- self._correct(lq2)
1877
1842
 
1878
1843
  if len(hq1) == len(hq2) and all(hq1[i][0] == hq2[i][0] for i in range(len(hq1))):
1879
1844
  for i in range(len(hq1)):
@@ -1887,6 +1852,36 @@ class QrackAceBackend:
1887
1852
  # with or without this call).
1888
1853
  return
1889
1854
 
1855
+ if sims1.isdisjoint(sims2):
1856
+ # Once fully resolved, the swap itself is nothing but a
1857
+ # reference exchange: self._qubits[lq] is a reference to the
1858
+ # replica-list object, so swapping which index points to
1859
+ # which object IS the swap -- no separate content to copy.
1860
+ self._qubits[lq1], self._qubits[lq2] = self._qubits[lq2], self._qubits[lq1]
1861
+
1862
+ lhv1 = self._lhv.pop(lq1, None)
1863
+ lhv2 = self._lhv.pop(lq2, None)
1864
+ if lhv2 is not None:
1865
+ self._lhv[lq1] = lhv2
1866
+ if lhv1 is not None:
1867
+ self._lhv[lq2] = lhv1
1868
+
1869
+ # Boundary repetition code needs no bookkeeping here, unlike
1870
+ # self._qubits/self._lhv just above: it's on-demand now, not
1871
+ # a permanent, per-logical-index dict of pre-allocated
1872
+ # partners -- eligibility is just len(self._qubits[lq]) > 1,
1873
+ # computed fresh on every coupling event, so the reference
1874
+ # swap of self._qubits above already, automatically carries
1875
+ # the right eligibility with it. Nothing else to move.
1876
+ return
1877
+
1878
+ # Boundary-to-boundary handling
1879
+ if (len(hq1) > 1) and (len(hq2) > 1):
1880
+ self.cx(lq1, lq2)
1881
+ self.cx(lq2, lq1)
1882
+ self.cx(lq1, lq2)
1883
+ return
1884
+
1890
1885
  anc1, anc2 = None, None
1891
1886
  if self.is_error_detection and not self._in_gadget_capture and ((len(hq1) > 1) or (len(hq2) > 1)):
1892
1887
  t_sims = {y[0] for y in hq2 if y[0] >= 0}
@@ -1902,6 +1897,9 @@ class QrackAceBackend:
1902
1897
  self.cx(lq2, anc2)
1903
1898
  self._in_gadget_capture = False
1904
1899
 
1900
+ self._correct(lq1)
1901
+ self._correct(lq2)
1902
+
1905
1903
  # Partial-match cases: one side is a simple (single-replica) qubit,
1906
1904
  # the other has multiple replicas. For the multi-replica side's
1907
1905
  # non-matching replicas, the correct decomposition (verified
@@ -2001,10 +1999,6 @@ class QrackAceBackend:
2001
1999
  self.mcx([c1, c2], t)
2002
2000
  return
2003
2001
 
2004
- if not self._in_gadget_capture:
2005
- self._correct(c1)
2006
- self._correct(c2)
2007
-
2008
2002
  # Control-protection ancillas (anc1/anc1b/anc2/anc2b, checking
2009
2003
  # whether c1/c2's own values held still) removed entirely, same
2010
2004
  # basis as _apply_coupling: instrumented and stress-tested
@@ -2070,6 +2064,9 @@ class QrackAceBackend:
2070
2064
  self.ccx(c1, c2, anc_and)
2071
2065
  self._in_gadget_capture = False
2072
2066
 
2067
+ self._correct(c1)
2068
+ self._correct(c2)
2069
+
2073
2070
  qb1, _ = QrackAceBackend._get_qb_lhv_indices(hq1)
2074
2071
  qb2, _ = QrackAceBackend._get_qb_lhv_indices(hq2)
2075
2072
  qbt, _ = QrackAceBackend._get_qb_lhv_indices(hqt)
@@ -2136,6 +2133,8 @@ class QrackAceBackend:
2136
2133
  for (b1, b2, bt) in witnesses:
2137
2134
  self.sim[b1[0]].mcx([b1[1], b2[1]], bt[1])
2138
2135
 
2136
+ self._correct(t)
2137
+
2139
2138
  self._in_gadget_capture = True
2140
2139
 
2141
2140
  if anc_and is not None:
@@ -2153,9 +2152,6 @@ class QrackAceBackend:
2153
2152
 
2154
2153
  self._in_gadget_capture = False
2155
2154
 
2156
- if not self._in_gadget_capture:
2157
- self._correct(t)
2158
-
2159
2155
  def ccz(self, c1, c2, t):
2160
2156
  self.h(t)
2161
2157
  self.ccx(c1, c2, t)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cpu-complex128
3
- Version: 2.26.0
3
+ Version: 2.26.1
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -17,6 +17,9 @@ pyqrack/qrack_stabilizer.py
17
17
  pyqrack/quimb_circuit_type.py
18
18
  pyqrack/qrack_system/__init__.py
19
19
  pyqrack/qrack_system/qrack_system.py
20
+ pyqrack/qrack_system/qrack_cl_precompile/qrack_cl_precompile
21
+ pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.so
22
+ pyqrack/qrack_system/qrack_lib/libqrack_pinvoke.so.10.13.1
20
23
  pyqrack/stats/__init__.py
21
24
  pyqrack/stats/load_quantized_data.py
22
25
  pyqrack/stats/quantize_by_range.py
@@ -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.26.0"
10
+ VERSION = "2.26.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')