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

[Bug] Drawing krons of non-consecutive blocks #281

Closed
jpmoutinho opened this issue Dec 28, 2023 · 2 comments
Closed

[Bug] Drawing krons of non-consecutive blocks #281

jpmoutinho opened this issue Dec 28, 2023 · 2 comments
Labels
bug Something isn't working to_check To check in the development of the new expression system.

Comments

@jpmoutinho
Copy link
Collaborator

The following works:

from qadence import *
from qadence.draw import display

b0 = X(0) @ X(1)
b1 = X(2) @ X(3)
b2 = kron(b0, b1)
display(b2)

The following does not:

from qadence import *
from qadence.draw import display

b0 = X(0) @ X(2)
b1 = X(1) @ X(3)
b2 = kron(b0, b1) # Works up to here, building the correct block
display(b2) # Here fails with "AssertionError: Make sure blocks act on distinct qubits!"
@jpmoutinho jpmoutinho added the bug Something isn't working label Dec 28, 2023
@nmheim
Copy link
Collaborator

nmheim commented Jan 8, 2024

Hey! Thanks for catching this one. There is unfortunately no obvious way to plot this... unless we convert overlapping blocks to chains.... what do you think is a reasonable plot here? the same as in the first case? because if we have tags around e.g. b0 we will run into trouble

@jpmoutinho
Copy link
Collaborator Author

Hey! Thanks for catching this one. There is unfortunately no obvious way to plot this... unless we convert overlapping blocks to chains.... what do you think is a reasonable plot here? the same as in the first case? because if we have tags around e.g. b0 we will run into trouble

I think it would be fine to draw it as if it was a chain.

@jpmoutinho jpmoutinho added the to_check To check in the development of the new expression system. label May 14, 2024
@jpmoutinho jpmoutinho closed this as not planned Won't fix, can't repro, duplicate, stale Nov 15, 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 to_check To check in the development of the new expression system.
Projects
None yet
Development

No branches or pull requests

2 participants