From f71e540107a12315172f57bcc6247eaea684fd5f Mon Sep 17 00:00:00 2001 From: positr0nium Date: Sun, 22 Dec 2024 19:41:36 +0100 Subject: [PATCH] jasp.__eq__ now returns equality based on object identity --- src/qrisp/jasp/jasp_expression/centerclass.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qrisp/jasp/jasp_expression/centerclass.py b/src/qrisp/jasp/jasp_expression/centerclass.py index 3555dfbe..930fce3f 100644 --- a/src/qrisp/jasp/jasp_expression/centerclass.py +++ b/src/qrisp/jasp/jasp_expression/centerclass.py @@ -160,10 +160,7 @@ def __eq__(self, other): if not isinstance(other, Jaxpr): return False - return (self.hashvalue == hash(other) - and len(self.eqns) == len(other.eqns) - and len(self.invars) == len(other.invars) - and check_aval_equivalence(self.invars, other.invars)) + return id(self) == id(other) def inverse(self): """