Skip to content

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

@javabster

Description

@javabster

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions