-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Create a unitary to pauli string transformer #6100
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
Merged
NoureldinYosri
merged 15 commits into
quantumlib:master
from
NoureldinYosri:pauli_string_transformer2
Jul 5, 2023
Merged
Create a unitary to pauli string transformer #6100
NoureldinYosri
merged 15 commits into
quantumlib:master
from
NoureldinYosri:pauli_string_transformer2
Jul 5, 2023
Conversation
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
dstrain115
reviewed
Jun 7, 2023
cirq-core/cirq/transformers/analytical_decompositions/pauli_string_decomposition.py
Show resolved
Hide resolved
cirq-core/cirq/transformers/analytical_decompositions/pauli_string_decomposition.py
Show resolved
Hide resolved
cirq-core/cirq/transformers/analytical_decompositions/pauli_string_decomposition_test.py
Outdated
Show resolved
Hide resolved
got = unitary_to_pauli_string(protocols.unitary(want)) | ||
assert got is not None | ||
assert np.all(want.pauli_mask == got.pauli_mask) | ||
assert np.isclose(cast(np.complex128, want.coefficient), cast(np.complex128, got.coefficient)) |
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.
Should we add a test for eps != 0 as well?
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.
the default value is eps=1e-15
not zero.
@dstrain115 PTAL |
@dstrain115 ping |
dstrain115
approved these changes
Jul 5, 2023
cirq-core/cirq/transformers/analytical_decompositions/pauli_string_decomposition.py
Outdated
Show resolved
Hide resolved
cirq-core/cirq/transformers/analytical_decompositions/pauli_string_decomposition.py
Outdated
Show resolved
Hide resolved
harry-phasecraft
pushed a commit
to PhaseCraft/Cirq
that referenced
this pull request
Oct 31, 2024
- This is the first step to implementing the algorithm in quantumlib#5906 (comment) - Based on https://quantumcomputing.stackexchange.com/questions/13157/how-do-i-check-if-a-gate-represented-by-unitary-u-is-a-clifford-gate#comment17495_13158 - The complexity of this algorithm is $\mathcal{O}(n 4^n)$ where $n$ is the number of qubits it acts on or alternatively $\mathcal{O}(S \log_4{S})$ where $S$ is the size of the unitary.
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.
_decompose_into_clifford_with_qubits_
andhas_stabilizer_effect
protocols #5906 (comment)