-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
What should we add?
For level 3 compilation now, the unitary synthesis as part of the 2q block optimization becomes a large bottleneck (this was mostly supposition on my part looking at the profile we spend more time in consolidate blocks than synthesis) since we've moved layout and routing mostly to multithreaded rust code. To look at further speeding this up we should look at whether we can accelerate the numeric component of:
and
https://github.com/Qiskit/qiskit-terra/blob/main/qiskit/quantum_info/synthesis/one_qubit_decompose.py (this was done in #9185)
by moving it to rust. For things that are already in vectorized numpy functions the performance gains may not be that big. The other constraint is that linear algebra functions that depend on blas we'll probably still want to call to numpy (likely via python since the numpy c api doesn't expose a lot of the linalg functions which leverage blas) since we don't want the complexity of linking the rust binary against blas at build time.
I'm not actually sure how much it'll speed things up since I expect a large chunk of time is spent building circuits and manipulating them. Moving the numeric portion of the modules to rust won't really change because the circuit side is in python space and rust can't really accelerate those portion of the modules. This effort is not necessarily going to turn out to be worth it, but we can't really know until we give it a try.
Tasks
- Port TwoQubitWeylDecomposition to Rust #12008
- Port TwoQubitBasisDecomposition to Rust #12004
- Port XXDecomposer to Rust #12005
- Expand unitary synthesis plugin interface to support synthesizing batches of unitary matrices #12006
- Add parallel synthesis interface to default unitary synthesis plugin #12007
- Port
TwoQubitControlledUDecomposer
to rust #12907 - Add 2q fractional gates to the
UnitarySynthesis
transpiler pass #13568