MCPcopy
hub / github.com/Qiskit/qiskit / _add_ref

Method _add_ref

qiskit/circuit/instructionset.py:87–90  ·  view source on GitHub ↗

Add a reference to an instruction and its context within a mutable sequence. Updates to the instruction set will modify the specified sequence in place.

(self, data: MutableSequence[CircuitInstruction], pos: int)

Source from the content-addressed store, hash-verified

85 self._instructions.append(instruction)
86
87 def _add_ref(self, data: MutableSequence[CircuitInstruction], pos: int):
88 """Add a reference to an instruction and its context within a mutable sequence.
89 Updates to the instruction set will modify the specified sequence in place."""
90 self._instructions.append((data, pos))
91
92 def inverse(self, annotated: bool = False):
93 """Invert all instructions.

Callers 2

_append_standard_gateMethod · 0.95
appendMethod · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected