[Bug] Drawing certain kron operations fails due to a bug in fill_identities
#586
Labels
bug
Something isn't working
fill_identities
#586
Short description
The function
fill_identities
fails when doingkron(CNOT(0, 2))
because it adds one extra identity than what is needed and then thekron
function fails to build theKronBlock
because there is overlapping support. The functionfill_identities
is called by the drawing module so that the proper spacings between blocks are included in the drawing.What is the expected result?
No response
What is the actual result?
No response
Steps/Code to reproduce
Initially noticed when trying to display an
hea
on a different qubit support. E.g.,but can be reproduced simply with
This relates to issue #211, and is one more reason why
fill_identities
might need a proper refactor.I considered fixing this by having
kron(CNOT(0, 2))
just return aCNOT
and not aKronBlock
but that is not backwards compatible and could cause other isses. I initially opened an MR here but it is now closed: #585Tracebacks (optional)
No response
Environment details (optional)
No response
Would you like to work on this issue?
Yes
The text was updated successfully, but these errors were encountered: