Add NEON simulator and statespace headers#1050
Open
xxie24 wants to merge 4 commits intoquantumlib:mainfrom
Open
Add NEON simulator and statespace headers#1050xxie24 wants to merge 4 commits intoquantumlib:mainfrom
xxie24 wants to merge 4 commits intoquantumlib:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces NEON vectorization support for the quantum circuit simulator, including a new SimulatorNEON class and a corresponding StateSpaceNEON implementation. The feedback identifies a critical type safety issue where a template parameter could lead to compilation errors and suggests using existing vectorized methods for state norm calculations to improve performance.
7b7e2e8 to
3b6accd
Compare
sergeisakov
requested changes
May 7, 2026
Collaborator
sergeisakov
left a comment
There was a problem hiding this comment.
Thank you for adding this. In general, it looks good to me. I have just two minor requests.
| return 0; | ||
| } | ||
|
|
||
| static unsigned SIMDRegisterSize() { return 4; } |
Collaborator
There was a problem hiding this comment.
Could you format this function as
/**
* @return The size of SIMD register if applicable.
*/
static unsigned SIMDRegisterSize() {
return 4;
}
|
|
||
| using Op = std::plus<std::complex<double>>; | ||
| return for_.RunReduce(size, f, Op(), w, ms, xss, qs[0], state.get()); | ||
| } |
Collaborator
There was a problem hiding this comment.
Could you add an empty line between } and For for_;?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds initial ARM NEON integration by introducing:
lib/simulator_neon.hlib/statespace_neon.hlib/simmux.hdispatch updates for__ARM_NEON__Notes:
__ARM_NEON__.