Closed cpkurotori closed 1 year ago
job tags can be passed in directly to estimator.run() or sampler.run()
with Session(service=service, backend=backend) as session:
sampler = Sampler(session=session)
job = sampler.run(circuits=ReferenceCircuits.bell(), job_tags=['test_tag123'])
with Session(service=service, backend=backend) as session:
estimator = Estimator(session=session)
observable = SparsePauliOp("XZ")
job = estimator.run(circuits=ReferenceCircuits.bell(), observables=observable, job_tags=['test_tag123'])
job tags can be passed in directly to estimator.run() or sampler.run()
Reading the docs https://qiskit.org/documentation/partners/qiskit_ibm_runtime/stubs/qiskit_ibm_runtime.Sampler.run.html#qiskit_ibm_runtime.Sampler.run I guess this:
**kwargs – Individual options to overwrite the default primitive options.
Is what you mean? And an example of an individual option in this case is job_tags
and the "primitive options" refer to RuntimeOptions?
If so, it feels like at least the docs should be a bit more clear about that for Estimator.run
and Sampler.run
.
Otherwise I assume it'd be a feature request to unpack an options
kwarg in those run
methods and pass those through? For example:
def run(circuits, parameter_values=None, **kwargs):
if 'options' in kwargs:
kwargs.update(kwargs['options'])
# ...
Is what you mean? And an example of an individual option in this case is
job_tags
and the "primitive options" refer to RuntimeOptions?
Yeah that's correct - I can update the docs
Describe the bug
There doesn't seem to be a way to pass job tags when using Sampler or Estimator objects.
Steps to reproduce
instantiate
Sampler()
orEstimator()
and try to run the job while passing job tags.Expected behavior
there should be a way to create sample/estimator jobs with job tags using SDK interfaces
Suggested solutions
job tags should be passed in like they are in options for service.run() or session.run()
Additional Information