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 f67d3d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"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"
"# cudaq.set_target('nvidia') # Uncomment this line if GPUs are available\n",
"cudaq.set_target('qpp-cpu') "
]
},
{
Expand Down Expand Up @@ -125,7 +125,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -156,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -214,7 +214,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -252,7 +252,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -293,7 +293,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -334,7 +334,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -378,7 +378,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 f67d3d9

Please sign in to comment.