Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version.

InstructionSet

class InstructionSet

GitHub

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

__getitem__

InstructionSet.__getitem__(i)

Return instruction at index

__len__

InstructionSet.__len__()

Return number of instructions in set

add

InstructionSet.add(gate, qargs, cargs)

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

c_if

InstructionSet.c_if(classical, val)

Add condition on classical register to all instructions.

inverse

InstructionSet.inverse()

Invert all instructions.

Was this page helpful?
Report a bug or request content on GitHub.