QuantumProgramModel
pydantic model QuantumProgramModel
Bases: BaseModel
Model to store a quantum program.
items
field
Type: list[Annotated[CircuitItemModel | SamplexItemModel, Field(discriminator
Default value: 'item_type')]] [Required]
Items of the program.
Validated by
check_chunk_sizes_are_consistent
meas_level
field
Type: Literal['classified', 'kerneled', 'avg_kerneled']
Default value: 'classified'
The level at which to return all classical register measurement results.
This option sets the return type of all classical registers in all quantum program items and determines whether the raw complex data from low-level measurement devices is discriminated into bits or not.
“classified”: Classical register data is returned as boolean arrays with the intrinsic shape
(num_shots, creg_size).“kerneled”: Classical register data is returned as a complex array with the intrinsic shape
(num_shots, creg_size), where each entry represents an IQ data point (resulting from kerneling the measurement trace) in arbitrary units.“avg_kerneled”: Classical register data is returned as a complex array with the intrinsic
shape
(creg_size,), where data is equivalent to “kerneled” except additionally averaged over shots.
Validated by
check_chunk_sizes_are_consistent
passthrough_data
field
Type: DataTree
Default value: None
Arbitrary nested data passed through execution without modification.
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
Check that all program items set chunk sizes consistently.