-
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
Replace old backend with new #67
Merged
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
5e24700
Update
trbromley 2e0f9bb
swap
trbromley e467754
Remove benchmark (we can use benchmark suite)
trbromley 21dd041
Remove
trbromley 1623117
update setup
trbromley a02030d
Remove bench
trbromley 4469b59
Rm old backend
trbromley f8dce78
Move location
trbromley b3d6575
Removals of eigen
trbromley 483d173
Fix
trbromley 08a95db
Fix typo in gate
trbromley a878052
Correct gate type
trbromley 39f2509
Fix Tgate
trbromley a62245d
Fix PhaseGate
trbromley a1f74f5
Fix CRY
trbromley e8c70aa
Remove extra test
trbromley c7861cd
Hack in Hermitian support
trbromley 81c158e
Merge branch 'master' into switch_backend
trbromley 9ee0e31
Merge branch 'master' into switch_backend
trbromley f1e87c3
Rename
trbromley 4cad99c
Add new test empty
trbromley b6df95c
Update makefile
trbromley 5bfefcd
Merge branch 'master' into switch_backend
trbromley abb890f
Update
trbromley 1d38abc
Move getIndicesAfterExclusion
trbromley 37a9e4c
generateBitPatterns
trbromley a2750c1
Remove from apply
trbromley 07b56a7
Move constructAndApplyOperation to Gates
trbromley 2a91beb
Revert "Remove from apply"
trbromley f092d71
Merge branch 'master' into switch_backend
trbromley e53b5de
Re-add dependencies
trbromley 86e2ff8
Remove eigen from deploy
trbromley b93e079
Remove eigen from wheels
trbromley bb61ea3
Update Changelog
trbromley 2f3020f
Re-add dependency
trbromley 79a7295
Typo
trbromley a80a7e9
Revert "generateBitPatterns"
trbromley fb7377c
Revert "Move getIndicesAfterExclusion"
trbromley 69839e2
Remove
trbromley 0b0aec6
Update setup
trbromley 0200222
Fix CI
trbromley 4f34cd5
Merge branch 'master' into switch_backend
trbromley 322d80b
Update CHANGELOG.md
trbromley 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
Move getIndicesAfterExclusion
- Loading branch information
commit 1d38abc588b796843e420efad9fb99c8d2512b13
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2021 Xanadu Quantum Technologies Inc. | ||
|
||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
|
||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
#include <set> | ||
|
||
#include "Util.hpp" | ||
|
||
using std::set; | ||
using std::vector; | ||
|
||
vector<unsigned int> Pennylane::getIndicesAfterExclusion(const vector<unsigned int>& indicesToExclude, const unsigned int qubits) { | ||
set<unsigned int> indices; | ||
for (unsigned int i = 0; i < qubits; i++) { | ||
indices.insert(indices.end(), i); | ||
} | ||
for (const unsigned int& excludedIndex : indicesToExclude) { | ||
indices.erase(excludedIndex); | ||
} | ||
return vector<unsigned int>(indices.begin(), indices.end()); | ||
} |
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
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.