Skip to content

Commit

Permalink
minor improvement of internal_compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Dec 5, 2023
1 parent 316cd71 commit c4d0a77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qlasskit/compiler/internalcompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def compile(
a_true = qc.add_qubit("TRUE")
qc.x(a_true)
iret = a_true
elif isinstance(symp_exp, Symbol):
# Qubit mapped to another qubit (iff sym.name is a _ret)
elif isinstance(symp_exp, Symbol) and sym.name.startswith("_ret"):
iret = qc.add_qubit(sym.name)
qc.cx(qc[symp_exp.name], iret)
else:
Expand Down

0 comments on commit c4d0a77

Please sign in to comment.