Skip to content

Commit

Permalink
pass job_tags and session_id kwargs correctly (#358)
Browse files Browse the repository at this point in the history
* pass job_tags and session_id kwargs correctly

* update changelog

* black formatting
  • Loading branch information
lillian542 authored Dec 14, 2023
1 parent 55f5df4 commit 334934e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@

### Bug fixes 🐛

* The kwargs `job_tags` and `session_id` are passed to the correct arguments in the
`circuit_runner` device so that they will be used in the Qiskit backend; these
were previously ignored.
[(#358)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/358)

* In `IBMQSamplerDevice` the `generate_samples` function:
1. gets counts from the nearest probability distribution because
the quasi-distribution may contain negative probabilities.
Expand All @@ -24,8 +29,10 @@

This release contains contributions from (in alphabetical order):

Lillian Frederiksen
Francesco Scala


---
# Release 0.33.1

Expand Down
9 changes: 7 additions & 2 deletions pennylane_qiskit/runtime_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ def batch_execute(self, circuits):
program_inputs[kwarg] = self.kwargs.get(kwarg)

# Specify the backend.
options = {"backend": self.backend.name}
options = {"backend": self.backend.name, "job_tags": self.kwargs.get("job_tags")}

session_id = self.kwargs.get("session_id")

# Send circuits to the cloud for execution by the circuit-runner program.
job = self.runtime_service.run(
program_id="circuit-runner", options=options, inputs=program_inputs
program_id="circuit-runner",
options=options,
inputs=program_inputs,
session_id=session_id,
)
self._current_job = job.result(decoder=RunnerResult)

Expand Down

0 comments on commit 334934e

Please sign in to comment.