Skip to content

Commit

Permalink
comment out is_symbol_referenced in internalcompiler
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Jul 9, 2024
1 parent ec0d6e7 commit e3bccc4
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions qlasskit/compiler/internalcompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from copy import deepcopy
# from copy import deepcopy

from sympy import Symbol
from sympy.logic import And, Not, Xor
Expand All @@ -27,14 +27,14 @@
class InternalCompiler(Compiler):
"""InternalCompiler translating an expression list to quantum circuit"""

def is_symbol_referenced_in_remaining_exps(self, symbol):
"""Return True if the symbol is referenced in remaining expressions"""
for sym, exp in self.remaining_exps:
if sym == symbol:
return True
if symbol in exp.free_symbols:
return True
return False
# def is_symbol_referenced_in_remaining_exps(self, symbol):
# """Return True if the symbol is referenced in remaining expressions"""
# for sym, exp in self.remaining_exps:
# if sym == symbol:
# return True
# if symbol in exp.free_symbols:
# return True
# return False

def compile( # noqa: C901
self, name, args: Args, returns: Arg, exprs: BoolExpList, uncompute=True
Expand Down

0 comments on commit e3bccc4

Please sign in to comment.