Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new qiskit init in samples #550

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions samples/hidden-shift/hidden-shift.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,15 @@
},
"outputs": [],
"source": [
"from azure.quantum import Workspace\n",
"from azure.quantum.qiskit import AzureQuantumProvider\n",
"provider = AzureQuantumProvider(\n",
"\n",
"workspace = Workspace(\n",
" resource_id = \"\",\n",
" location = \"\"\n",
")"
" location = \"\",\n",
")\n",
"\n",
"provider = AzureQuantumProvider(workspace)"
]
},
{
Expand Down
440 changes: 269 additions & 171 deletions samples/quantum-signal-processing/signal-processing.ipynb

Large diffs are not rendered by default.

73 changes: 39 additions & 34 deletions samples/resource-estimator/estimation-qiskit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,15 @@
"metadata": {},
"outputs": [],
"source": [
"provider = AzureQuantumProvider (\n",
"from azure.quantum import Workspace\n",
"from azure.quantum.qiskit import AzureQuantumProvider\n",
"\n",
"workspace = Workspace(\n",
" resource_id = \"\",\n",
" location = \"\"\n",
")"
" location = \"\",\n",
")\n",
"\n",
"provider = AzureQuantumProvider(workspace)"
]
},
{
Expand Down Expand Up @@ -169,45 +174,45 @@
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The distribution of physical qubits used for the execution of the algorithm instructions and the supporting T factories can provide us valuable information to guide us in applying space and time optimizations. We can visualize this distribution to better understand the estimated space requirements for our algorithm."
]
"cell_type": "markdown",
"metadata": {},
"source": [
"The distribution of physical qubits used for the execution of the algorithm instructions and the supporting T factories can provide us valuable information to guide us in applying space and time optimizations. We can visualize this distribution to better understand the estimated space requirements for our algorithm."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"result.diagram.space"
]
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"result.diagram.space"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also visualize the time required to execute the algorithm as it relates to each T factory invocation runtime and the number of T factory invocations."
]
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also visualize the time required to execute the algorithm as it relates to each T factory invocation runtime and the number of T factory invocations."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
">\n",
"> *You cannot visualize the time and space diagrams in the same cell.*\n",
">"
]
"cell_type": "markdown",
"metadata": {},
"source": [
">\n",
"> *You cannot visualize the time and space diagrams in the same cell.*\n",
">"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"result.diagram.time"
]
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"result.diagram.time"
]
},
{
"cell_type": "markdown",
Expand Down
10 changes: 7 additions & 3 deletions samples/sessions/introduction-to-sessions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@
"# Connect to the Azure Quantum workspace\n",
"from qiskit import QuantumCircuit\n",
"from qiskit.tools.monitor import job_monitor\n",
"from azure.quantum import Workspace\n",
"from azure.quantum.qiskit import AzureQuantumProvider\n",
"\n",
"provider = AzureQuantumProvider (\n",
" resource_id = \"\",\n",
" location = \"\")\n",
"workspace = Workspace(\n",
" resource_id = \"\",\n",
" location = \"\",\n",
")\n",
"\n",
"provider = AzureQuantumProvider(workspace)\n",
"\n",
"ionq_sim = provider.get_backend('ionq.simulator')\n",
"quantinuum_sim = provider.get_backend('quantinuum.sim.h1-1e')\n",
Expand Down
10 changes: 7 additions & 3 deletions samples/vqe/VQE-qiskit-hydrogen-session.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,16 @@
},
"outputs": [],
"source": [
"from azure.quantum import Workspace\n",
"from azure.quantum.qiskit import AzureQuantumProvider\n",
"\n",
"workspace = Workspace(\n",
" resource_id = \"\",\n",
" location = \"\",\n",
")\n",
"\n",
"# Connect to the Azure Quantum workspace via a Qiskit provider\n",
"provider = AzureQuantumProvider(\n",
" resource_id = \"\",\n",
" location = \"\")"
"provider = AzureQuantumProvider(workspace)"
]
},
{
Expand Down