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

Move cirq/ops/moment.py to cirq/circuits/moment.py #4932

Merged
merged 15 commits into from
Feb 5, 2022

Conversation

pavoljuhas
Copy link
Collaborator

Deprecate module cirq.ops.moment and attribute cirq.ops.Moment.

This finalizes #4838 by Tanuj Khattar.
Fixes #4665

@pavoljuhas pavoljuhas requested a review from maffoo February 2, 2022 08:00
@CirqBot CirqBot added the size: L 250< lines changed <1000 label Feb 2, 2022
Use `cirq.circuits.Moment` instead.
mypy seems to interpret left-hand-side `ops.Moment` as attribute access
and complains the attribute is not set.
@pavoljuhas
Copy link
Collaborator Author

@tanujkhattar - ready for review.

Copy link
Collaborator

@tanujkhattar tanujkhattar left a comment

Choose a reason for hiding this comment

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

LGTM % nits.

Thanks a lot for doing this!

cirq-core/cirq/circuits/moment_test.py Outdated Show resolved Hide resolved
@tanujkhattar tanujkhattar merged commit 8b64834 into quantumlib:master Feb 5, 2022
@pavoljuhas pavoljuhas deleted the move_moment-next-2 branch February 8, 2022 01:19
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
* Move cirq/ops/moment.py to cirq/circuits/moment.py

* Deprecate module cirq.ops.moment and cirq.ops.Moment

* Ignore mypy error on setting submodule attribute

mypy seems to interpret left-hand-side `ops.Moment` as attribute access
and complains the attribute is not set.

* Add test for `Moment._with_key_path_prefix_`

* Decouple `with_key_path_prefix` test from `with_key_path`

Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* Move cirq/ops/moment.py to cirq/circuits/moment.py

* Deprecate module cirq.ops.moment and cirq.ops.Moment

* Ignore mypy error on setting submodule attribute

mypy seems to interpret left-hand-side `ops.Moment` as attribute access
and complains the attribute is not set.

* Add test for `Moment._with_key_path_prefix_`

* Decouple `with_key_path_prefix` test from `with_key_path`

Co-authored-by: Tanuj Khattar <tanujkhattar@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: L 250< lines changed <1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move cirq/ops/moment.py to cirq/circuits/moment.py ?
3 participants