-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Speed up ConsolidateBlocks pass #8779
Comments
A slight alternative of course is to speed up the That said, the extra overhead the |
Me and danielleodigie are interested in looking into this issue. Can we be assigned? |
@danielleodigie: because of GitHub weirdness, it's tricky for us to formally assign you unless you comment on this issue. |
oops I didn't know that, I'd like to be assigned too! |
No worries - it's just one of those weird little GitHub things. Maybe it's to avoid people spamming famous people by assigning them on random little repos? I dunno. |
What should we add?
When running a large
transpile()
(with 1k circuit qubits) with optimization level 3 a substantial amount of time, ~32%, of the compilation is spent in theConsolidateBlocks
pass. For something that's supposed to take a block of gates on 2 qubit and replace it with an equivalentUnitaryGate
this is a larger portion of time than would normally be expected. Looking at the profile:Most of the time seems to be spent in the
Operator
object creation. We had similar performance issues around the use ofOperator
to compute unitaries inOptimize1qGatesDecomposition
and we moved to computing the matrix directly (which is admittedly easier to do for 1q) and sped up the pass significantly (see #5909). We should look at doing a similar optimization inConsolidateBlocks
and fall back to usingOperator
if there are gates in the block we can't work directly with a matrix on.The text was updated successfully, but these errors were encountered: