pyqrack-cpu 1.46.4__py3-none-win_amd64.whl → 1.46.6__py3-none-win_amd64.whl

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.

@@ -485,18 +485,12 @@ class QrackAceBackend:
485
485
  other_bits = [1, 2]
486
486
  # The syndrome of "other_bits" is guaranteed to be fixed, after this.
487
487
  self._correct(lq)
488
- syndrome = 0
489
- for q in other_bits:
490
- syndrome += self.sim.m(hq[q])
488
+ syndrome = self.sim.m(hq[other_bits[0]])
489
+ syndrome += self.sim.force_m(hq[other_bits[1]], bool(syndrome))
491
490
  # The two separable parts of the code are correlated,
492
491
  # but not non-locally, via entanglement.
493
492
  # Collapse the other separable part toward agreement.
494
- if syndrome == 0:
495
- self.sim.force_m(hq[single_bit], False)
496
- elif syndrome == 2:
497
- syndrome += self.sim.force_m(hq[single_bit], True)
498
- else:
499
- raise RuntimeError("Unexpected syndrome in m()!")
493
+ syndrome += self.sim.force_m(hq[single_bit], bool(syndrome))
500
494
  self._is_init[lq] = False
501
495
 
502
496
  return True if (syndrome > 1) else False
@@ -514,10 +508,11 @@ class QrackAceBackend:
514
508
  result = 0
515
509
  # Randomize the order of measurement to amortize error.
516
510
  # However, locality of collapse matters:
517
- # always measure across rows, and by consecutive rows.
518
- rows = list(range(range(self.col_length)))
511
+ # always measure across rows, and by row directionality.
512
+ rows = list(range(self.col_length))
513
+ random.shuffle(rows)
519
514
  for lq_row in rows:
520
- col_offset = rand.randint(0, self.row_length - 1)
515
+ col_offset = random.randint(0, self.row_length - 1)
521
516
  col_reverse = self.alternating_codes and (lq_row & 1)
522
517
  for c in range(self.row_length):
523
518
  lq_col = (((self.row_length - (c + 1)) if col_reverse else c) + col_offset) % self.row_length
@@ -531,7 +526,7 @@ class QrackAceBackend:
531
526
  if high_accuracy:
532
527
  samples = []
533
528
  for _ in range(s):
534
- clone = self.sim.clone()
529
+ clone = self.clone()
535
530
  _sample = clone.m_all()
536
531
  sample = 0
537
532
  for i in range(len(q)):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyqrack-cpu
3
- Version: 1.46.4
3
+ Version: 1.46.6
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -1,7 +1,7 @@
1
1
  pyqrack/__init__.py,sha256=9fGCYdEUg_AsENCDRylbrZvUMVbUajRTn3CyuFGuFyM,805
2
2
  pyqrack/neuron_activation_fn.py,sha256=GOqcCkiEB60jCojTrcuHuZMDP5aTOy0adtR8SY_2EZc,614
3
3
  pyqrack/pauli.py,sha256=TUm1SN_HLz3eMW9gD_eg-IYXcMCyr36mYSytq_ExZIU,673
4
- pyqrack/qrack_ace_backend.py,sha256=hivzNX-9fFI2nRI9vjKKOS7FTHh1EjWQWdiSmXWs-oc,31870
4
+ pyqrack/qrack_ace_backend.py,sha256=aiDdd-hZ36Ar6NmE-jKerwsL4W4O1xxABHxGJ4wLk4k,31740
5
5
  pyqrack/qrack_circuit.py,sha256=QK2dtPYurdXuw-efVq7lYz40_480NxCejXhOVwBGkXs,20122
6
6
  pyqrack/qrack_neuron.py,sha256=a3F0hduVvXZi9aXsY0du5hBFXpMq_R5UHHDOv2-YtFM,9305
7
7
  pyqrack/qrack_neuron_torch_layer.py,sha256=OhNSldzaqLaMoNBkin68j8QWOOiuZCQJDZPgSDRI2Fk,6330
@@ -10,12 +10,12 @@ pyqrack/qrack_stabilizer.py,sha256=AJe7dfFcxFKyig3tjWXw0UKhXer5Wl9QNvjNNqlOL5M,2
10
10
  pyqrack/quimb_circuit_type.py,sha256=iC0CCpZBGhziFC8-uBCH43Mi29uvVUrtBG6W9YBlyps,638
11
11
  pyqrack/qrack_system/__init__.py,sha256=PUterej-xpA4BqFmiBrQCMeTQlsRf-K8Dxnwp-iVvUQ,343
12
12
  pyqrack/qrack_system/qrack_system.py,sha256=L4OHVmw1HQlLagkQN4xUweDuB0tn5-lK4vzjplDt_hw,43950
13
- pyqrack/qrack_system/qrack_lib/qrack_pinvoke.dll,sha256=qzPC59wqYEoGSwhAMF0njWh1Snrzvx7RAZbU5lkjEog,1740288
13
+ pyqrack/qrack_system/qrack_lib/qrack_pinvoke.dll,sha256=q01RIcdBixqd7HyjH5F2JQFDMVZ_yASVKzYVnP4nBI8,1740288
14
14
  pyqrack/stats/__init__.py,sha256=hI715MGW7D4mDYhUFpRI4ZLsynYDO4tN-rjsuuYbG6Q,282
15
15
  pyqrack/stats/load_quantized_data.py,sha256=_1w9BPrZNreP0wOAyaAZHdEGKoGiI7tMeFD9P3eyJC0,1219
16
16
  pyqrack/stats/quantize_by_range.py,sha256=0eBIqByIxa4vfm4fQGZLAMGR9y8raxde3e5rvUWJ_dQ,2326
17
- pyqrack_cpu-1.46.4.dist-info/LICENSE,sha256=IdAVedmFOPQtHi_XeEI9OhJwUuwlT6tCJwrT55zAn3w,1090
18
- pyqrack_cpu-1.46.4.dist-info/METADATA,sha256=y11oAnqrn9p0E34uEDkeTazlR-w-BOYW5A6lyAGUizQ,6560
19
- pyqrack_cpu-1.46.4.dist-info/WHEEL,sha256=JMWfR_Dj7ISokcwe0cBhCfK6JKnIi-ZX11L6d_ntt6o,98
20
- pyqrack_cpu-1.46.4.dist-info/top_level.txt,sha256=YE_3q9JTGRLMilNg2tGP1y7uU-Dx8PDao2OhwoIbv8E,8
21
- pyqrack_cpu-1.46.4.dist-info/RECORD,,
17
+ pyqrack_cpu-1.46.6.dist-info/LICENSE,sha256=IdAVedmFOPQtHi_XeEI9OhJwUuwlT6tCJwrT55zAn3w,1090
18
+ pyqrack_cpu-1.46.6.dist-info/METADATA,sha256=ZeBVpsXZ7ebbsjvZAvCmjtG1_xxWNLMLVJmqaXYI7zc,6560
19
+ pyqrack_cpu-1.46.6.dist-info/WHEEL,sha256=JMWfR_Dj7ISokcwe0cBhCfK6JKnIi-ZX11L6d_ntt6o,98
20
+ pyqrack_cpu-1.46.6.dist-info/top_level.txt,sha256=YE_3q9JTGRLMilNg2tGP1y7uU-Dx8PDao2OhwoIbv8E,8
21
+ pyqrack_cpu-1.46.6.dist-info/RECORD,,