Open 1ucian0 opened 1 year ago
Hi, I'd like to work on this issue. Can you assign it to me?
approximation_degree
was somewhat deliberately not part of the unitary-synthesis plugin interface - it's a very very fuzzy heuristic dial for the default synthesis, and it doesn't make a huge amount of sense to give it special treatment and pass to other plugins. The way of specify pass-specific options to plugins is the plugin_config
field you used in your second example.
Imo, the current system is working as expected, and the current interface is better than overloading the already near-meaningless approximation_degree
option.
That said, it probably shoudl be clearer in the docstring of UnitarySynthesis
that approximation_degree
isn't part of the plugin interface, and only has meaning for the default synthesis (it only still exists at all for backwards compatibility).
So I gather this feature is not needed to be worked on at this time?
Well, Luciano might disagree with me (I'm not a dictator), but it's probably best to wait for his response at least.
As an aside: Is there an issue out there like this one which involves concepts of QM implemented in QC? Eg here was the adiabatic quantum computation and the adiabatic theorem. I find these interesting to work on!
We don't typically have a lot of feature requests destined for Terra in that sort of vein, because our current strategy is to ask interested people to contribute a package to the Qiskit ecosystem that implements a transpiler plugin. For example, the AQC pass mentioned in this issue is implemented as a transpiler plugin - even though it's within Terra (because it happened before we had the ecosystem properly), it registers itself using the same general mechanisms that all Python packages are free to use.
The documentation for the plugin interface is here, if you're interested: https://qiskit.org/documentation/apidoc/transpiler_synthesis_plugins.html
Gotcha! Even if they're transpiler plugins, that's fine with me! AQC sort of things just make things more interesting to me.
Anyway, I'll wait for @1ucian0 to respond.
The unitary synthesis plugin
aqc
gives always the same result, independently ofapproximation_degree
.Consider the following example:
The result is the same with
approximation_degree=1
It would be great if the approximation_degree could affect the
maxiter
of the optimizer, for example (I'm not an expert in AQC).For example, the following (with
"optimizer": SLSQP(10)
) takes 1.49s in my laptop.while the default one (I think is 100) takes 1m 53.1s
TL;DR Change default
maxiter
based on the approximation level, if not set. Maybe the amount of unitary boxes and qubits involved should play a role too.