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

Update cutting tutorials to send ISA circuits to Qiskit Runtime #500

Merged
merged 6 commits into from
Mar 25, 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
Original file line number Diff line number Diff line change
Expand Up @@ -283,21 +283,26 @@
"metadata": {},
"outputs": [],
"source": [
"# from qiskit_ibm_runtime import Session, Options, Sampler\n",
"# from qiskit_ibm_runtime import Session, Options, Sampler, QiskitRuntimeService\n",
"# from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager\n",
"#\n",
"# with Session(backend=\"ibmq_qasm_simulator\") as session:\n",
"# service = QiskitRuntimeService()\n",
"# backend = service.least_busy(operational=True, simulator=False)\n",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can remove the Runtime example in the comments here (and our other tutorials) in a future PR and use a fake backend from qiskit_ibm_runtime. The usage should be the same for the fake backend and real backend.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I opened #511 so we don't lose track of this.

"#\n",
"# # Prepare transpiler for target backend\n",
"# pass_manager = generate_preset_pass_manager(optimization_level=1, backend=backend)\n",
"#\n",
"# with Session(backend=backend) as session:\n",
"# # Set up Qiskit Runtime Sampler primitives.\n",
"# samplers = {\n",
"# label: Sampler(Options(execution={\"shots\": 2**12})) for label in subexperiments.keys()\n",
"# }\n",
"#\n",
"# # Retrieve results from each subexperiment\n",
"# results = {\n",
"# label: sampler.run(subexperiments[label]).result()\n",
"# label: sampler.run(pass_manager.run(subexperiments[label])).result()\n",
"# for label, sampler in samplers.items()\n",
"# }\n",
"#\n",
"# session.close()"
"# }"
]
},
{
Expand Down
Loading