From 8f49bfd5c86e7f6a58b4d5b3fe958e3095c74508 Mon Sep 17 00:00:00 2001 From: Kaonan Micadei Date: Tue, 30 Jul 2024 16:56:40 +0200 Subject: [PATCH] formatting --- qadence2_ir/irast.py | 6 +++--- tests/test_factory_tools.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qadence2_ir/irast.py b/qadence2_ir/irast.py index 63a852d..fc600b7 100644 --- a/qadence2_ir/irast.py +++ b/qadence2_ir/irast.py @@ -57,7 +57,7 @@ def binary_op_comm(cls, op: str, lhs: AST, rhs: AST) -> AST: @classmethod def callable(cls, name: str, *args: Any) -> AST: return cls.__construct__(cls.Tag.Call, name, *args) - + @classmethod def support(cls, target: tuple[int, ...], control: tuple[int, ...]) -> AST: return cls.__construct__(cls.Tag.Support, "", target, control) @@ -98,7 +98,7 @@ def is_commutative_binary_op(self) -> bool: @property def is_callable(self) -> bool: return self.tag == AST.Tag.Call - + @property def is_support(self) -> bool: return self.tag == AST.Tag.Support @@ -134,4 +134,4 @@ def __eq__(self, other: object) -> bool: return self.head == other.head and self.args == other.args and self.attrs == other.attrs def __repr__(self) -> str: - return f"{self.tag}({self.head}, {self.args}, {self.attrs})" \ No newline at end of file + return f"{self.tag}({self.head}, {self.args}, {self.attrs})" diff --git a/tests/test_factory_tools.py b/tests/test_factory_tools.py index f256d53..bd879fc 100644 --- a/tests/test_factory_tools.py +++ b/tests/test_factory_tools.py @@ -2,8 +2,8 @@ import unittest +from qadence2_ir.factory_tools import build_instructions, extract_inputs, filter_ast, flatten_ast from qadence2_ir.irast import AST -from qadence2_ir.factory_tools import build_instructions, extract_inputs, flatten_ast, filter_ast from qadence2_ir.types import Alloc, Assign, Call, Load, QuInstruct, Support