pyqrack-cuda 1.46.4__tar.gz → 1.46.6__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.
- {pyqrack_cuda-1.46.4/pyqrack_cuda.egg-info → pyqrack_cuda-1.46.6}/PKG-INFO +1 -1
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_ace_backend.py +8 -13
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6/pyqrack_cuda.egg-info}/PKG-INFO +1 -1
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/setup.py +1 -1
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/LICENSE +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/MANIFEST.in +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/Makefile +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/README.md +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyproject.toml +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/__init__.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/neuron_activation_fn.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/pauli.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_circuit.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_neuron.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_neuron_torch_layer.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_simulator.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_stabilizer.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_system/__init__.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/qrack_system/qrack_system.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/quimb_circuit_type.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/stats/__init__.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/stats/load_quantized_data.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack/stats/quantize_by_range.py +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/SOURCES.txt +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/dependency_links.txt +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/not-zip-safe +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/requires.txt +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/pyqrack_cuda.egg-info/top_level.txt +0 -0
- {pyqrack_cuda-1.46.4 → pyqrack_cuda-1.46.6}/setup.cfg +0 -0
@@ -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
|
-
|
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
|
-
|
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
|
518
|
-
rows = list(range(
|
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 =
|
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.
|
529
|
+
clone = self.clone()
|
535
530
|
_sample = clone.m_all()
|
536
531
|
sample = 0
|
537
532
|
for i in range(len(q)):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|