Skip to content

Commit

Permalink
docs: Examples for Circuit.Save: adjust output
Browse files Browse the repository at this point in the history
  • Loading branch information
PMeira committed Feb 22, 2024
1 parent ed41381 commit cd5cbcf
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions docs/notebooks/Saving.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,8 @@
"outputs": [],
"source": [
"import json\n",
"from IPython.display import JSON\n",
"display(JSON(json.loads(odd.Circuit.ToJSON())))"
"json_data = json.loads(odd.Circuit.ToJSON())\n",
"json_data"
]
},
{
Expand All @@ -424,7 +424,11 @@
"id": "511f6314-a39c-4c5b-94fa-742364b467f9",
"metadata": {},
"outputs": [],
"source": []
"source": [
"# If you are running on Jupyter, better display\n",
"from IPython.display import JSON\n",
"display(JSON(json_data))"
]
}
],
"metadata": {
Expand All @@ -433,9 +437,6 @@
"language": "python",
"name": "python3"
},
"mystnb": {
"execution_allow_errors": false
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
Expand All @@ -447,6 +448,9 @@
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
},
"mystnb": {
"execution_allow_errors": false
}
},
"nbformat": 4,
Expand Down

0 comments on commit cd5cbcf

Please sign in to comment.