SamplexItemModel
pydantic model SamplexItemModel
Bases: BaseModel
Execution specifications for a single quantum circuit.
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.
Validated by
cross_validate
circuit
field
Type: QpyModelV13ToV17 [Required]
A QPY-encoded circuit.
Validated by
cross_validate
item_type
field
Type: Literal['samplex']
Default value: 'samplex'
The type of quantum program item.
Validated by
cross_validate
samplex
field
Type: SamplexModel [Required]
A JSON-encoded samplex.
Validated by
cross_validate
samplex_arguments
field
Type: dict[str, bool | int | PauliLindbladMapModel | TensorModel] [Required]
Arguments to the samplex.
Validated by
cross_validate
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.
Validated by
cross_validate
cross_validate
validator cross_validate
Check for mutual compatibility of types and shapes of attributes.
Return type
Self