Skip to content

Commit

Permalink
* Fix for invalid notebook - hadamard_test.ipynb
Browse files Browse the repository at this point in the history
* Remove explicit setting of target (default target is `nvidia` if
  GPU(s) present)

Signed-off-by: Pradnya Khalate <[email protected]>
  • Loading branch information
khalatepradnya committed Dec 11, 2024
1 parent 1a3ffcb commit 5dd0fb7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@
"source": [
"import cudaq\n",
"from cudaq import spin\n",
"import numpy as np\n",
"\n",
"cudaq.set_target('nvidia')\n",
"# cudaq.set_target('qpp-cpu') # Uncomment this line if no GPUs are available"
"import numpy as np\n"
]
},
{
Expand All @@ -67,16 +64,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Edges: [[0, 1], [0, 2], [0, 4], [0, 5], [1, 2], [1, 3], [1, 5], [2, 3], [2, 4], [3, 4], [3, 5], [4, 5]]\n",
"Non-Edges: [[0, 3], [1, 4], [2, 5]]\n"
]
}
],
"outputs": [],
"source": [
"# The two graph inputs from the paper\n",
"\n",
Expand Down Expand Up @@ -125,7 +113,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -156,7 +144,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -214,7 +202,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -252,7 +240,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -293,7 +281,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -334,7 +322,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -378,7 +366,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/applications/python/hadamard_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"![Htest2](./images/htestfactored.png)\n",
"\n",
"By preparing this circuit, and repeatedly measuring the ancilla qubit, we estimate the expectation value as $$P(0)-P(1) = Re \\bra{\\psi} O \\ket{\\phi}.$$\n",
"\,
"\n",
"\n",
"The following sections demonstrate how this can be performed in CUDA-Q."
]
Expand Down

0 comments on commit 5dd0fb7

Please sign in to comment.