Skip to content
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

Clifford optimize either should support more general pauli phases or make assert #2962

Closed
dabacon opened this issue May 4, 2020 · 0 comments · Fixed by #5060
Closed

Clifford optimize either should support more general pauli phases or make assert #2962

dabacon opened this issue May 4, 2020 · 0 comments · Fixed by #5060
Labels
area/clifford-optimizer area/contrib complexity/medium introduces/modifies 3-5 concepts, takes max up to a month for an advanced contributor kind/health For CI/testing/release process/refactoring/technical debt items skill-level/expert One or more of the areas need deep expertise. triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on

Comments

@dabacon
Copy link
Collaborator

dabacon commented May 4, 2020

In the code to merge Clifford operations there is code that only works if a pauli string coefficient is $\pm 1$. If not it raises a NotImplementError, lines that are not tested :(

My suspicion here is that at this point the phase can only be these two values, but someone will need to better understand this code and the associated TODO.

@balopat balopat added area/clifford-optimizer area/contrib complexity/medium introduces/modifies 3-5 concepts, takes max up to a month for an advanced contributor kind/health For CI/testing/release process/refactoring/technical debt items skill-level/expert One or more of the areas need deep expertise. triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on labels Sep 18, 2020
CirqBot pushed a commit that referenced this issue Mar 8, 2022
Fixes #2962

@dabacon hunch was correct. The coefficient is initialized at 1, and can only be negated. Changed the error to an assertion accordingly,

https://github.com/quantumlib/Cirq/blob/9cefed8c384dc8a6751e4fe114873bf349160721/cirq-core/cirq/ops/pauli_string.py#L946

Update: Removed the assertion entirely since that assertion already exists in `PauliStringPhasor.__init__`
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
Fixes quantumlib#2962

@dabacon hunch was correct. The coefficient is initialized at 1, and can only be negated. Changed the error to an assertion accordingly,

https://github.com/quantumlib/Cirq/blob/9cefed8c384dc8a6751e4fe114873bf349160721/cirq-core/cirq/ops/pauli_string.py#L946

Update: Removed the assertion entirely since that assertion already exists in `PauliStringPhasor.__init__`
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this issue Oct 31, 2024
Fixes quantumlib#2962

@dabacon hunch was correct. The coefficient is initialized at 1, and can only be negated. Changed the error to an assertion accordingly,

https://github.com/quantumlib/Cirq/blob/9cefed8c384dc8a6751e4fe114873bf349160721/cirq-core/cirq/ops/pauli_string.py#L946

Update: Removed the assertion entirely since that assertion already exists in `PauliStringPhasor.__init__`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clifford-optimizer area/contrib complexity/medium introduces/modifies 3-5 concepts, takes max up to a month for an advanced contributor kind/health For CI/testing/release process/refactoring/technical debt items skill-level/expert One or more of the areas need deep expertise. triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants