Skip to content

Commit

Permalink
Update docstrings of abstract methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Linde committed Apr 29, 2024
1 parent b03d78f commit 32643b3
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions opensquirrel/squirrel_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,20 @@ def is_anonymous(self) -> bool:
return self.arguments is None

@abstractmethod
def get_qubit_operands(self) -> List[Qubit]: ...
def get_qubit_operands(self) -> List[Qubit]:
"""Get the qubit operands of the Gate.
Returns:
List of qubits on which the Gate operates.
"""

@abstractmethod
def is_identity(self) -> bool: ...
def is_identity(self) -> bool:
"""Check wether the Gate is an identity Gate.
Returns:
Boolean value stating wether the Gate is an identity Gate.
"""

@abstractmethod
def relabel(self, mapping: Mapping[int, int]) -> None:
Expand Down

0 comments on commit 32643b3

Please sign in to comment.