Add MultiStepMultiLevelReset gate - #8320
Conversation
71aed44 to
2954415
Compare
2954415 to
d1d789c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8320 +/- ##
==========================================
- Coverage 99.59% 99.59% -0.01%
==========================================
Files 1125 1127 +2
Lines 103250 103436 +186
==========================================
+ Hits 102829 103014 +185
- Misses 421 422 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """Multi-step multi-level reset gate.""" |
There was a problem hiding this comment.
This comment is not super helpful. Either expand it or remove it, as it is basically a restatement of the file name right now.
|
|
||
| import cirq | ||
|
|
||
| ValueOrSymbol: TypeAlias = tu.Value | sympy.Basic |
There was a problem hiding this comment.
Don't these aliases already exist somewhere?
|
|
||
| @attrs.frozen(eq=False, hash=False) | ||
| class MultiStepMultiLevelReset(cirq.Gate): | ||
| """Multi-step multi-level reset gate. |
There was a problem hiding this comment.
I think this could use some extra information. I think the parameters are pretty difficult to understand without a bit of description as to what this gate is doing.
| padding_before: Padding time before the reset trajectory. | ||
| padding_after: Padding time after the reset trajectory. | ||
| detune_to_start_freq: Whether to detune to start frequency first. | ||
| start_at_readout_detuning: Whether to start at readout detuning. |
There was a problem hiding this comment.
How does this differ from already_at_readout_detuning?
|
|
||
| def _serialize_value(value: Any, out_msg: v2.program_pb2.Arg) -> None: | ||
| if isinstance(value, dict): | ||
| val = "__JSON_DICT__:" + json.dumps(value) |
There was a problem hiding this comment.
I don't know about this. Why are we serializing to JSON for dicts? protos have maps.
This adds the MSMLR gate to cirq_google. It should be similar to #8089 which added the MultilevelResetViaResonator gate to cirq_google.