Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GuidedPauliSimp errors out when circuit contains CircuitBox and classical bits. #1578

Closed
yao-cqc opened this issue Sep 13, 2024 · 0 comments · Fixed by #1607
Closed

GuidedPauliSimp errors out when circuit contains CircuitBox and classical bits. #1578

yao-cqc opened this issue Sep 13, 2024 · 0 comments · Fixed by #1607
Assignees
Labels
bug Something isn't working classical-logic issues related to classical logical expressions

Comments

@yao-cqc
Copy link
Contributor

yao-cqc commented Sep 13, 2024

inner_circ_nobit = Circuit(2).H(0).H(1)
full_circ_nobit = Circuit(2)
full_circ_nobit.add_circbox(CircBox(inner_circ_nobit),inner_circ_nobit.qubits)
Out[59]: [CircBox q[0], q[1]; ]
GuidedPauliSimp().apply(full_circ_nobit)
Out[60]: True


inner_circ_withbit = Circuit(2,1).H(0).H(1)
full_circ_withbit = Circuit(2,1)
full_circ_withbit.add_circbox(CircBox(inner_circ_withbit), inner_circ_withbit.qubits + inner_circ_withbit.bits)
Out[63]: [CircBox q[0], q[1], c[0]; ]
GuidedPauliSimp().apply(full_circ_withbit)
Traceback (most recent call last):
  File "/home/andrew/.local/lib/python3.12/site-packages/IPython/core/interactiveshell.py", line 3577, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-64-fa2ebbbbd18c>", line 1, in <module>
    GuidedPauliSimp().apply(full_circ_withbit)
RuntimeError: Subcircuit boundary mismatch to hole
@yao-cqc yao-cqc added the bug Something isn't working label Sep 13, 2024
@CalMacCQ CalMacCQ added the classical-logic issues related to classical logical expressions label Sep 16, 2024
@cqc-alec cqc-alec self-assigned this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working classical-logic issues related to classical logical expressions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants