Skip to main contentIBM Quantum Documentation Mirror

QuantumProgramModel

pydantic model QuantumProgramModel

GitHub

Bases: BaseModel

Model to store a quantum program.

items

field

Type: list[Annotated[CircuitItemModel | SamplexItemModel, FieldInfo(annotation

Default value: NoneType, required=True, discriminator='item_type')]] [Required]

Items of the program.

Validated by

  • check_chunk_sizes_are_consistent

shots

field

Type: int [Required]

The number of shots for each individually bound circuit.

Constraints

  • ge = 1

Validated by

  • check_chunk_sizes_are_consistent

check_chunk_sizes_are_consistent

validator check_chunk_sizes_are_consistent

GitHub

Check that all program items set chunk sizes consistently.