Skip to main content
IBM Quantum Platform

QuantumProgramModel

pydantic model QuantumProgramModel

GitHub

Bases: BaseModel

Model to store a quantum program.

items

field

Type: list[Annotated[CircuitItemModel | SamplexItemModel, FieldInfo(annotation``=``NoneType, required``=``True, discriminator``=``'item_type')]]

Items of the program.

Validated by

  • check_chunk_sizes_are_consistent

shots

field

Type: int

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.

Was this page helpful?
Report a bug, typo, or request content on GitHub.