InstructionSet

class InstructionSet[source]

Instruction collection, and their contexts.

New collection of instructions.

The context (qargs and cargs that each instruction is attached to) is also stored separately for each instruction.

Methods

InstructionSet.__getitem__(i)

Return instruction at index

InstructionSet.__len__()

Return number of instructions in set

InstructionSet.add(gate, qargs, cargs)

Add an instruction and its context (where it is attached).

InstructionSet.c_if(classical, val)

Add condition on classical register to all instructions.

InstructionSet.inverse()

Invert all instructions.