braket.ir.openqasm.program_v1 module
- class braket.ir.openqasm.program_v1.Program(*, braketSchemaHeader: BraketSchemaHeader = BraketSchemaHeader(name='braket.ir.openqasm.program', version='1'), source: str, inputs: Dict[ConstrainedStrValue, ConstrainedStrValue | ConstrainedFloatValue | int | List[ConstrainedStrValue | ConstrainedFloatValue | int]] | None = None)[source]
Bases:
BraketSchemaBase
Root object of the OpenQASM IR.
- braketSchemaHeader
Schema header. Users do not need to set this value. Only default is allowed.
- Type:
- source
OpenQASM source program.
- Type:
str
- inputs
Inputs for the OpenQASM program.
- Type:
Dict
Examples
>>> Program(source='OPENQASM3.0; cx $0, $1')
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
- braketSchemaHeader: BraketSchemaHeader
- source: str
- inputs: Dict[ConstrainedStrValue, ConstrainedStrValue | ConstrainedFloatValue | int | List[ConstrainedStrValue | ConstrainedFloatValue | int]] | None