-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add benchmark circuits #6
Conversation
All circuits from the paper are now implemented and tested. The Bernstein-Vazirani, Hidden shift and QAOA circuits are implemented directly in qibo, while the basis change, supremacy and quantum volume are built using Cirq or qiskit and ported to qibo via OpenQASM. Note that in some cases the number of gates in the circuits is different than what is reported in the HyQuas paper table, however this may be because of difference in parameters (eg. in the QAOA the number of gates depends on the graph which is randomly generated). Here are some numbers for these circuits on qibo machine: CPU - qft - swaps=True
CPU - variational - nlayers=1, varlayer=False
CPU - bernstein-vazirani - nqubits=3
CPU - hidden-shift
CPU - qaoa - nparams=2
CPU - supremacy - depth=2, seed=123
CPU - basis-change - simulation_time=1, seed=123
CPU - quantum-volume - depth=1, seed=123
GPU - qft - swaps=True
GPU - variational - nlayers=1, varlayer=False
GPU - bernstein-vazirani - nqubits=3
GPU - hidden-shift
GPU - qaoa - nparams=2
GPU - supremacy - depth=2, seed=123
GPU - basis-change - simulation_time=1, seed=123
GPU - quantum-volume - depth=1, seed=123
In these cases it may be useful to compare with some other libraries too, for example Cirq or qiskit for CPU or Qulacs for GPU in order to verify whether Qibo is indeed slower as quoted in the HyQuas paper. |
@stavros11 thank you so much for all these circuits and benchmarks. It is quite reassuring to see that on CPU both simulators match, and on GPU qibotf is dominated by transfer, as expected. Do you have the json for these runs? If so could you please upload to the data folder? |
Thanks for checking. Indeed the numbers look consistent between qibojit/qibotf but as I wrote above I will try to compare with some external libraries to to verify that the overal qibo performance remains competitive in circuits other than QFT.
I added both the log files in Note that for the Hidden shift and QAOA circuits the number of gates depends on the hidden bitstring / MaxCut graph respectively, so I generated some random bitstrings and graphs which I placed in a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you.
@stavros11 shall we enable github actions? |
Thank you for the review. Yes, that would be great. Will you do this? |
Fixes #3 by adding the following circuits from Table 1 of the HyQuas paper:
Note that the depth/number of gates of some of these circuits is affected by parameters other than the number of qubits, such as the graph structure in QAOA or the target shift bitstring in Hidden shift. Care should be taken so that such parameters are kept the same when we are benchmarking different backends.