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

Convert with_measurement_key_mapping to use Mapping #5552

Closed
95-martin-orion opened this issue Jun 17, 2022 · 0 comments · Fixed by #5610
Closed

Convert with_measurement_key_mapping to use Mapping #5552

95-martin-orion opened this issue Jun 17, 2022 · 0 comments · Fixed by #5610
Labels
area/measurements area/protocols kind/feature-request Describes new functionality triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on

Comments

@95-martin-orion
Copy link
Collaborator

The with_measurement_key_mapping currently asks for a Dict, but really only needs a Mapping. This hurts us in #5548, where we have access to a mapping and are forced to copy it into a dict.

Note that this may be a breaking change, as code outside of Cirq may also implement this protocol.

@95-martin-orion 95-martin-orion added triage/discuss Needs decision / discussion, bring these up during Cirq Cynque kind/feature-request Describes new functionality area/protocols area/measurements labels Jun 17, 2022
@tanujkhattar tanujkhattar added triage/duplicate This issue or pull request is addressed by another issue or pull request triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on time/before-1.0 and removed triage/discuss Needs decision / discussion, bring these up during Cirq Cynque triage/duplicate This issue or pull request is addressed by another issue or pull request labels Jun 22, 2022
CirqBot pushed a commit that referenced this issue Jun 25, 2022
Fixes #5552.

Since this change only* affects type annotations, it is non-breaking. Any breakages due to `ParamResolver.param_dict` becoming immutable should instead refer to #5548, where this change was applied.

*Okay, it also removes some `dict` calls, but those were added in #5548.
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
Fixes quantumlib#5552.

Since this change only* affects type annotations, it is non-breaking. Any breakages due to `ParamResolver.param_dict` becoming immutable should instead refer to quantumlib#5548, where this change was applied.

*Okay, it also removes some `dict` calls, but those were added in quantumlib#5548.
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this issue Oct 31, 2024
Fixes quantumlib#5552.

Since this change only* affects type annotations, it is non-breaking. Any breakages due to `ParamResolver.param_dict` becoming immutable should instead refer to quantumlib#5548, where this change was applied.

*Okay, it also removes some `dict` calls, but those were added in quantumlib#5548.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/measurements area/protocols kind/feature-request Describes new functionality 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