From 50cae2b4f1c44d7be6b1f92d5c0e61a0f48e54cf Mon Sep 17 00:00:00 2001 From: "Bochen \"Daniel\" Tan" <33230390+tbcdebug@users.noreply.github.com> Date: Mon, 24 Jan 2022 20:29:57 -0800 Subject: [PATCH] constrain xticks in two plt figures 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()" ]