Skip to content

Commit 3b39bf3

Browse files
fc_tn JAX backend
1 parent 4a04e2c commit 3b39bf3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/fc_tn_qiskit_validation.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,17 @@ def bench_qrack(width, depth, sdrp):
5353
experiment.set_sdrp(sdrp)
5454
experiment.run_qiskit_circuit(rcs)
5555
experiment_counts = dict(Counter(experiment.measure_shots(all_bits, shots)))
56-
57-
sorted_counts = sorted(experiment_counts.items(), key=operator.itemgetter(1))
56+
experiment_counts = sorted(experiment_counts.items(), key=operator.itemgetter(1))
5857

5958
quimb_rcs = quimb_circuit(rcs)
6059
n_pow = 1 << width
6160
u_u = 1 / n_pow
6261
idx = 0
6362
ideal_probs = {}
6463
sum_probs = 0
65-
for count_tuple in sorted_counts:
64+
for count_tuple in experiment_counts:
6665
key = count_tuple[0]
67-
prob = abs(quimb_rcs.amplitude(int_to_bitstring(key, width))) ** 2
66+
prob = abs(quimb_rcs.amplitude(int_to_bitstring(key, width), backend="jax")) ** 2
6867
if prob <= u_u:
6968
continue
7069
val = count_tuple[1]

0 commit comments

Comments
 (0)