Skip to content

Conversation

@95-martin-orion
Copy link
Collaborator

Part of #3494 (requires deprecation cycle to resolve).

This adds the copy parameter to all state_vector methods affected by #3494, and sets up deprecation messages to change the default copy behavior to "don't copy" in the next Cirq release.

The only substantive changes are in sparse_simulator.py, state_vector.py, and state_vector_simulator.py; all other changes simply inject copy to prevent deprecation warnings from state_vector calls (True for step results, False for final results).

@CirqBot CirqBot added the size: M 50< lines changed <250 label May 3, 2022
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@95-martin-orion 95-martin-orion requested a review from viathor May 3, 2022 18:39
@95-martin-orion
Copy link
Collaborator Author

Pinging @dabacon for review.

@95-martin-orion
Copy link
Collaborator Author

@dabacon this is part of a pre-1.0 issue, PTAL or reassign as needed.

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 Jun 10, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jun 10, 2022
@CirqBot CirqBot merged commit a402385 into quantumlib:master Jun 10, 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 Jun 10, 2022
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
Part of quantumlib#3494 (requires deprecation cycle to resolve).

This adds the `copy` parameter to all `state_vector` methods affected by quantumlib#3494, and sets up deprecation messages to change the default copy behavior to "don't copy" in the next Cirq release.

The only substantive changes are in `sparse_simulator.py`, `state_vector.py`, and `state_vector_simulator.py`; all other changes simply inject `copy` to prevent deprecation warnings from `state_vector` calls (True for step results, False for final results).
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
Part of quantumlib#3494 (requires deprecation cycle to resolve).

This adds the `copy` parameter to all `state_vector` methods affected by quantumlib#3494, and sets up deprecation messages to change the default copy behavior to "don't copy" in the next Cirq release.

The only substantive changes are in `sparse_simulator.py`, `state_vector.py`, and `state_vector_simulator.py`; all other changes simply inject `copy` to prevent deprecation warnings from `state_vector` calls (True for step results, False for final results).
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.

4 participants