pyqrack-cuda 1.44.19__tar.gz → 1.44.21__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.44.19/pyqrack_cuda.egg-info → pyqrack_cuda-1.44.21}/PKG-INFO +1 -1
  2. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/qrack_ace_backend.py +41 -35
  3. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21/pyqrack_cuda.egg-info}/PKG-INFO +1 -1
  4. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/setup.py +1 -1
  5. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/LICENSE +0 -0
  6. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/MANIFEST.in +0 -0
  7. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/Makefile +0 -0
  8. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/README.md +0 -0
  9. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyproject.toml +0 -0
  10. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/__init__.py +0 -0
  11. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/neuron_activation_fn.py +0 -0
  12. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/pauli.py +0 -0
  13. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/qrack_circuit.py +0 -0
  14. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/qrack_neuron.py +0 -0
  15. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  16. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/qrack_simulator.py +0 -0
  17. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/qrack_stabilizer.py +0 -0
  18. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/qrack_system/__init__.py +0 -0
  19. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/qrack_system/qrack_system.py +0 -0
  20. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/quimb_circuit_type.py +0 -0
  21. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/stats/__init__.py +0 -0
  22. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/stats/load_quantized_data.py +0 -0
  23. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack/stats/quantize_by_range.py +0 -0
  24. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack_cuda.egg-info/SOURCES.txt +0 -0
  25. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack_cuda.egg-info/dependency_links.txt +0 -0
  26. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack_cuda.egg-info/not-zip-safe +0 -0
  27. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack_cuda.egg-info/requires.txt +0 -0
  28. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/pyqrack_cuda.egg-info/top_level.txt +0 -0
  29. {pyqrack_cuda-1.44.19 → pyqrack_cuda-1.44.21}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cuda
3
- Version: 1.44.19
3
+ Version: 1.44.21
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -142,7 +142,7 @@ class QrackAceBackend:
142
142
  case 3:
143
143
  syndrome[2] += 1
144
144
 
145
- row = (hq[0] // 3) // self.row_length
145
+ row = lq // self.row_length
146
146
  even_row = not (row & 1)
147
147
  single_bit = 0
148
148
  other_bits = []
@@ -155,7 +155,7 @@ class QrackAceBackend:
155
155
 
156
156
  max_syndrome = max(syndrome)
157
157
  force_syndrome = True
158
- if (2 * max_syndrome) >= shots:
158
+ if (2 * max_syndrome) > shots:
159
159
  # There is an error.
160
160
  error_bit = syndrome.index(max_syndrome)
161
161
  if error_bit == single_bit:
@@ -201,69 +201,73 @@ class QrackAceBackend:
201
201
  lm -= 2 * math.pi
202
202
  while lm <= -math.pi:
203
203
  lm += 2 * math.pi
204
+ hq = self._unpack(lq)
204
205
  if not math.isclose(ph, -lm) and not math.isclose(abs(ph), math.pi / 2):
205
206
  self._correct_if_like_h(th, lq)
206
- hq = self._unpack(lq)
207
- self._decode(hq)
208
- self.sim.u(hq[0], th, ph, lm)
209
- self._encode(hq)
207
+ self._decode(hq)
208
+ self.sim.u(hq[0], th, ph, lm)
209
+ self._encode(hq)
210
+ else:
211
+ for b in hq:
212
+ self.sim.u(b, th, ph, lm)
210
213
 
211
214
  def r(self, p, th, lq):
215
+ while th > math.pi:
216
+ th -= 2 * math.pi
217
+ while th <= -math.pi:
218
+ th += 2 * math.pi
212
219
  if p == Pauli.PauliY:
213
220
  self._correct_if_like_h(th, lq)
214
221
  hq = self._unpack(lq)
222
+ if (p == Pauli.PauliZ) or math.isclose(abs(th), math.pi):
223
+ for b in hq:
224
+ self.sim.r(p, th, b)
225
+ else:
226
+ self._decode(hq)
227
+ self.sim.r(p, th, hq[0])
228
+ self._encode(hq)
229
+
230
+ def h(self, lq):
231
+ self._correct(lq)
232
+ hq = self._unpack(lq)
215
233
  self._decode(hq)
216
- self.sim.r(p, th, hq[0])
234
+ self.sim.h(hq[0])
217
235
  self._encode(hq)
218
236
 
219
237
  def s(self, lq):
220
238
  hq = self._unpack(lq)
221
- self._decode(hq)
222
- self.sim.s(hq[0])
223
- self._encode(hq)
239
+ for b in hq:
240
+ self.sim.s(b)
224
241
 
225
242
  def adjs(self, lq):
226
243
  hq = self._unpack(lq)
227
- self._decode(hq)
228
- self.sim.adjs(hq[0])
229
- self._encode(hq)
244
+ for b in hq:
245
+ self.sim.adjs(b)
230
246
 
231
247
  def x(self, lq):
232
248
  hq = self._unpack(lq)
233
- self._decode(hq)
234
- self.sim.x(hq[0])
235
- self._encode(hq)
249
+ for b in hq:
250
+ self.sim.x(b)
236
251
 
237
252
  def y(self, lq):
238
253
  hq = self._unpack(lq)
239
- self._decode(hq)
240
- self.sim.y(hq[0])
241
- self._encode(hq)
254
+ for b in hq:
255
+ self.sim.y(b)
242
256
 
243
257
  def z(self, lq):
244
258
  hq = self._unpack(lq)
245
- self._decode(hq)
246
- self.sim.z(hq[0])
247
- self._encode(hq)
248
-
249
- def h(self, lq):
250
- self._correct(lq)
251
- hq = self._unpack(lq)
252
- self._decode(hq)
253
- self.sim.h(hq[0])
254
- self._encode(hq)
259
+ for b in hq:
260
+ self.sim.z(b)
255
261
 
256
262
  def t(self, lq):
257
263
  hq = self._unpack(lq)
258
- self._decode(hq)
259
- self.sim.t(hq[0])
260
- self._encode(hq)
264
+ for b in hq:
265
+ self.sim.t(b)
261
266
 
262
267
  def adjt(self, lq):
263
268
  hq = self._unpack(lq)
264
- self._decode(hq)
265
- self.sim.adjt(hq[0])
266
- self._encode(hq)
269
+ for b in hq:
270
+ self.sim.adjt(b)
267
271
 
268
272
  def _cpauli(self, lq1, lq2, anti, pauli):
269
273
  self._correct(lq1)
@@ -290,6 +294,7 @@ class QrackAceBackend:
290
294
  hq1 = None
291
295
  hq2 = None
292
296
  if (lq2_col == lq1_col) and (((lq1_row + 1) % self.row_length) == lq2_row):
297
+ self._correct(lq2)
293
298
  hq1 = self._unpack(lq1, True)
294
299
  hq2 = self._unpack(lq2, False)
295
300
  self._decode(hq1, True)
@@ -298,6 +303,7 @@ class QrackAceBackend:
298
303
  self._encode(hq2, False)
299
304
  self._encode(hq1, True)
300
305
  elif (lq1_col == lq2_col) and (((lq2_row + 1) % self.row_length) == lq1_row):
306
+ self._correct(lq2)
301
307
  hq2 = self._unpack(lq2, True)
302
308
  hq1 = self._unpack(lq1, False)
303
309
  self._decode(hq2, True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-cuda
3
- Version: 1.44.19
3
+ Version: 1.44.21
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.19"
10
+ VERSION = "1.44.21"
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