- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1
Allow measurements and resets into Gemini noise model. #583
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
base: main
Are you sure you want to change the base?
Conversation
| Codecov Report❌ Patch coverage is  
 📢 Thoughts on this report? Let us know! | 
| ☂️ Python Coverage
 Overall Coverage
 New FilesNo new covered files... Modified Files
 
 | 
|  | ||
| gate = operation.gate | ||
| for allowed_family in allowed_target_gates: | ||
| for allowed_family in set(allowed_target_gates).union({cirq.GateFamily(gate=cirq.ops.common_channels.ResetChannel, ignore_global_phase=True)}): | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just add that to the allowed gates with e.g.
reset_family = cirq.GateFamily(gate=cirq.ResetChannel, ignore_global_phase=True)
allowed_target_gates: frozenset[cirq.GateFamily] = cirq.CZTargetGateset(additional_gates=[reset_family]).gatesYour approach here works as well though.
| @tcochran-quera This looks like a good approach here. Could you also add a unit test? Regarding adding errors: do we know the length of remaining operations? Or does that mean we'd have to iterate over the entire circuit another time? | 
| 
 Probably we could have something reasonable that wouldn't require looping over the entire circuit for each measurement moment. I'll play with it some when i get the chance. | 
| 
 @tcochran-quera cool! In the meantime, would you want to have this change merged in? | 
| 
 I'm okay waiting until this is finalized before we merge, but I don't feel strongly about it. | 
| 
 I see. Well, since there's a lot of changes going in right now, it might make sense not to rush this one here. I'll just wait until you ping me again. | 
To simulate some operations, for example multiple rounds of syndrome extraction, it is useful to be able to measure and reuse the measurement qubits in the cirq simulation to save on RAM (even if on Gemini we will actually use different measurement atoms for each round of syndrome extraction).
Here is a minimum fix to allow for measurement and reset gates in the noise models. The next step would be to add error in the measurement that is proportional to the number of gate operations left in the circuit, since in Gemini we will have to wait until the end of the circuit to measure any atom.
@david-pl what do you think is the right course of action?