Skip to content

Commit a2ee582

Browse files
dstrain115rht
authored andcommitted
Fix gates.ipynb formatting (quantumlib#5175)
- Move import cirq up into top block. - Clear outputs.
1 parent 834373c commit a2ee582

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

Diff for: docs/gates.ipynb

+4-19
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
"except ImportError:\n",
7676
" print(\"installing cirq...\")\n",
7777
" !pip install --quiet cirq\n",
78-
" print(\"installed cirq.\")"
78+
" print(\"installed cirq.\")\n",
79+
" import cirq"
7980
]
8081
},
8182
{
@@ -128,22 +129,8 @@
128129
"metadata": {
129130
"id": "psYGZcjUEF5V"
130131
},
131-
"outputs": [
132-
{
133-
"name": "stdout",
134-
"output_type": "stream",
135-
"text": [
136-
"H(b)\n",
137-
"CNOT(b, c)\n",
138-
"CNOT(a, b)\n",
139-
"H(a)\n",
140-
"cirq.MeasurementGate(2, 'a,b', ())(a, b)\n"
141-
]
142-
}
143-
],
132+
"outputs": [],
144133
"source": [
145-
"import cirq\n",
146-
"\n",
147134
"# This examples uses named qubits to remain abstract.\n",
148135
"# However, we can also use LineQubits or GridQubits to specify a geometry\n",
149136
"a = cirq.NamedQubit('a')\n",
@@ -354,9 +341,7 @@
354341
],
355342
"metadata": {
356343
"colab": {
357-
"collapsed_sections": [
358-
"Sh9QBnKbFf_B"
359-
],
344+
"collapsed_sections": [],
360345
"name": "gates.ipynb",
361346
"toc_visible": true
362347
},

0 commit comments

Comments
 (0)