Skip to content

Make gate_sets actually optional #4850

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

Conversation

dstrain115
Copy link
Collaborator

  • mypy and pycharm need a default value in the abstract interface
    in order to be truly optional.
  • Also, add a copy of the inherited arguments in
    SimulatedLocalProcessor.

- mypy and pycharm need a default value in the abstract interface
in order to be truly optional.
- Also, add a copy of the inherited arguments in
SimulatedLocalProcessor.
@dstrain115 dstrain115 requested review from cduck, vtomole, wcourtney and a team as code owners January 17, 2022 14:21
@CirqBot CirqBot added the size: S 10< lines changed <50 label Jan 17, 2022
@dstrain115 dstrain115 requested a review from mpharrigan January 17, 2022 17:16
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.

All of the changes here look like dangerous default values. Would it be possible for the optional case to do something like:

def my_method(some_optional_thing = None):
   if some_optional_thing is None:
    some_optional_thing = promote_to(somethingorother)

?

@dstrain115
Copy link
Collaborator Author

All of the changes here look like dangerous default values. Would it be possible for the optional case to do something like:

Changed.

@mpharrigan
Copy link
Collaborator

what about get_sampler

@mpharrigan
Copy link
Collaborator

oh weird maybe I was looking at only a subset of commits

@MichaelBroughton MichaelBroughton added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jan 19, 2022
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jan 19, 2022
@CirqBot CirqBot merged commit 8a78e10 into quantumlib:master Jan 19, 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 Jan 19, 2022
MichaelBroughton pushed a commit to MichaelBroughton/Cirq that referenced this pull request Jan 22, 2022
- mypy and pycharm need a default value in the abstract interface
in order to be truly optional.
- Also, add a copy of the inherited arguments in
SimulatedLocalProcessor.
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
- mypy and pycharm need a default value in the abstract interface
in order to be truly optional.
- Also, add a copy of the inherited arguments in
SimulatedLocalProcessor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants