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

Duplicate qubit in gate append for fastOptimized qlassf #9

Closed
dakk opened this issue Jan 16, 2024 · 1 comment
Closed

Duplicate qubit in gate append for fastOptimized qlassf #9

dakk opened this issue Jan 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dakk
Copy link
Owner

dakk commented Jan 16, 2024

from qlasskit import Qint8, Qint16, Qlist, boolopt, qlassfa

@qlassfa(bool_optimizer=boolopt.fastOptimizer)
def test(a_list: Qlist[Qint8, 8]) -> Qint16:
    h_val = Qint16(0)
    for c in a_list:
        h_val = h_val + c
    return h_val

Raises:

Exception: duplicate qubit in gate append: [64, 64, 75, 83]
@dakk dakk added the bug Something isn't working label Jan 16, 2024
@dakk
Copy link
Owner Author

dakk commented Feb 21, 2024

This also occurs using circuit_boolean_optimizer:

from qlasskit import qlassf, Qint4
from qlasskit.decompiler import Decompiler, circuit_boolean_optimizer

@qlassf
def qf(a: Qint4) -> Qint4:
    return a * a 

circuit_boolean_optimizer(qf.circuit())
Exception: duplicate qubit in gate append: [16, 16]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant