41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
---
|
|
title: InstructionSet
|
|
description: API reference for qiskit.circuit.InstructionSet
|
|
in_page_toc_min_heading_level: 1
|
|
python_api_type: class
|
|
python_api_name: qiskit.circuit.InstructionSet
|
|
---
|
|
|
|
# InstructionSet
|
|
|
|
<Class id="qiskit.circuit.InstructionSet" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/circuit/instructionset.py" signature="InstructionSet" modifiers="class">
|
|
Bases: `object`
|
|
|
|
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
|
|
|
|
### add
|
|
|
|
<Function id="qiskit.circuit.InstructionSet.add" signature="InstructionSet.add(gate, qargs, cargs)">
|
|
Add an instruction and its context (where it is attached).
|
|
</Function>
|
|
|
|
### c\_if
|
|
|
|
<Function id="qiskit.circuit.InstructionSet.c_if" signature="InstructionSet.c_if(classical, val)">
|
|
Add condition on classical register to all instructions.
|
|
</Function>
|
|
|
|
### inverse
|
|
|
|
<Function id="qiskit.circuit.InstructionSet.inverse" signature="InstructionSet.inverse()">
|
|
Invert all instructions.
|
|
</Function>
|
|
</Class>
|
|
|