-
Notifications
You must be signed in to change notification settings - Fork 376
Not-condition performance #4230
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestneeds triageMarks items that require a follow up for proper processingMarks items that require a follow up for proper processingstale-notifiedStale notification has already fired for this issueStale notification has already fired for this issue
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestneeds triageMarks items that require a follow up for proper processingMarks items that require a follow up for proper processingstale-notifiedStale notification has already fired for this issueStale notification has already fired for this issue
Required prerequisites
Describe the feature
We're seeing some very common cases where the GPU state-vector sim is slower then our CPU sim, specifically because of not-conditions.
Application functions such as QROM and arithmetic often have "open-bubble" controls.
In order to do this with CUDA-Q, we currently are required to insert X gates. For a large state vector (like above 30 qubits), the cost for all of these X gates is substantially more than the rest of the computation.
Here you can see the X gates inserted in the CUDA-Q program.
As mentioned, this case is so common that we're seeing it make our GPU programs slower than the same programs on CPU.
Implementing not-conditions without inserting X gates would increase the performance of all CUDA-Q programs which use high-level algorithms!