pyqrack-cpu-complex128 2.29.4__tar.gz → 2.29.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.
- {pyqrack_cpu_complex128-2.29.4/pyqrack_cpu_complex128.egg-info → pyqrack_cpu_complex128-2.29.5}/PKG-INFO +1 -1
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_ace_backend.py +51 -4
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5/pyqrack_cpu_complex128.egg-info}/PKG-INFO +1 -1
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/setup.py +1 -1
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/LICENSE +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/MANIFEST.in +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/Makefile +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/README.md +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyproject.toml +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/__init__.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/neuron_activation_fn.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/pauli.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_ace_mps_backend.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_circuit.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_near_clifford_qec_backend.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_neuron.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_neuron_torch_layer.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_simulator.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_stabilizer.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_system/__init__.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_system/qrack_system.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/quimb_circuit_type.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/stats/__init__.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/stats/load_quantized_data.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/stats/quantize_by_range.py +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack_cpu_complex128.egg-info/SOURCES.txt +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack_cpu_complex128.egg-info/dependency_links.txt +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack_cpu_complex128.egg-info/not-zip-safe +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack_cpu_complex128.egg-info/requires.txt +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack_cpu_complex128.egg-info/top_level.txt +0 -0
- {pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/setup.cfg +0 -0
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_ace_backend.py
RENAMED
|
@@ -429,6 +429,7 @@ class QrackAceBackend:
|
|
|
429
429
|
# exactly mirroring how every other per-simulator allocation below
|
|
430
430
|
# already guards for "nothing to allocate."
|
|
431
431
|
has_boundary = self.use_crossbars and (boundary_count > 0)
|
|
432
|
+
self._crossbar_sim = boundary_sim_id if has_boundary else None
|
|
432
433
|
if has_boundary:
|
|
433
434
|
sim_counts.append(boundary_count)
|
|
434
435
|
sim_count += 1
|
|
@@ -1603,6 +1604,54 @@ class QrackAceBackend:
|
|
|
1603
1604
|
|
|
1604
1605
|
return connected, boundary
|
|
1605
1606
|
|
|
1607
|
+
def _update_lineage(self, lq1, hq1, lq2, hq2):
|
|
1608
|
+
# Lineage-tracking authority: a replica stays "clean" only while every
|
|
1609
|
+
# coupling it has taken part in was a REAL gate with a clean replica of
|
|
1610
|
+
# the partner. The authority for each participant becomes the clean
|
|
1611
|
+
# replicas that just met a clean partner replica in a shared simulator.
|
|
1612
|
+
# A replica with an unbroken real-gate history holds the qubit's full
|
|
1613
|
+
# coherent state, including entanglement accumulated across several
|
|
1614
|
+
# couplings -- e.g. the shared crossbar simulator, which holds a replica
|
|
1615
|
+
# of every boundary qubit, keeps a seam-to-seam subcircuit fully
|
|
1616
|
+
# coherent across every patch boundary. Only if no clean pair shares a
|
|
1617
|
+
# simulator does it fall back to the plain fresh-copy rule.
|
|
1618
|
+
if (not self.is_boundary_repetition_code) or self._in_gadget_capture or (lq1 is None) or (lq2 is None):
|
|
1619
|
+
return
|
|
1620
|
+
if (len(hq1) < 2) and (len(hq2) < 2):
|
|
1621
|
+
return
|
|
1622
|
+
|
|
1623
|
+
def clean(lq, hq):
|
|
1624
|
+
a = self._authority.get(lq) if len(hq) > 1 else None
|
|
1625
|
+
return set(range(len(hq))) if a is None else set(a)
|
|
1626
|
+
|
|
1627
|
+
c1, c2 = clean(lq1, hq1), clean(lq2, hq2)
|
|
1628
|
+
new1 = {i for i in c1 if any(hq1[i][0] == hq2[j][0] for j in c2)}
|
|
1629
|
+
new2 = {j for j in c2 if any(hq1[i][0] == hq2[j][0] for i in c1)}
|
|
1630
|
+
if not new1:
|
|
1631
|
+
sims2 = {b[0] for b in hq2}
|
|
1632
|
+
new1 = {i for i, b in enumerate(hq1) if b[0] in sims2}
|
|
1633
|
+
sims1 = {b[0] for b in hq1}
|
|
1634
|
+
new2 = {j for j, b in enumerate(hq2) if b[0] in sims1}
|
|
1635
|
+
# When both participants are boundary qubits, their crossbar replicas
|
|
1636
|
+
# (one shared simulator for every boundary qubit in the grid) are the
|
|
1637
|
+
# only copies guaranteed to see the WHOLE seam-to-seam history; copies
|
|
1638
|
+
# in a patch simulator can be left holding a pairwise correlation that
|
|
1639
|
+
# a later coupling elsewhere has made stale. So a clean crossbar pair
|
|
1640
|
+
# becomes the sole authority.
|
|
1641
|
+
cb = self._crossbar_sim
|
|
1642
|
+
if (cb is not None) and (len(hq1) > 1) and (len(hq2) > 1):
|
|
1643
|
+
i_cb = [i for i in new1 if hq1[i][0] == cb]
|
|
1644
|
+
j_cb = [j for j in new2 if hq2[j][0] == cb]
|
|
1645
|
+
if i_cb and j_cb:
|
|
1646
|
+
new1, new2 = set(i_cb), set(j_cb)
|
|
1647
|
+
for lq, hq, new in ((lq1, hq1, new1), (lq2, hq2, new2)):
|
|
1648
|
+
if len(hq) < 2 or not new:
|
|
1649
|
+
continue
|
|
1650
|
+
if len(new) == len(hq):
|
|
1651
|
+
self._authority.pop(lq, None)
|
|
1652
|
+
else:
|
|
1653
|
+
self._authority[lq] = new
|
|
1654
|
+
|
|
1606
1655
|
def _set_authority(self, lq, hq, partner_hq):
|
|
1607
1656
|
# Record which replica slot(s) of boundary qubit lq just received a
|
|
1608
1657
|
# REAL coupling gate (they share a simulator with the partner). See
|
|
@@ -1658,8 +1707,7 @@ class QrackAceBackend:
|
|
|
1658
1707
|
gate_fn, shadow_fn = self._get_gate(pauli, anti, sim_id)
|
|
1659
1708
|
_, idx2 = hq2[i]
|
|
1660
1709
|
gate_fn([idx1], idx2)
|
|
1661
|
-
self.
|
|
1662
|
-
self._set_authority(lq2, hq2, hq1)
|
|
1710
|
+
self._update_lineage(lq1, hq1, lq2, hq2)
|
|
1663
1711
|
return
|
|
1664
1712
|
|
|
1665
1713
|
# Logical-level error-detection gadget: an earlier version of this
|
|
@@ -1761,8 +1809,7 @@ class QrackAceBackend:
|
|
|
1761
1809
|
shadow_fn(b1, b2)
|
|
1762
1810
|
shadow_targets.append(b2)
|
|
1763
1811
|
|
|
1764
|
-
self.
|
|
1765
|
-
self._set_authority(lq2, hq2, hq1)
|
|
1812
|
+
self._update_lineage(lq1, hq1, lq2, hq2)
|
|
1766
1813
|
|
|
1767
1814
|
if not self._in_gadget_capture:
|
|
1768
1815
|
if pauli != Pauli.PauliZ:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/neuron_activation_fn.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_ace_mps_backend.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_neuron_torch_layer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_system/__init__.py
RENAMED
|
File without changes
|
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/qrack_system/qrack_system.py
RENAMED
|
File without changes
|
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/quimb_circuit_type.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/stats/load_quantized_data.py
RENAMED
|
File without changes
|
{pyqrack_cpu_complex128-2.29.4 → pyqrack_cpu_complex128-2.29.5}/pyqrack/stats/quantize_by_range.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|