Skip to main contentIBM Quantum Documentation Mirror

SamplexItemModel

pydantic model SamplexItemModel

GitHub

Bases: BaseModel

Execution specifications for a single quantum circuit.

The circuit for each item is store separately in QuantumProgramModel.

chunk_size

field

Type: Annotated[int, Field(ge

Default value: 1)] | Literal['auto'] = 'auto'

The maximum number circuit arguments to bind to the circuit per shot loop.

When "auto", the number is chosen server-side with heuristics designed to optimize execution speed. A quantum program must have items where either all chunk sizes are integer-valued, or all chunk sizes are "auto". Integer values are only allowed inside of session exection mode.

item_type

field

Type: Literal['samplex']

Default value: 'samplex'

The type of quantum program item.

samplex

field

Type: SamplexModel [Required]

A JSON-encoded samplex.

samplex_arguments

field

Type: dict[str, bool | int | PauliLindbladMapModel | TensorModel] [Required]

Arguments to the samplex.

shape

field

Type: list[int] [Required]

The shape of this item.

This shape must extend (via broadcasting) the implicit shape of the :attr:~samplex_arguments`. The non-trivial axes it introduces enumerate randomizations.