Open ausbin opened 1 year ago
Thanks for bringing this to our attention @ausbin. The best path forward is to implement these variational proxy benchmarks as full application benchmarks. We'll keep this issue open until we've done so.
@ausbin are you asking to get the ansatz circuit with symbolic (or random) parameters? That might be reasonable for SupermarQ to do, although the performance of a QAOA circuit with random parameters is of course going to be poor.
Sorry if I was unclear, @perlinm β as a user, I am asking to be able to generate an instance of e.g. QAOA without Supermarq trying to allocate a petabyte of memory.
I ran into this because I was using Supermarq benchmarks to test some compiler passes, and in this case, the particular values of the ansatz angles weren't important. So I just assigned them some random values: ausbin/Supermarq@cc4343b2337eb4bebeace3e119eb928bde806a5d. I didn't make that a PR because yeah, I agree random angles may not be suitable for other usecases (like benchmarking hardware)
I agree that we should make this possible in SupermarQ. If you have an implementation in mind, we would certainly appreciate a PR π
The Vanilla QAOA, Fermionic-Swap QAOA, and VQE benchmarks seem to simulate the whole system to generate a circuit:
https://github.com/SupertechLabs/SupermarQ/blob/bc06e85dff2033b9ab74207d7e4540699b648602/supermarq/benchmarks/qaoa_vanilla_proxy.py#L99 https://github.com/SupertechLabs/SupermarQ/blob/bc06e85dff2033b9ab74207d7e4540699b648602/supermarq/benchmarks/qaoa_fermionic_swap_proxy.py#L122 https://github.com/SupertechLabs/SupermarQ/blob/bc06e85dff2033b9ab74207d7e4540699b648602/supermarq/benchmarks/vqe_proxy.py#L120-L121
I get why this is the case β to choose a realistic set of parameters to the ansatz in the proxy circuit instead of making something up. However, it seems to me like this means the current implementation cannot generate proxy circuits for a variational run with quantum advantage.
Just to give an example, if you try to instantiate a 64-bit Vanilla QAOA circuit with
QAOAVanillaProxy(64).circuit()
, you'll probably get something like this: