pyqrack-cuda-complex128 2.2.0__tar.gz → 2.2.2__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_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/Makefile +1 -1
- {pyqrack_cuda_complex128-2.2.0/pyqrack_cuda_complex128.egg-info → pyqrack_cuda_complex128-2.2.2}/PKG-INFO +1 -1
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_ace_backend.py +37 -24
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2/pyqrack_cuda_complex128.egg-info}/PKG-INFO +1 -1
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/setup.py +1 -1
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/LICENSE +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/MANIFEST.in +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/README.md +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyproject.toml +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/__init__.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/neuron_activation_fn.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/pauli.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_circuit.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_near_clifford_qec_backend.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_neuron.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_neuron_torch_layer.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_simulator.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_stabilizer.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_system/__init__.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_system/qrack_system.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/quimb_circuit_type.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/stats/__init__.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/stats/load_quantized_data.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/stats/quantize_by_range.py +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack_cuda_complex128.egg-info/SOURCES.txt +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack_cuda_complex128.egg-info/dependency_links.txt +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack_cuda_complex128.egg-info/not-zip-safe +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack_cuda_complex128.egg-info/requires.txt +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack_cuda_complex128.egg-info/top_level.txt +0 -0
- {pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/setup.cfg +0 -0
|
@@ -30,7 +30,7 @@ build-deps:
|
|
|
30
30
|
rm -rf pyqrack/qrack_system/qrack_cl_precompile
|
|
31
31
|
ifneq ($(OS),Windows_NT)
|
|
32
32
|
ifeq ($(QRACK_PRESENT),)
|
|
33
|
-
git clone https://github.com/unitaryfund/qrack.git; cd qrack; git checkout
|
|
33
|
+
git clone https://github.com/unitaryfund/qrack.git; cd qrack; git checkout ccb9cca0726e48c598696b51a66fb984ff8ab0f1; cd ..
|
|
34
34
|
endif
|
|
35
35
|
mkdir -p qrack/build
|
|
36
36
|
ifeq ($(UNAME_S),Linux)
|
{pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_ace_backend.py
RENAMED
|
@@ -326,14 +326,18 @@ class QrackAceBackend:
|
|
|
326
326
|
)
|
|
327
327
|
)
|
|
328
328
|
|
|
329
|
-
# You can still "
|
|
330
|
-
if "QRACK_QUNIT_SEPARABILITY_THRESHOLD" not in os.environ:
|
|
331
|
-
|
|
332
|
-
|
|
329
|
+
# You can still call "set_sdrp," after the constructor.
|
|
330
|
+
# if "QRACK_QUNIT_SEPARABILITY_THRESHOLD" not in os.environ:
|
|
331
|
+
# # (1 - 1 / sqrt(2)) / 4 (but empirically tuned)
|
|
332
|
+
# self.sim[i].set_sdrp(0.073223304703363119)
|
|
333
333
|
|
|
334
334
|
def clone(self):
|
|
335
335
|
return QrackAceBackend(to_clone=self)
|
|
336
336
|
|
|
337
|
+
def set_sdrp(self, sdrp):
|
|
338
|
+
for sim in self.sim:
|
|
339
|
+
sim.set_sdrp(sdrp)
|
|
340
|
+
|
|
337
341
|
def measure_shots_consensus(self, q, s, n_instances=3, threshold=0.1):
|
|
338
342
|
# Consensus measurement across n_instances independent clones.
|
|
339
343
|
#
|
|
@@ -590,7 +594,12 @@ class QrackAceBackend:
|
|
|
590
594
|
)
|
|
591
595
|
/ 7
|
|
592
596
|
)
|
|
593
|
-
|
|
597
|
+
eff_prob = (prms + (1 - qrms)) / 2
|
|
598
|
+
result = (
|
|
599
|
+
(random.random() < 0.5)
|
|
600
|
+
if (eff_prob - 0.5) == 0.0
|
|
601
|
+
else (eff_prob > 0.5)
|
|
602
|
+
)
|
|
594
603
|
syndrome = (
|
|
595
604
|
[1 - p[0], 1 - p[1], 1 - p[2], 1 - p[3], 1 - p[4]]
|
|
596
605
|
if result
|
|
@@ -639,7 +648,12 @@ class QrackAceBackend:
|
|
|
639
648
|
# Balancing suggestion from Elara (the custom OpenAI GPT)
|
|
640
649
|
prms = math.sqrt((p[0] ** 2 + p[1] ** 2 + p[2] ** 2) / 3)
|
|
641
650
|
qrms = math.sqrt(((1 - p[0]) ** 2 + (1 - p[1]) ** 2 + (1 - p[2]) ** 2) / 3)
|
|
642
|
-
|
|
651
|
+
eff_prob = (prms + (1 - qrms)) / 2
|
|
652
|
+
result = (
|
|
653
|
+
(random.random() < 0.5)
|
|
654
|
+
if (eff_prob - 0.5) == 0.0
|
|
655
|
+
else (eff_prob > 0.5)
|
|
656
|
+
)
|
|
643
657
|
syndrome = [1 - p[0], 1 - p[1], 1 - p[2]] if result else [p[0], p[1], p[2]]
|
|
644
658
|
for q in range(3):
|
|
645
659
|
if syndrome[q] > (0.5 + self._epsilon):
|
|
@@ -1125,12 +1139,12 @@ class QrackAceBackend:
|
|
|
1125
1139
|
else:
|
|
1126
1140
|
self.sim[b[0]].force_m(b[1], result)
|
|
1127
1141
|
|
|
1128
|
-
b = hq[
|
|
1142
|
+
b = hq[lhv]
|
|
1129
1143
|
b.reset()
|
|
1130
1144
|
if result:
|
|
1131
1145
|
b.x()
|
|
1132
1146
|
|
|
1133
|
-
return
|
|
1147
|
+
return result
|
|
1134
1148
|
|
|
1135
1149
|
def m_all(self):
|
|
1136
1150
|
# Randomize the order of measurement to amortize error.
|
|
@@ -1495,22 +1509,25 @@ class QrackAceBackend:
|
|
|
1495
1509
|
return self._coupling_map
|
|
1496
1510
|
|
|
1497
1511
|
coupling_map = set()
|
|
1498
|
-
|
|
1512
|
+
# self._row_length is the number of qubits per row (the row's span,
|
|
1513
|
+
# i.e. the column count); self._col_length is the number of rows.
|
|
1514
|
+
num_rows, num_cols = self._col_length, self._row_length
|
|
1499
1515
|
|
|
1500
|
-
#
|
|
1516
|
+
# Row-major logical index, strided by the actual row span.
|
|
1501
1517
|
def logical_index(row, col):
|
|
1502
|
-
return row *
|
|
1518
|
+
return row * num_cols + col
|
|
1503
1519
|
|
|
1504
|
-
for
|
|
1505
|
-
|
|
1506
|
-
for
|
|
1507
|
-
|
|
1520
|
+
for row in range(num_rows):
|
|
1521
|
+
connected_rows, _ = self._get_connected(row, True)
|
|
1522
|
+
for col in range(num_cols):
|
|
1523
|
+
connected_cols, _ = self._get_connected(col, False)
|
|
1508
1524
|
a = logical_index(row, col)
|
|
1509
|
-
for
|
|
1510
|
-
for
|
|
1525
|
+
for r in connected_rows:
|
|
1526
|
+
for c in connected_cols:
|
|
1511
1527
|
b = logical_index(r, c)
|
|
1512
1528
|
if a != b:
|
|
1513
1529
|
coupling_map.add((a, b))
|
|
1530
|
+
coupling_map.add((b, a))
|
|
1514
1531
|
|
|
1515
1532
|
self._coupling_map = sorted(coupling_map)
|
|
1516
1533
|
|
|
@@ -1524,9 +1541,11 @@ class QrackAceBackend:
|
|
|
1524
1541
|
)
|
|
1525
1542
|
noise_model = NoiseModel()
|
|
1526
1543
|
|
|
1527
|
-
# Single-qubit depolarizing only on boundary qubits
|
|
1528
1544
|
boundary_qubits = set()
|
|
1529
1545
|
for a, b in self.get_logical_coupling_map():
|
|
1546
|
+
if a > b:
|
|
1547
|
+
#Skip duplicates
|
|
1548
|
+
continue
|
|
1530
1549
|
col_a = a % self._row_length
|
|
1531
1550
|
col_b = b % self._row_length
|
|
1532
1551
|
is_long_a = self._is_col_long_range[col_a]
|
|
@@ -1537,12 +1556,6 @@ class QrackAceBackend:
|
|
|
1537
1556
|
if not is_long_b:
|
|
1538
1557
|
boundary_qubits.add(b)
|
|
1539
1558
|
|
|
1540
|
-
for q in boundary_qubits:
|
|
1541
|
-
for gate in ["u", "u1", "u2", "u3", "h", "x", "y", "z",
|
|
1542
|
-
"s", "sdg", "t", "tdg", "rx", "ry", "rz"]:
|
|
1543
|
-
noise_model.add_quantum_error(
|
|
1544
|
-
depolarizing_error(x, 1), gate, [q])
|
|
1545
|
-
|
|
1546
1559
|
# Two-qubit depolarizing on boundary-crossing and boundary-adjacent gates
|
|
1547
1560
|
for a, b in self.get_logical_coupling_map():
|
|
1548
1561
|
col_a = a % self._row_length
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/neuron_activation_fn.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_neuron_torch_layer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_system/__init__.py
RENAMED
|
File without changes
|
{pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/qrack_system/qrack_system.py
RENAMED
|
File without changes
|
{pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/quimb_circuit_type.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/pyqrack/stats/load_quantized_data.py
RENAMED
|
File without changes
|
{pyqrack_cuda_complex128-2.2.0 → pyqrack_cuda_complex128-2.2.2}/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
|