qadence
qadence copied to clipboard
[Bug] Drawing krons of non-consecutive blocks
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!"
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
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.