Add num_qubits to DepolarizingChannel cirq_google serialization#7502
Merged
dstrain115 merged 2 commits intoquantumlib:mainfrom Jul 18, 2025
Merged
Add num_qubits to DepolarizingChannel cirq_google serialization#7502dstrain115 merged 2 commits intoquantumlib:mainfrom
dstrain115 merged 2 commits intoquantumlib:mainfrom
Conversation
Collaborator
dstrain115
commented
Jul 17, 2025
- Currently, serialization fails if more than 1 qubit is given.
- Currently, serialization fails if more than 1 qubit is given.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7502 +/- ##
=======================================
Coverage 98.68% 98.68%
=======================================
Files 1091 1091
Lines 96863 96948 +85
=======================================
+ Hits 95589 95673 +84
- Misses 1274 1275 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
pavoljuhas
reviewed
Jul 18, 2025
| op = gate(*qubits) | ||
| elif which_gate_type == 'noisechannel': | ||
| which_channel_type = operation_proto.noisechannel.WhichOneof('channel_value') | ||
| print('dingdong') |
Collaborator
There was a problem hiding this comment.
Please clean up debug prints here and below.
pavoljuhas
approved these changes
Jul 18, 2025
Collaborator
pavoljuhas
left a comment
There was a problem hiding this comment.
LGTM with debugging printouts removed.
pavoljuhas
reviewed
Jul 18, 2025
| operation_proto.noisechannel.depolarizingchannel.probability | ||
| ) | ||
| num_qubits = operation_proto.noisechannel.depolarizingchannel.num_qubits | ||
| print(num_qubits) |
Collaborator
There was a problem hiding this comment.
Should we check for num_qubits == 0 here or is it OK to let it cause zero division in the DepolarizingChannel?
This was referenced Aug 5, 2025
This was referenced Jan 12, 2026
Create an Gateset.__ini__ option to accept classically controlled operations
NoureldinYosri/Cirq#267
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.