mirror of https://github.com/Qiskit/qiskit.git
Remove dead `Instruction._qasmif` method (#11905)
This is not called, not referenced and not public, it just got missed in the removal of the greater `Instruction.qasm` machinery in 1.0.
This commit is contained in:
parent
ff2bbfede9
commit
2282301be7
|
@ -520,18 +520,6 @@ class Instruction(Operation):
|
|||
cpy._definition = copy.deepcopy(self._definition, memo)
|
||||
return cpy
|
||||
|
||||
def _qasmif(self, string):
|
||||
"""Print an if statement if needed."""
|
||||
from qiskit.qasm2 import QASM2ExportError # pylint: disable=cyclic-import
|
||||
|
||||
if self.condition is None:
|
||||
return string
|
||||
if not isinstance(self.condition[0], ClassicalRegister):
|
||||
raise QASM2ExportError(
|
||||
"OpenQASM 2 can only condition on registers, but got '{self.condition[0]}'"
|
||||
)
|
||||
return "if(%s==%d) " % (self.condition[0].name, self.condition[1]) + string
|
||||
|
||||
def broadcast_arguments(self, qargs, cargs):
|
||||
"""
|
||||
Validation of the arguments.
|
||||
|
|
Loading…
Reference in New Issue