-
Notifications
You must be signed in to change notification settings - Fork 368
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
support cu1 fusion #334
support cu1 fusion #334
Conversation
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.
How is the improvement using this optimization?
Do we have some benchmarks?
src/transpile/fusion.hpp
Outdated
@@ -15,6 +15,8 @@ | |||
#ifndef _aer_transpile_fusion_hpp_ | |||
#define _aer_transpile_fusion_hpp_ | |||
|
|||
//#define DEBUG |
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.
You might have unintentionally left this commented line I guess.. :)
src/transpile/fusion.hpp
Outdated
&& ops[i ].qubits[1] == ops[i + 1].qubits[0] | ||
&& ops[i + 1].qubits[0] == ops[i + 2].qubits[1] | ||
&& ops[i ].qubits[0] == ops[i + 2].qubits[0] ) | ||
if ((i + 3) <= until |
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.
it would be great if we can add a comment in this method to explain what is trying to do, something like:
// This method will seek for this pattern of gates in the circuit:
// ---[u1]---|---[u1]---|---
// --------[cx]-------[cx]--
// And optimize it by blablabla...
Thanks @hhorii ! |
@atilag With this PR, I confirmed 37% reduction of elapsed time of 25-qubit qft on MacBook Pro (2.6 GHz Intel Core i7, 16GB DDR4) .
|
* Support cu1 fusion
Summary
Support fusion of
cu1
Details and comments
cu1
is a basic operator since #258, but has not been supported in fusion.