PyQrackIsing 9.3.1__py3-none-win_amd64.whl → 9.3.2__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.
@@ -85,7 +85,7 @@ def expected_closeness_weight(n_rows, n_cols, hamming_weight):
85
85
  def sample_hamming_weight(thresholds, shots):
86
86
  hamming_samples = np.zeros(shots, dtype=np.int32)
87
87
  for s in range(shots):
88
- hamming_samples[s] = sample_mag(thresholds)
88
+ hamming_samples[s] = sample_mag(thresholds) + 1
89
89
 
90
90
  return hamming_samples
91
91
 
@@ -488,7 +488,7 @@ def sample_mag(cum_prob):
488
488
  while True:
489
489
  m = (left + right) >> 1
490
490
 
491
- if (cum_prob[m] >= p) and ((m == 0) or cum_prob[m - 1] < p):
491
+ if (cum_prob[m] >= p) and ((m == 0) or (cum_prob[m - 1] < p)):
492
492
  break
493
493
 
494
494
  if cum_prob[m] < p:
@@ -496,7 +496,7 @@ def sample_mag(cum_prob):
496
496
  else:
497
497
  right = m - 1
498
498
 
499
- return m + 1
499
+ return m
500
500
 
501
501
 
502
502
  @njit
pyqrackising/otoc.py CHANGED
@@ -121,10 +121,6 @@ def generate_otoc_samples(J=-1.0, h=2.0, z=4, theta=0.174532925199432957, t=5, n
121
121
  bases = { 'X': basis_x, 'Y': basis_y, 'Z': basis_z }
122
122
  thresholds = { key: fix_cdf(value) for key, value in get_otoc_hamming_distribution(J, h, z, theta, t, n_qubits, cycles, pauli_string).items() }
123
123
 
124
- samples_3_axis = {}
125
- for key, value in thresholds.items():
126
- basis = bases[key]
127
-
128
124
  samples = []
129
125
  for _ in range(shots):
130
126
  sample_3_axis = { 'X': 0, 'Y': 0, 'Z': 0 }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyqrackising
3
- Version: 9.3.1
3
+ Version: 9.3.2
4
4
  Summary: Fast MAXCUT, TSP, and sampling heuristics from near-ideal transverse field Ising model (TFIM)
5
5
  Home-page: https://github.com/vm6502q/PyQrackIsing
6
6
  Author: Dan Strano
@@ -1,12 +1,12 @@
1
1
  pyqrackising/__init__.py,sha256=MWxOmzFfQ2csz2A6o30Kf8zQvEtd996d3dz4kYaLtHM,898
2
2
  pyqrackising/convert_tensor_network_to_tsp.py,sha256=55ajnvdBXFgf-Tx8Ck4i_tXOWULft3LZd_xz5Z6s4qw,3547
3
- pyqrackising/generate_tfim_samples.py,sha256=NZh9dMW7RurMkfawFLdWI8WFZmXS5CTosTQDrwCBOSk,4503
3
+ pyqrackising/generate_tfim_samples.py,sha256=kVrY983JKvglX8_81qnvuVSRJlFFv5CmpmK3-l5-Z2g,4507
4
4
  pyqrackising/kernels.cl,sha256=YLWWyWxd38VzB_SbhSPaVtz0EHzLiat7oINtzR7moXQ,27861
5
5
  pyqrackising/maxcut_tfim.py,sha256=U1nNjyfMS48TtTQk7TRf5_VF3pVPfAcZEa2awc2nR8k,10862
6
6
  pyqrackising/maxcut_tfim_sparse.py,sha256=eenJNSEwRvgwACfKoH0tj6rpn7uqH6nNTBuxUPh_lDg,11941
7
7
  pyqrackising/maxcut_tfim_streaming.py,sha256=FkBsRoXSRhv4gUeN9O7Ivx54oxq_SqiCDKnYsyxU4bs,6664
8
- pyqrackising/maxcut_tfim_util.py,sha256=D5tIbfKVLazR6f_INAoFypNJA0iuPin_bkiIM7-_pvg,16937
9
- pyqrackising/otoc.py,sha256=srF_Ruw57fkmJegurnHvT9OJad1-sVjFzyoeU8o-lxQ,5633
8
+ pyqrackising/maxcut_tfim_util.py,sha256=nMLrbvDMsCtVgbS4vbRNSZYpdne5YzdifjlQbbWmKjU,16935
9
+ pyqrackising/otoc.py,sha256=4NxbkAs1a4MAmlaX8-GxNd4p28x53INXhWNlzdMl4f4,5535
10
10
  pyqrackising/spin_glass_solver.py,sha256=tgmdJ6b1TetnFM--QEzOZFsNkquQYRVYiHVSzIGYvMI,14207
11
11
  pyqrackising/spin_glass_solver_sparse.py,sha256=cmXfAR43n1beRk4LaQbwfrQWkkhMPzPXpdK2T1HhQrk,15159
12
12
  pyqrackising/spin_glass_solver_streaming.py,sha256=joQLMKotgjQMwbG0msv_AookiWva_AiVBIR0Xr1Unho,10310
@@ -14,8 +14,8 @@ pyqrackising/tfim_magnetization.py,sha256=On1MhCNGGHRxJFRmCOpMcdqQJiy25gWkjz0Ka8
14
14
  pyqrackising/tfim_square_magnetization.py,sha256=9uJCT8ytyufcGFrZiignjCkWJr9UcP44sAAy0BIBw34,531
15
15
  pyqrackising/tsp.py,sha256=k8VK6fKw_niR-dVz8MyOT7LedABIwTzcSkhTOircYBg,64290
16
16
  pyqrackising/tsp_maxcut.py,sha256=lEDruz5lhjVu0ufvH5VaMJW3_nohO-rEijJJabEtuSU,10084
17
- pyqrackising-9.3.1.dist-info/licenses/LICENSE.md,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
18
- pyqrackising-9.3.1.dist-info/METADATA,sha256=lJdxNPFnPgnnzIj9X5Ya2GrlEFbKajhhJk8guMjW9LM,1170
19
- pyqrackising-9.3.1.dist-info/WHEEL,sha256=ZjXRCNaQ9YSypEK2TE0LRB0sy2OVXSszb4Sx1XjM99k,97
20
- pyqrackising-9.3.1.dist-info/top_level.txt,sha256=bxlfGuLwzeVEI8Jm5D9HvC_WedgvvkSrpFwbGDjg-Ag,13
21
- pyqrackising-9.3.1.dist-info/RECORD,,
17
+ pyqrackising-9.3.2.dist-info/licenses/LICENSE.md,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
18
+ pyqrackising-9.3.2.dist-info/METADATA,sha256=mbUOGOVPTUShx-U_rj57VGliVYJnpulkOf0nHKw_l0g,1170
19
+ pyqrackising-9.3.2.dist-info/WHEEL,sha256=ZjXRCNaQ9YSypEK2TE0LRB0sy2OVXSszb4Sx1XjM99k,97
20
+ pyqrackising-9.3.2.dist-info/top_level.txt,sha256=bxlfGuLwzeVEI8Jm5D9HvC_WedgvvkSrpFwbGDjg-Ag,13
21
+ pyqrackising-9.3.2.dist-info/RECORD,,