Skip to main contentIBM Quantum Documentation Mirror

CircuitItemModel

pydantic model CircuitItemModel

GitHub

Bases: BaseModel

Execution specifications for a single quantum circuit.

chunk_size

field

Type: Annotated[int, FieldInfo(annotation

Default value: NoneType, required=True, metadata=[Ge(ge=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: QpyModelV13ToV16 [Required]

A QPY-encoded circuit.

Validated by

  • cross_validate

circuit_arguments

field

Type: F64TensorModel [Required]

Arguments to the parameters of the circuit.

The last axis is over circuit.parameters. Execution broadcasts over the preceding axes; expect one result per element of the leading shape.

Validated by

  • cross_validate

item_type

field

Type: Literal['circuit']

Default value: 'circuit'

The type of quantum program item.

Validated by

  • cross_validate

cross_validate

validator cross_validate

GitHub

Check for mutual compatibility of types and shapes of attributes.

Return type

Self