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
Multi-qubit fusion #505
Multi-qubit fusion #505
Conversation
Codecov Report
@@ Coverage Diff @@
## master #505 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 83 83
Lines 11917 11935 +18
=========================================
+ Hits 11917 11935 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Closing in favor of a different implementation in #577. |
Generalizes the gate fusion algorithm to work with arbitrary number of max_qubits which is now possible since the qibojit backend supports multi-qubit gates. The maximum number of qubits for fusion can be set when calling the
circuit.fuse()
method. The current default is 2, but we may change it to a different number (for example 5, if we follow qiskit) depending on benchmark results.Below is some comparison of this implementation to qiskit. In each column we have the ration of qibo simulation time / qiskit simulation time for different choices of fusion max_qubits from 2 to 8. Simulation, not dry run, times are used.
qft
variational
bv
qv
Clearly the fusion algorithm is not optimal for max_qubits > 3.
TODO: