-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add support for float and double precision data #113
Merged
Merged
Changes from 50 commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
175e9b2
Initial reformat and templated of gate tests
mlxd ae8d7c3
Redefine gate mappings with templates
mlxd b7d5106
Record given state
mlxd 85fe333
Move all gate classes to become StateVector methods
mlxd dc70228
Fix compile errors for SV
mlxd 6a4fa76
Refactor gates implementation
mlxd 6d85893
Enable vector param methods
mlxd dad9c8a
Enable label to gatename map
mlxd 0d6af2f
Support dispatch directly from StateVector class
mlxd e157b99
Add apply methods to SV class
mlxd 3286f40
Add log2 utility function
mlxd fe7bf57
Remove old file arch
mlxd 2c0e318
Ensure bindings build support for float and double sizes complex data
mlxd cdd7814
Remove outdated tests for deleted modules
mlxd 5da9487
Remove old definition headers
mlxd 2ad4801
Tidy dispatch map
mlxd 88a5341
Replace header with correct type
mlxd f3e4c49
Ensure cpp17 is now used
mlxd 8c03920
Remove unneeded files in compilation
mlxd 6318cc5
Ensure apply args are given in correct order
mlxd cc06018
Allow make test to be run from working dir without cleaning
mlxd b608595
Fix cpp formatting
mlxd 6652244
Merge branch 'master' into 7067-templated-float
mlxd 09b786b
Remove old code and fix codefactor complaints
mlxd 810c52f
Add cast to enable wheel build on MacOS
mlxd a90d9a9
Enable MSVC intrinsics if using Windows
mlxd a7c80ea
Ensure C++17 as a requirement
mlxd f627831
Fix compile-time ifdef
mlxd f90f915
Replace intrinsic with BSR
mlxd 9a5c566
Avoid intrinsics for portability
mlxd 23128d9
Rename log2 function
mlxd 43a5d05
Add support for 64bit and 128 complex numbers from C++ backend
mlxd 4b83854
Update bindings to allow class instantiation and method use
mlxd 2710e4e
Enable support for different precision parameters passed to backend
mlxd 7e31fbb
Fix log2 change
mlxd 05ff35d
Fix binding names
mlxd b4c1a3f
Remove io from statevector
mlxd db9d1ed
Refix the log2 -- replace with instrinsics later
mlxd 15fba88
Update format and remove ununsed warnings
mlxd e8e736d
Merge branch 'master' into 7067-templated-float
mlxd f91f763
Refactor the testing infrastructure for templated StateVector impleme…
mlxd 1919128
Remove whitespace for CF complaints
mlxd 811953b
Apply static analyser fixes
mlxd 3d886c0
Add imaginary utils
mlxd 8e17ea4
Refactor gate implementation and utility definitions
mlxd b6c309f
Fix RY gate defn
mlxd 75de30c
Add compile-time complex multiplication functions
mlxd 9ef3f2e
Use gate definition functions in tests and add constexpr where applic…
mlxd 1338696
Remove outdated test utilities and tests
mlxd 27faeb3
Update changelog
mlxd e1b8cee
Merge branch 'master' into 7067-templated-float
mlxd d28f5e5
Port ControlledPhaseShift to new simulator structure
mlxd 11d62af
Add ControlledPhaseShift method to bindings
mlxd dd4ea59
Ensure tests are run using cmake
mlxd 85aad92
Rename label CPhaseShift to ControlledPhasedShift
mlxd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,21 +13,36 @@ jobs: | |
matrix: | ||
os: [ubuntu-20.04] | ||
steps: | ||
- name: Cancel previous runs | ||
uses: styfle/[email protected] | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get update && sudo apt-get -y -q install cmake gcc | ||
|
||
- name: Install Google Test | ||
run: | | ||
wget -qO - https://github.com/google/googletest/archive/release-1.10.0.tar.gz | tar -xz | ||
cmake -D CMAKE_INSTALL_PREFIX:PATH=$HOME/googletest -D CMAKE_BUILD_TYPE=Release googletest-release-1.10.0 | ||
make install | ||
|
||
- name: Build and run unit tests | ||
run: | | ||
cd pennylane_lightning/src/tests | ||
GOOGLETEST_DIR=$HOME/googletest make test | ||
cmake . -BBuild -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=1 | ||
cmake --build ./Build | ||
mkdir -p ./Build/tests/results | ||
./Build/tests/runner --order lex --reporter junit --out ./Build/tests/results/report.xml | ||
|
||
- name: Upload test results | ||
uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: ubuntu-test-report | ||
path: Build/tests/results/report.xml | ||
|
||
- name: Publish test results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
if: always() | ||
with: | ||
check_name: Test Report (C++) on Ubuntu | ||
files: Build/tests/results/report.xml | ||
|
||
pythontests: | ||
name: Python tests | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
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.