qat.experimental.dialect.results.ir.types module
Models the types in the results dialect, which are used for dataflow of results to collect and manipulate.
- class RecordType(*parameters)
Bases:
RecordTypeA type that carries a results record that can be added to a results collection.
This is used to represent a single record of results, e.g., from a single shot. It has the semantics of a dictionary, where the entries are accessed by string keys, and it can store arbitrary data types.
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- name: ClassVar[str] = 'results.record'
The attribute name should be a static field in the attribute classes.
- class ResultsArrayType(*parameters)
Bases:
ResultsArrayTypeA type that represents an array of results, which can be added to and filtered with given operations.
This is used to represent a collection of results that can be indexed into, e.g., a register of classical bits measured from a quantum circuit. It takes standard array semantics, holding an ordered list of results.
ResultsArrayTypeis modelled to be immutable, and must be complete when constructed.- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- name: ClassVar[str] = 'results.array'
The attribute name should be a static field in the attribute classes.
- class ResultsCollectionType(*parameters)
Bases:
ResultsCollectionTypeA type that represents a collection of results, which can be added to and filtered with given operations.
Each entry is expected to hold the results of a single circuit execution, such as a single shot. Results can dynamically be added to the collection, and filtered away with given operations.
- classmethod get_irdl_definition()
Get the IRDL attribute definition.
- name: ClassVar[str] = 'results.collection'
The attribute name should be a static field in the attribute classes.