Skip to content

Commit

Permalink
Minor style changes to qvm builder code notebook (quantumlib#5808)
Browse files Browse the repository at this point in the history
Hide some of the code behind a button in the builder notebook, use the same example shown in QSS, add an explanatory comment in notebook_test
  • Loading branch information
augustehirth authored Jul 22, 2022
1 parent ac1ae09 commit 3d61112
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions dev_tools/notebooks/notebook_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
'docs/noise/qcvv/xeb_calibration_example.ipynb',
'docs/noise/calibration_api.ipynb',
'docs/noise/floquet_calibration_example.ipynb',
# shouldn't have outputs generated for style reasons
'docs/simulate/qvm_builder_code.ipynb',
]

Expand Down
8 changes: 6 additions & 2 deletions docs/simulate/qvm_builder_code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "pbHCUPLpq5WE"
},
"outputs": [],
Expand Down Expand Up @@ -174,7 +175,9 @@
"outputs": [],
"source": [
"# create your device ready circuit here!\n",
"your_circuit_name = cirq.Circuit(cirq.measure(cirq.GridQubit(4, 3)))"
"q0 = cirq.GridQubit(4, 1)\n",
"your_circuit = cirq.Circuit([(cirq.X**0.5)(q0), cirq.measure(q0)])\n",
"print(your_circuit)"
]
},
{
Expand All @@ -190,12 +193,13 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "bFjnNSqRZsFu"
},
"outputs": [],
"source": [
"# @title Enter the name of your device ready circuit and execute it on the Quantum Virtual Machine\n",
"circuit = your_circuit_name # @param\n",
"circuit = your_circuit # @param\n",
"\n",
"reps = 3000\n",
"start = time.time()\n",
Expand Down

0 comments on commit 3d61112

Please sign in to comment.