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

Clarify backend=backend runs things in job mode for v2 primitives #1486

Closed
javabster opened this issue Jun 3, 2024 · 3 comments · Fixed by #1562
Closed

Clarify backend=backend runs things in job mode for v2 primitives #1486

javabster opened this issue Jun 3, 2024 · 3 comments · Fixed by #1562
Assignees

Comments

@javabster
Copy link
Collaborator

javabster commented Jun 3, 2024

If you set backend=backend in a v2 primitive it will run the program in job mode, even if it's inside a batch/session context

with Batch(backend=backend):
    sampler = SamplerV2(backend=backend)

so in general we should emphasise to users that they should not do this and instead use this formats:

with Batch(backend=backend):
    sampler = SamplerV2()

(note session=batch is confusing and will likely be changed in future)

@arujjval
Copy link
Contributor

@javabster I want to take this one

@jyu00
Copy link
Collaborator

jyu00 commented Jun 11, 2024

(note session=batch is confusing and will likely be changed in future)

Yeah we are deprecating both session and backend parameters in primitive __init__ to avoid this confusing in the next release (hopefully coming out this week). The replacement is mode.

@javabster
Copy link
Collaborator Author

thanks @arujjval go ahead and work on this, make sure to check out the README for contribution instructions before you get started.

@jyu00 for now we'll just mention the version without session or backend and then update with mode in a later PR

github-merge-queue bot pushed a commit that referenced this issue Jun 19, 2024
Closes #1486

added a note at https://docs.quantum.ibm.com/run/run-jobs-batch

---------

Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
frankharkins added a commit to frankharkins/documentation that referenced this issue Jul 22, 2024
Closes Qiskit#1486

added a note at https://docs.quantum.ibm.com/run/run-jobs-batch

---------

Co-authored-by: Frank Harkins <frankharkins@hotmail.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants