pyqrackising 9.5.10__py3-none-win_amd64.whl → 9.5.11__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.
Potentially problematic release.
This version of pyqrackising might be problematic. Click here for more details.
- pyqrackising/otoc.py +6 -6
- {pyqrackising-9.5.10.dist-info → pyqrackising-9.5.11.dist-info}/METADATA +1 -1
- {pyqrackising-9.5.10.dist-info → pyqrackising-9.5.11.dist-info}/RECORD +6 -6
- {pyqrackising-9.5.10.dist-info → pyqrackising-9.5.11.dist-info}/WHEEL +0 -0
- {pyqrackising-9.5.10.dist-info → pyqrackising-9.5.11.dist-info}/licenses/LICENSE.md +0 -0
- {pyqrackising-9.5.10.dist-info → pyqrackising-9.5.11.dist-info}/top_level.txt +0 -0
pyqrackising/otoc.py
CHANGED
|
@@ -141,7 +141,7 @@ def take_sample(n_qubits, sample, m, inv_dist):
|
|
|
141
141
|
return sample
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
def get_willow_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len):
|
|
144
|
+
def get_willow_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len, t):
|
|
145
145
|
inv_dist = np.zeros(n_qubits, dtype=np.float64)
|
|
146
146
|
for idx in butterfly_idx_x:
|
|
147
147
|
b_row, b_col = divmod(idx, row_len)
|
|
@@ -153,12 +153,12 @@ def get_willow_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col
|
|
|
153
153
|
for q in range(n_qubits):
|
|
154
154
|
q_row, q_col = divmod(q, row_len)
|
|
155
155
|
inv_dist[q] -= abs(q_row - b_row) + abs(q_col - b_col)
|
|
156
|
-
inv_dist = 2 ** inv_dist
|
|
156
|
+
inv_dist = 2 ** (inv_dist / t)
|
|
157
157
|
|
|
158
158
|
return inv_dist
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
def get_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len):
|
|
161
|
+
def get_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len, t):
|
|
162
162
|
inv_dist = np.zeros(n_qubits, dtype=np.float64)
|
|
163
163
|
half_row = row_len >> 1
|
|
164
164
|
half_col = col_len >> 1
|
|
@@ -184,7 +184,7 @@ def get_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len):
|
|
|
184
184
|
if col_d > half_col:
|
|
185
185
|
col_d = col_len - col_d
|
|
186
186
|
inv_dist[q] -= row_d + col_d
|
|
187
|
-
inv_dist = 2 ** inv_dist
|
|
187
|
+
inv_dist = 2 ** (inv_dist / t)
|
|
188
188
|
|
|
189
189
|
return inv_dist
|
|
190
190
|
|
|
@@ -200,9 +200,9 @@ def generate_otoc_samples(J=-1.0, h=2.0, z=4, theta=0.0, t=5, n_qubits=65, pauli
|
|
|
200
200
|
butterfly_idx_x = find_all_str_occurrences(pauli_string, 'X')
|
|
201
201
|
butterfly_idx_z = find_all_str_occurrences(pauli_string, 'Z')
|
|
202
202
|
if is_orbifold:
|
|
203
|
-
inv_dist += get_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len)
|
|
203
|
+
inv_dist += get_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len, t)
|
|
204
204
|
else:
|
|
205
|
-
inv_dist += get_willow_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len)
|
|
205
|
+
inv_dist += get_willow_inv_dist(butterfly_idx_x, butterfly_idx_z, n_qubits, row_len, col_len, t)
|
|
206
206
|
inv_dist /= 2.0
|
|
207
207
|
|
|
208
208
|
qubit_pows = [1 << q for q in range(n_qubits)]
|
|
@@ -6,7 +6,7 @@ pyqrackising/maxcut_tfim.py,sha256=05nRjk5hhEjNFjtXdKVObL0cYYuJ8URfcjrOGK5tGi4,1
|
|
|
6
6
|
pyqrackising/maxcut_tfim_sparse.py,sha256=zMgaVmEgfZWL2tp728PuEg5Dc_jbQBUPsgbP3lXiMiA,11194
|
|
7
7
|
pyqrackising/maxcut_tfim_streaming.py,sha256=EcRXKurqLiQs6pMNz-rhMp2YQzRXD726RnkXsPt4IJ0,6346
|
|
8
8
|
pyqrackising/maxcut_tfim_util.py,sha256=2FSBcba8Ys8HEe_h-ayB68pAqeeJXeveEHGmZKg_tkI,16889
|
|
9
|
-
pyqrackising/otoc.py,sha256=
|
|
9
|
+
pyqrackising/otoc.py,sha256=Vq5tHy-XdV6O5qQGVN8E7xLkwHcXDhlWo6GNJTAd4dE,7258
|
|
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.5.
|
|
18
|
-
pyqrackising-9.5.
|
|
19
|
-
pyqrackising-9.5.
|
|
20
|
-
pyqrackising-9.5.
|
|
21
|
-
pyqrackising-9.5.
|
|
17
|
+
pyqrackising-9.5.11.dist-info/licenses/LICENSE.md,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
|
|
18
|
+
pyqrackising-9.5.11.dist-info/METADATA,sha256=dnhaW4j993WTP32LgN2bq182sjTCdOxZzcM_ySZnIcQ,1171
|
|
19
|
+
pyqrackising-9.5.11.dist-info/WHEEL,sha256=ZjXRCNaQ9YSypEK2TE0LRB0sy2OVXSszb4Sx1XjM99k,97
|
|
20
|
+
pyqrackising-9.5.11.dist-info/top_level.txt,sha256=bxlfGuLwzeVEI8Jm5D9HvC_WedgvvkSrpFwbGDjg-Ag,13
|
|
21
|
+
pyqrackising-9.5.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|