Skip to content

Commit

Permalink
Work around a qiskit-ibm-runtime bug
Browse files Browse the repository at this point in the history
  • Loading branch information
garrison committed Jun 1, 2024
1 parent 3d5fc9d commit 9002ef2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@
"\n",
"# Submit each partition's subexperiments to the Qiskit Runtime Sampler\n",
"# primitive, in a single batch so that the jobs will run back-to-back.\n",
"with Batch(backend=backend):\n",
" sampler = SamplerV2()\n",
"with Batch(backend=backend) as batch:\n",
" sampler = SamplerV2(session=batch)\n",
" jobs = {\n",
" label: sampler.run(subsystem_subexpts, shots=2**12)\n",
" for label, subsystem_subexpts in isa_subexperiments.items()\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@
"\n",
"# Submit each partition's subexperiments to the Qiskit Runtime Sampler\n",
"# primitive, in a single batch so that the jobs will run back-to-back.\n",
"with Batch(backend=backend):\n",
" sampler = SamplerV2()\n",
"with Batch(backend=backend) as batch:\n",
" sampler = SamplerV2(session=batch)\n",
" jobs = {\n",
" label: sampler.run(subsystem_subexpts, shots=2**12)\n",
" for label, subsystem_subexpts in isa_subexperiments.items()\n",
Expand Down

0 comments on commit 9002ef2

Please sign in to comment.