pyqrack-complex128 2.26.2__tar.gz → 2.26.4__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 (30) hide show
  1. {pyqrack_complex128-2.26.2/pyqrack_complex128.egg-info → pyqrack_complex128-2.26.4}/PKG-INFO +1 -1
  2. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_ace_backend.py +16 -16
  3. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4/pyqrack_complex128.egg-info}/PKG-INFO +1 -1
  4. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/setup.py +1 -1
  5. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/LICENSE +0 -0
  6. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/MANIFEST.in +0 -0
  7. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/Makefile +0 -0
  8. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/README.md +0 -0
  9. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyproject.toml +0 -0
  10. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/__init__.py +0 -0
  11. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/neuron_activation_fn.py +0 -0
  12. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/pauli.py +0 -0
  13. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_circuit.py +0 -0
  14. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_near_clifford_qec_backend.py +0 -0
  15. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_neuron.py +0 -0
  16. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_neuron_torch_layer.py +0 -0
  17. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_simulator.py +0 -0
  18. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_stabilizer.py +0 -0
  19. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_system/__init__.py +0 -0
  20. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/qrack_system/qrack_system.py +0 -0
  21. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/quimb_circuit_type.py +0 -0
  22. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/stats/__init__.py +0 -0
  23. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/stats/load_quantized_data.py +0 -0
  24. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack/stats/quantize_by_range.py +0 -0
  25. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack_complex128.egg-info/SOURCES.txt +0 -0
  26. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack_complex128.egg-info/dependency_links.txt +0 -0
  27. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack_complex128.egg-info/not-zip-safe +0 -0
  28. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack_complex128.egg-info/requires.txt +0 -0
  29. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/pyqrack_complex128.egg-info/top_level.txt +0 -0
  30. {pyqrack_complex128-2.26.2 → pyqrack_complex128-2.26.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-complex128
3
- Version: 2.26.2
3
+ Version: 2.26.4
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -1542,7 +1542,13 @@ class QrackAceBackend:
1542
1542
  anc1 = None
1543
1543
  if self.is_boundary_repetition_code and (not self._in_gadget_capture) and lq1_lr and (not lq2_lr):
1544
1544
  # Encode:
1545
- anc1 = self._rep_code_ancilla_lq[hq1[0][0]]
1545
+ anc_sim = hq1[0][0]
1546
+ t_sims = {y[0] for y in hq2 if y[0] >= 0}
1547
+ for x in hq1:
1548
+ if x[0] in t_sims:
1549
+ anc_sim = x[0]
1550
+ break
1551
+ anc1 = self._detect_ancilla2_lq[anc_sim]
1546
1552
  self._in_gadget_capture = True
1547
1553
  self.cx(lq2, anc1)
1548
1554
  self._in_gadget_capture = False
@@ -2873,7 +2879,7 @@ class QrackAceBackend:
2873
2879
  return tgt
2874
2880
 
2875
2881
  # Designed by Dan, Elara (ChatGPT), and (Anthropic) Claude:
2876
- def create_noise_model(self, x=0.5, y=0.5):
2882
+ def create_noise_model(self, x=0.25, y=0.25):
2877
2883
  if not _IS_QISKIT_AER_AVAILABLE:
2878
2884
  raise RuntimeError(
2879
2885
  "Before trying to run_qiskit_circuit() with QrackAceBackend, you must install Qiskit Aer!"
@@ -2881,17 +2887,10 @@ class QrackAceBackend:
2881
2887
  noise_model = NoiseModel()
2882
2888
 
2883
2889
  def _uncommon_sim_fraction(lq1, lq2):
2884
- sims1 = [qb[0] for qb in self._qubits[lq1]]
2885
- sims2 = [qb[0] for qb in self._qubits[lq2]]
2886
- n = 0
2887
- for s in sims1:
2888
- if s not in sims2:
2889
- n += 1
2890
- for s in sims2:
2891
- if s not in sims1:
2892
- n += 1
2893
-
2894
- return n / (len(sims1) + len(sims2))
2890
+ sims1 = {qb[0] for qb in self._qubits[lq1]}
2891
+ sims2 = {qb[0] for qb in self._qubits[lq2]}
2892
+
2893
+ return len(sims1 ^ sims2) / len(sims1.union(sims2))
2895
2894
 
2896
2895
  coupling_map = self.get_logical_coupling_map()
2897
2896
 
@@ -2947,6 +2946,7 @@ class QrackAceBackend:
2947
2946
 
2948
2947
  sp = (1 - self._sdrp / 2) ** c
2949
2948
  p = (1 - x) ** u
2949
+ d = 1 - ((1 - y) ** u)
2950
2950
 
2951
2951
  # cx/cy/cz: single-qubit, TARGET-only error, with the gate's
2952
2952
  # own generator as the Pauli type -- derived directly from
@@ -2971,7 +2971,7 @@ class QrackAceBackend:
2971
2971
  # anc2 verifying b) are structurally live exactly when a
2972
2972
  # itself is boundary -- see the comment above this loop.
2973
2973
  # Damp accordingly.
2974
- p_shadow_ccz *= y
2974
+ p_shadow_ccz *= d
2975
2975
  noise_model.add_quantum_error(
2976
2976
  pauli_error([("ZI", p_shadow_ccz), ("II", 1 - p_shadow_ccz)]), "cz", [a, b]
2977
2977
  )
@@ -3057,7 +3057,7 @@ class QrackAceBackend:
3057
3057
  if (is_a_simple != is_b_simple) and has_match:
3058
3058
  p_net_swap = 2 * p * (1 - p)
3059
3059
  if self.is_error_detection:
3060
- p_net_swap *= y
3060
+ p_net_swap *= d
3061
3061
  if is_a_simple:
3062
3062
  # a is bulk, b is boundary -> error lands on b
3063
3063
  noise_model.add_quantum_error(
@@ -3108,7 +3108,7 @@ class QrackAceBackend:
3108
3108
  # from a different gate (the now-protected native
3109
3109
  # swap, not
3110
3110
  # this cz component).
3111
- p_cz *= y
3111
+ p_cz *= d
3112
3112
  p_net_iswap = p_net_swap * (1 - p_cz) + p_cz * (1 - p_net_swap)
3113
3113
  if is_a_simple:
3114
3114
  terms = [("II", 1 - p_net_iswap), ("ZI", p_net_iswap)]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrack-complex128
3
- Version: 2.26.2
3
+ Version: 2.26.4
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 = "2.26.2"
10
+ VERSION = "2.26.4"
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')