Skip to content

Commit

Permalink
Merge pull request #86 from unitaryfund/fix-digital-notebooks
Browse files Browse the repository at this point in the history
add some imports in digital notebooks to fix path issues
  • Loading branch information
FarLab authored Aug 11, 2024
2 parents 94c826a + 3bacb12 commit ff3a4e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 8 additions & 1 deletion notebooks/digital_benchmarking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"metadata": {},
"outputs": [],
"source": [
"from pathlib import Path\n",
"import sys\n",
"BASE_PATH = str(Path.cwd().parent.parent)\n",
"sys.path.append(BASE_PATH)\n",
"\n",
"from aquapointer.digital.qubo import Qubo\n",
"from aquapointer.digital.vqe import VQE\n",
"from aquapointer.digital.ansatz import QAOA_ansatz\n",
Expand All @@ -28,6 +33,8 @@
"from qiskit import QuantumCircuit, transpile \n",
"from qiskit_aer import AerSimulator\n",
"\n",
"\n",
"\n",
"backend = AerSimulator()\n",
"sampler = BackendSampler(backend=backend, options={\"shots\": int(1e4)})"
]
Expand Down Expand Up @@ -2508,7 +2515,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
"version": "3.10.11"
}
},
"nbformat": 4,
Expand Down
1 change: 0 additions & 1 deletion notebooks/digital_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"import pickle\n",
"from pathlib import Path\n",
"import sys\n",
"from pathlib import Path\n",
"BASE_PATH = str(Path.cwd().parent.parent)\n",
"sys.path.append(BASE_PATH)\n",
"\n",
Expand Down

0 comments on commit ff3a4e9

Please sign in to comment.