Closed Yash-10 closed 5 months ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.81%. Comparing base (
72f0542
) to head (4c9d7aa
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I am a bit unsure about the expected mypy error:
cirq-core/cirq/vis/heatmap.py:325: error: Item "None" of "Optional[Any]" has no attribute "update" [union-attr]
because self._config.collection_options
, even if not passed, is set to a dictionary by default in __init__
({"cmap" : "viridis"}
), so it should never be None. I understand it's trying to look at all possible types (for example, if, in the future, collection_options
is not set to a dictionary), then it may raise this error.
I am a bit unsure about the expected mypy error:
cirq-core/cirq/vis/heatmap.py:325: error: Item "None" of "Optional[Any]" has no attribute "update" [union-attr]
That is expected - mypy is a static typechecker and can only analyze possible return types from self._config.get(...)
which include None. I would use self._config["collection_options"]
instead.
Thank you, @pavoljuhas; the error is resolved now.
The CLA error occurs because I had used one of the commit suggestions. See https://github.com/quantumlib/Cirq/pull/6642/commits/aa1ed053b5f9bb2969093b4df5d84c7ecd92893e.
@Yash-10 huh, interesting I didn't notice that github doesn't like my personal account. anyway remove that commit and add the changes yourselve. you may need to the git push -f
to clear the commit history of this PR
@Yash-10 huh, interesting I didn't notice that github doesn't like my personal account. anyway remove that commit and add the changes yourselve. you may need to the
git push -f
to clear the commit history of this PR
@NoureldinYosri - if the CLA fails only because of your personal email in a commit, we can override it with an explanation note.
@pavoljuhas you can override it without any explanation :D
~@Yash-10 I think the easiest thing to do is, after you address the Pavol's test comment you can close this PR and open a new clean one with all the changes.~
NVM, pavol knows away to override CLA
@Yash-10 I think the easiest thing to do is, after you address the Pavol's test comment you can close this PR and open a new clean one with all the changes.
@Yash-10 - sorry about misunderstanding, we should be able to override the missing CLA check on our side (because it is caused by other authors). It is easier to finalize this PR, no need (hopefully) to create a new one.
Thank you @Yash-10 !
Thank you both of you for your prompt reviews on this!
Issue
For #4691, as part of Unitary Hack 2024.
Checklist
plot()
method. A subset of qubits is highlighted in the heatmap if a list of qubits is passed; otherwise, the default behavior is retained.collection_options
.collection_options
are checked for this purpose.Example visualizations
A single qubit
Two-qubit interactions