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:
Jake Lishman 2024-03-04 14:31:17 +00:00 committed by GitHub
parent ff2bbfede9
commit 2282301be7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 12 deletions

View File

@ -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.