Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def get_qcs(srv, num_of_qubits, max_gates, g):
|
|
44 |
out_tensor = generate_srv_tensors(pipeline, f"Generate SRV: {srv}", samples=6, system_size=num_of_qubits, num_of_qubits=num_of_qubits, max_gates=max_gates, g=g)
|
45 |
|
46 |
st.write("Converting to circuits...")
|
47 |
-
qc_list, _,
|
48 |
|
49 |
st.write("Plotting...")
|
50 |
fig, axs = plt.subplots(3, 2, figsize=(7,10), constrained_layout=True, dpi=120)
|
@@ -54,7 +54,7 @@ def get_qcs(srv, num_of_qubits, max_gates, g):
|
|
54 |
ax.text(0.5, 0.5,"Circuit generated with errors")
|
55 |
|
56 |
|
57 |
-
for qc,is_svr,ax in zip(qc_list,
|
58 |
ax.clear()
|
59 |
qc.draw("mpl", plot_barriers=False, ax=ax, style="clifford")
|
60 |
ax.set_title(f"{'Correct' if is_svr==srv else 'NOT correct'}, is SRV = {is_svr}")
|
|
|
44 |
out_tensor = generate_srv_tensors(pipeline, f"Generate SRV: {srv}", samples=6, system_size=num_of_qubits, num_of_qubits=num_of_qubits, max_gates=max_gates, g=g)
|
45 |
|
46 |
st.write("Converting to circuits...")
|
47 |
+
qc_list, _, srv_list = convert_tensors_to_srvs(out_tensor, pipeline.gate_pool)
|
48 |
|
49 |
st.write("Plotting...")
|
50 |
fig, axs = plt.subplots(3, 2, figsize=(7,10), constrained_layout=True, dpi=120)
|
|
|
54 |
ax.text(0.5, 0.5,"Circuit generated with errors")
|
55 |
|
56 |
|
57 |
+
for qc,is_svr,ax in zip(qc_list, srv_list, axs.flatten()):
|
58 |
ax.clear()
|
59 |
qc.draw("mpl", plot_barriers=False, ax=ax, style="clifford")
|
60 |
ax.set_title(f"{'Correct' if is_svr==srv else 'NOT correct'}, is SRV = {is_svr}")
|