qib.operator.control_instructions.ControlInstruction¶
- class qib.operator.control_instructions.ControlInstruction[source]¶
Bases:
AbstractOperatorParent class for circuit control instructions.
A control instruction is an operational directive in a quantum program (i.e. circuit), that dictates specific actions to be carried out on qubits within a quantum processor.
Methods
Instructions in quantum circuits do not have a sparse matrix representation, because they are not quantum operations that act on the state of qubits.
Generate a Qobj OpenQASM representation of the instruction.
List of all fields appearing in the instruction.
A control instruction is never Hermitian.
A control instruction is never unitary.
Apply the instruction on the specified qubits.
Return the list of quantum particles the instruction is applied on.
Attributes
The number of "wires" (or quantum particles) this instruction is applied on.
- as_matrix()[source]¶
Instructions in quantum circuits do not have a sparse matrix representation, because they are not quantum operations that act on the state of qubits. Instead, these instructions serve as control directives within a quantum circuit.
- abstract property num_wires¶
The number of “wires” (or quantum particles) this instruction is applied on.