-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix column major data layout in bindings #126
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #126 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 54 54
=========================================
Hits 54 54 Continue to review full report at Codecov.
|
[ch8073] |
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.
💯
This reverts commit 14ea923.
This reverts commit 1de97e6.
* Update method signatures for bound class (#125) * Add utility to get qubit number * Define gate overloads to enable run-time generalised calls * Update method signatures * Update changelog * Fix column major data layout in bindings (#126) * Fix column major data layout bindings * Update changelog * increment version, update changelog, gitignore a build folder * no Python version 3.6 * changelog for removing Python 3.6 * Revert "Fix column major data layout in bindings (#126)" This reverts commit 14ea923. * resolve changelog conflict * Update .github/CHANGELOG.md * Revert "Revert "Fix column major data layout in bindings (#126)"" This reverts commit 1de97e6. Co-authored-by: Lee James O'Riordan <[email protected]> Co-authored-by: Antal Szava <[email protected]>
* V17.0 increment version (#127) * Update method signatures for bound class (#125) * Add utility to get qubit number * Define gate overloads to enable run-time generalised calls * Update method signatures * Update changelog * Fix column major data layout in bindings (#126) * Fix column major data layout bindings * Update changelog * increment version, update changelog, gitignore a build folder * no Python version 3.6 * changelog for removing Python 3.6 * Revert "Fix column major data layout in bindings (#126)" This reverts commit 14ea923. * resolve changelog conflict * Update .github/CHANGELOG.md * Revert "Revert "Fix column major data layout in bindings (#126)"" This reverts commit 1de97e6. Co-authored-by: Lee James O'Riordan <[email protected]> Co-authored-by: Antal Szava <[email protected]> * organise changelog * version bump Co-authored-by: Christina Lee <[email protected]> Co-authored-by: Lee James O'Riordan <[email protected]>
* V17.0 increment version (#127) * Update method signatures for bound class (#125) * Add utility to get qubit number * Define gate overloads to enable run-time generalised calls * Update method signatures * Update changelog * Fix column major data layout in bindings (#126) * Fix column major data layout bindings * Update changelog * increment version, update changelog, gitignore a build folder * no Python version 3.6 * changelog for removing Python 3.6 * Revert "Fix column major data layout in bindings (#126)" This reverts commit 14ea923. * resolve changelog conflict * Update .github/CHANGELOG.md * Revert "Revert "Fix column major data layout in bindings (#126)"" This reverts commit 1de97e6. Co-authored-by: Lee James O'Riordan <[email protected]> Co-authored-by: Antal Szava <[email protected]> * Update documentation for Python bindings * Add docstrings to gate matrix definitions * Add docstrings for all publically facing statevector methods * Fix incorrectly labelled gatecalls * Update doxygen comments to ignore anon namespaces * Move exc into namespace * Update missing gates * Enable build of C++ API with docs * Add C++ API to docs * Add C4 arch diagrams for lightning * Add sample C4 architecture for lightning using current design * Fix missing packages * Update documentation architecture * Prevent bindings from generating API docs * Update changelog Co-authored-by: Christina Lee <[email protected]> Co-authored-by: Antal Szava <[email protected]> Co-authored-by: Tom Bromley <[email protected]>
Context: This PR fixes issues observed when passing numpy data in column-major layout to the row-major backed C++ bindings.
Description of the Change: Numpy data is forced to C-style (row-major) layout when passing numpy arrays to the C++ backend.
Benefits: This ensures correctness for both row and column major data layouts.
Possible Drawbacks: Column major layout data will experience a small overhead (though we should be using row-major everything).
Related GitHub Issues: #124