Skip to content

Commit

Permalink
add simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
res6idue committed Mar 29, 2024
1 parent ff01e94 commit 6e2d0af
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 12 deletions.
Binary file added quisp/1kmdist.pdf
Binary file not shown.
Binary file added quisp/1kmdist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quisp/20kmdist.pdf
Binary file not shown.
Binary file added quisp/20kmdist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions quisp/bellpairtimings

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion quisp/fidelities

Large diffs are not rendered by default.

41 changes: 32 additions & 9 deletions quisp/hundredbptime.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,39 @@
results[simulation][32] = [np.array(results[simulation][32]).mean(), np.array(results[simulation][32]).std()]

x = [8, 16, 32]
for simulation in simulations:
plt.clf()
simulation_simple = ["mxm_simple", "mxm_simple_adaptive", "mim_simple", "msm_simple", "msm_simple_adaptive"]
simulation_long = ["mxm_long", "mxm_long_adaptive", "mim_long", "msm_long", "msm_long_adaptive"]
dist = 0
for simulation in simulation_simple:
xaxis = np.arange(len(x))
y = [results[simulation][8][0], results[simulation][16][0], results[simulation][32][0]]
err = [results[simulation][8][1], results[simulation][16][1], results[simulation][32][1]]
plt.bar(xaxis, y, label='', log=False, width=0.4)
plt.errorbar(xaxis, y, yerr=err, fmt='.', capsize=3,markersize=6,ecolor='black',elinewidth=0.5,markeredgecolor = 'black', color='w')
plt.xticks(xaxis, x)
plt.xlabel('Memory size (qubits)', fontsize=15)
plt.ylabel('Time to create 100 Bell pairs (s)', fontsize=15)
plt.savefig(f"{simulation}.png", dpi=1000)
plt.savefig(f"{simulation}.pdf", dpi=1000)
simulation = simulation.replace("_simple_", " ")
simulation = simulation.replace("_simple", " ")
plt.bar(xaxis-0.2+dist, y, label=f'{simulation}', log=False, width=0.1)
plt.errorbar(xaxis-0.2+dist, y, yerr=err, fmt='.', capsize=3,markersize=6,ecolor='black',elinewidth=0.5,markeredgecolor = 'black', color='w')
dist += 0.1
plt.legend()
plt.xticks(xaxis, x)
plt.xlabel('Memory size (qubits)', fontsize=15)
plt.ylabel('Time to create 100 Bell pairs (s)', fontsize=15)
plt.savefig(f"1kmdist.png", dpi=1000)
plt.savefig(f"1kmdist.pdf", dpi=1000)

plt.clf()
dist = 0
for simulation in simulation_long:
xaxis = np.arange(len(x))
y = [results[simulation][8][0], results[simulation][16][0], results[simulation][32][0]]
err = [results[simulation][8][1], results[simulation][16][1], results[simulation][32][1]]
simulation = simulation.replace("_long_", " ")
simulation = simulation.replace("_long", " ")
plt.bar(xaxis-0.2+dist, y, label=f'{simulation}', log=False, width=0.1)
plt.errorbar(xaxis-0.2+dist, y, yerr=err, fmt='.', capsize=3,markersize=6,ecolor='black',elinewidth=0.5,markeredgecolor = 'black', color='w')
dist += 0.1
plt.legend()
plt.xticks(xaxis, x)
plt.xlabel('Memory size (qubits)', fontsize=15)
plt.ylabel('Time to create 100 Bell pairs (s)', fontsize=15)
plt.savefig("20kmdist.png", dpi=1000)
plt.savefig("20kmdist.pdf", dpi=1000)
4 changes: 2 additions & 2 deletions quisp/simulations/heterogeneous.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[General]
repeat = 100
seed-set = ${repetition}
sim-time-limit = 20s
sim-time-limit = 10.5s
**.initial_notification_timing_buffer = 10s # when to start the BSA timing notification.
**.app.request_generation_interval = 2s
**.logger.enabled_log = false
Expand Down Expand Up @@ -57,7 +57,7 @@ sim-time-limit = 20s
**.y_measurement_error_rate = 0

**.app.number_of_bellpair = 100
**.buffers = 32
**.buffers = 4
**.qrsa.hm.num_measure = 100

[Config mxm_simple]
Expand Down

0 comments on commit 6e2d0af

Please sign in to comment.