Commit 6e47e2e
Add classical conditions to cirq_google proto (#7250)
* Add tuples, ndarrays, and complex numbers to cirq_google proto
- Adds support for (potentially nested) tuples of mismatched types
- Adds support for serializing ndarrays
- Adds support for serializing complex numbers
* my o my, it's mypy
* Fix all the review comments, add set support.
* Fix invert mask, which assumes list, so it can accept tuples.
* Update cirq-google/cirq_google/serialization/arg_func_langs.py
Co-authored-by: Pavol Juhas <[email protected]>
* Fix coverage.
* Add classical conditions to cirq_google proto
- Adds classical conditions to cirq_google proto.
- Adds fields to MeasurementKey to support various (possibly nested)
conditions.
- Centralize and generalize sympy operations. Add comparison operators
(==, !=, <, >, <=, >=)
- Add support for KeyCondition, SympyCondition, and BitMaskKeyCondition
- Adds conditioned_on to Operation proto.
- Adds repeat_until and conditioned_on to CircuitOperation proto.
* Add use_repetitions_id
* Add sympy booleans and indexed.
* Fix indexed issue.
---------
Co-authored-by: Pavol Juhas <[email protected]>1 parent da6ec5d commit 6e47e2e
File tree
11 files changed
+476
-172
lines changed- cirq-google/cirq_google
- api/v2
- serialization
11 files changed
+476
-172
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
255 | 260 | | |
256 | 261 | | |
257 | 262 | | |
| |||
382 | 387 | | |
383 | 388 | | |
384 | 389 | | |
| 390 | + | |
385 | 391 | | |
386 | 392 | | |
387 | 393 | | |
| |||
460 | 466 | | |
461 | 467 | | |
462 | 468 | | |
| 469 | + | |
463 | 470 | | |
464 | 471 | | |
465 | 472 | | |
| |||
505 | 512 | | |
506 | 513 | | |
507 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
508 | 524 | | |
509 | 525 | | |
510 | 526 | | |
| |||
542 | 558 | | |
543 | 559 | | |
544 | 560 | | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
545 | 572 | | |
546 | 573 | | |
547 | 574 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments