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

Wrap private fields for DensePauliString #5064

Merged
merged 2 commits into from
Mar 13, 2022

Conversation

daxfohl
Copy link
Collaborator

@daxfohl daxfohl commented Mar 9, 2022

#4851 for DensePauliString. This was slightly less straightforward than others.

  • Required moving ALLOW_DEPRECATION_IN_TEST or else a circular dependency was created.
  • One place externally where setting the field still was necessary. (A factory method in CliffordGate).
  • One member is of type ndarray, which is mutable, so we set flags.writeable = False

@daxfohl daxfohl requested review from a team, vtomole and cduck as code owners March 9, 2022 00:30
@daxfohl daxfohl requested a review from dabacon March 9, 2022 00:30
@CirqBot CirqBot added the size: M 50< lines changed <250 label Mar 9, 2022
@MichaelBroughton MichaelBroughton self-assigned this Mar 13, 2022
Copy link
Collaborator

@MichaelBroughton MichaelBroughton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MichaelBroughton MichaelBroughton added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Mar 13, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Mar 13, 2022
@CirqBot CirqBot merged commit 27f92ae into quantumlib:master Mar 13, 2022
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Mar 13, 2022
@daxfohl daxfohl deleted the privatevarsdps branch March 13, 2022 21:46
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
quantumlib#4851 for `DensePauliString`. This was *slightly* less straightforward than others.

* Required moving `ALLOW_DEPRECATION_IN_TEST` or else a circular dependency was created.
* One place externally where setting the field still was necessary. (A factory method in `CliffordGate`).
* One member is of type `ndarray`, which is mutable, so we set `flags.writeable = False`
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
quantumlib#4851 for `DensePauliString`. This was *slightly* less straightforward than others.

* Required moving `ALLOW_DEPRECATION_IN_TEST` or else a circular dependency was created.
* One place externally where setting the field still was necessary. (A factory method in `CliffordGate`).
* One member is of type `ndarray`, which is mutable, so we set `flags.writeable = False`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants