From 9ef8f5355a2e78f411df2a695748bcf8c8ef68b3 Mon Sep 17 00:00:00 2001 From: Doug Strain Date: Fri, 1 Apr 2022 11:09:00 -0700 Subject: [PATCH] Fix gates.ipynb formatting - Move import cirq up into top block. - Clear outputs. --- docs/gates.ipynb | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/docs/gates.ipynb b/docs/gates.ipynb index 145b0ea60dc..8bb21c4a25f 100644 --- a/docs/gates.ipynb +++ b/docs/gates.ipynb @@ -75,7 +75,8 @@ "except ImportError:\n", " print(\"installing cirq...\")\n", " !pip install --quiet cirq\n", - " print(\"installed cirq.\")" + " print(\"installed cirq.\")\n", + " import cirq" ] }, { @@ -128,22 +129,8 @@ "metadata": { "id": "psYGZcjUEF5V" }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "H(b)\n", - "CNOT(b, c)\n", - "CNOT(a, b)\n", - "H(a)\n", - "cirq.MeasurementGate(2, 'a,b', ())(a, b)\n" - ] - } - ], + "outputs": [], "source": [ - "import cirq\n", - "\n", "# This examples uses named qubits to remain abstract.\n", "# However, we can also use LineQubits or GridQubits to specify a geometry\n", "a = cirq.NamedQubit('a')\n", @@ -354,9 +341,7 @@ ], "metadata": { "colab": { - "collapsed_sections": [ - "Sh9QBnKbFf_B" - ], + "collapsed_sections": [], "name": "gates.ipynb", "toc_visible": true },