From eb4701f43c386abac28e99f0ea126cd840410119 Mon Sep 17 00:00:00 2001 From: "Bochen \"Daniel\" Tan" <33230390+tbcdebug@users.noreply.github.com> Date: Sat, 29 Jan 2022 12:38:36 -0800 Subject: [PATCH] constrain xticks in two plt figures (#658) Since we only have data points at x=4, 6, 8, 10, and 12, it is better to get rid of the odd numbered ticks to avoid confusion. --- docs/tutorials/barren_plateaus.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/tutorials/barren_plateaus.ipynb b/docs/tutorials/barren_plateaus.ipynb index bbd5d5e9a..4d538cae4 100644 --- a/docs/tutorials/barren_plateaus.ipynb +++ b/docs/tutorials/barren_plateaus.ipynb @@ -354,6 +354,7 @@ "plt.semilogy(n_qubits, theta_var)\n", "plt.title('Gradient Variance in QNNs')\n", "plt.xlabel('n_qubits')\n", + "plt.xticks(n_qubits)\n", "plt.ylabel('$\\\\partial \\\\theta$ variance')\n", "plt.show()" ] @@ -482,6 +483,7 @@ "plt.semilogy(n_qubits, heuristic_theta_var)\n", "plt.title('Heuristic vs. Random')\n", "plt.xlabel('n_qubits')\n", + "plt.xticks(n_qubits)\n", "plt.ylabel('$\\\\partial \\\\theta$ variance')\n", "plt.show()" ]