Skip to content

Commit

Permalink
Remove dead Instruction._qasmif method (#11905)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jakelishman committed Mar 4, 2024
1 parent ff2bbfe commit 2282301
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions qiskit/circuit/instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,18 +520,6 @@ def __deepcopy__(self, memo=None):
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.
Expand Down

0 comments on commit 2282301

Please sign in to comment.