30 lines
1.0 KiB
Python
30 lines
1.0 KiB
Python
from collections import deque
|
|
import matplotlib
|
|
import matplotlib.pyplot as plt
|
|
import numpy as np
|
|
import json
|
|
|
|
matplotlib.rcParams.update({'errorbar.capsize': 2})
|
|
|
|
results_graph0 = np.genfromtxt("circuit_scaling_graph0.csv")
|
|
results_graph1 = np.genfromtxt("circuit_scaling_graph1.csv")
|
|
with open("circuit_scaling_meta.json") as fin:
|
|
meta = json.load(fin)
|
|
|
|
h0 = plt.errorbar(results_graph0[:, 0], results_graph0[:, 2], results_graph0[:, 3]
|
|
, label=f"Graphical Simulator $N_q={meta['nqbits0']}$ Qbits"
|
|
, marker="^"
|
|
, color="black")
|
|
h1 = plt.errorbar(results_graph1[:, 0], results_graph1[:, 2], results_graph1[:, 3]
|
|
, label=f"Graphical Simulator $N_q={meta['nqbits1']}$ Qbits"
|
|
, marker="o"
|
|
, color="black")
|
|
|
|
plt.legend(handles=[h0, h1])
|
|
plt.xlabel("Number of gates in circuit")
|
|
plt.ylabel("Execution time per circuit [s]")
|
|
plt.title(f"Execution Time for random Circuits")
|
|
|
|
plt.show()
|
|
#plt.savefig("scaling_circuits_linear.png", dpi=400)
|