braket.ir.jaqcd.program_v1 module

class braket.ir.jaqcd.program_v1.Program[source]

Bases: braket.schema_common.schema_base.BraketSchemaBase

Root object of the JsonAwsQuantumCircuitDescription IR.

braketSchemaHeader

Schema header. Users do not need to set this value. Only default is allowed.

Type

BraketSchemaHeader

instructions

List of instructions.

Type

List[GateInstructions]

basis_rotation_instructions

List of instructions for rotation to desired measurement bases. Default is None.

Type

List[GateInstructions]

results

List of requested results. Default is None.

Type

List[Union[Amplitude, Expectation, Probability, Sample, StateVector, Variance]]

Examples

>>> Program(instructions=[H(target=0), Rz(angle=0.15, target=1)])
>>> Program(instructions=[H(target=0), CNot(control=0, target=1)],
...     results=[Expectation(targets=[0], observable=['x'])],
...     basis_rotation_instructions=[H(target=0)])

Note

The type GateInstructions includes the following instructions: CCNot, CNot, CPhaseShift, CPhaseShift00, CPhaseShift01, CPhaseShift10, CSwap, CY, CZ, H, I, ISwap, PhaseShift, PSwap, Rx, Ry, Rz, S, Swap, Si, T, Ti, Unitary, V, Vi, X, XX, XY, Y, YY, Z, ZZ

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 = None
instructions: List[GateInstructions] = None
results: Optional[List[Results]] = None
basis_rotation_instructions: Optional[List[GateInstructions]] = None