-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathprogram_pb2.pyi
1197 lines (1021 loc) · 49.4 KB
/
program_pb2.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
"""
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.internal.enum_type_wrapper
import google.protobuf.message
import sys
import typing
if sys.version_info >= (3, 10):
import typing as typing_extensions
else:
import typing_extensions
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
@typing_extensions.final
class Program(google.protobuf.message.Message):
"""A quantum program."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
LANGUAGE_FIELD_NUMBER: builtins.int
CIRCUIT_FIELD_NUMBER: builtins.int
SCHEDULE_FIELD_NUMBER: builtins.int
CONSTANTS_FIELD_NUMBER: builtins.int
@property
def language(self) -> global___Language:
"""The language in which the program is written."""
@property
def circuit(self) -> global___Circuit:
"""A circuit is an abstract representation as a series of moments, each
moment having a set of gates that act on disjoint qubits. Circuits don't
have absolute times for their operations (gates acting on qubits).
"""
@property
def schedule(self) -> global___Schedule:
"""Schedules are a list of operations (gates acting on qubits) that specify
absolute start times for the operations.
"""
@property
def constants(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Constant]:
"""List to store global constants, such as strings used in many places.
constants are referred to their index in this list, starting at zero.
"""
def __init__(
self,
*,
language: global___Language | None = ...,
circuit: global___Circuit | None = ...,
schedule: global___Schedule | None = ...,
constants: collections.abc.Iterable[global___Constant] | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["circuit", b"circuit", "language", b"language", "program", b"program", "schedule", b"schedule"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["circuit", b"circuit", "constants", b"constants", "language", b"language", "program", b"program", "schedule", b"schedule"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["program", b"program"]) -> typing_extensions.Literal["circuit", "schedule"] | None: ...
global___Program = Program
@typing_extensions.final
class Constant(google.protobuf.message.Message):
"""Constants, such as long strings, that are used throughout the circuit.
These constants can be stored here to save space.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
STRING_VALUE_FIELD_NUMBER: builtins.int
CIRCUIT_VALUE_FIELD_NUMBER: builtins.int
QUBIT_FIELD_NUMBER: builtins.int
string_value: builtins.str
"""String value used throughout the circuit, such as for token values"""
@property
def circuit_value(self) -> global___Circuit:
"""Sub Circuit used for CircuitOperations"""
@property
def qubit(self) -> global___Qubit:
"""Qubits used within the circuit (only populated in v2.5+)"""
def __init__(
self,
*,
string_value: builtins.str = ...,
circuit_value: global___Circuit | None = ...,
qubit: global___Qubit | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["circuit_value", b"circuit_value", "const_value", b"const_value", "qubit", b"qubit", "string_value", b"string_value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["circuit_value", b"circuit_value", "const_value", b"const_value", "qubit", b"qubit", "string_value", b"string_value"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["const_value", b"const_value"]) -> typing_extensions.Literal["string_value", "circuit_value", "qubit"] | None: ...
global___Constant = Constant
@typing_extensions.final
class Circuit(google.protobuf.message.Message):
"""The quantum circuit, specified as a series of moments (abstract
slices of times with gates acting on disjoint sets of qubits).
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
class _SchedulingStrategy:
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType
class _SchedulingStrategyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Circuit._SchedulingStrategy.ValueType], builtins.type): # noqa: F821
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
SCHEDULING_STRATEGY_UNSPECIFIED: Circuit._SchedulingStrategy.ValueType # 0
"""The scheduling strategy is unspecified."""
MOMENT_BY_MOMENT: Circuit._SchedulingStrategy.ValueType # 1
"""Each operation in a moment starts at the same time. The start of the
next moment is given by the duration of the longest operation in
the current moment.
"""
class SchedulingStrategy(_SchedulingStrategy, metaclass=_SchedulingStrategyEnumTypeWrapper):
"""How the circuit is scheduled."""
SCHEDULING_STRATEGY_UNSPECIFIED: Circuit.SchedulingStrategy.ValueType # 0
"""The scheduling strategy is unspecified."""
MOMENT_BY_MOMENT: Circuit.SchedulingStrategy.ValueType # 1
"""Each operation in a moment starts at the same time. The start of the
next moment is given by the duration of the longest operation in
the current moment.
"""
SCHEDULING_STRATEGY_FIELD_NUMBER: builtins.int
MOMENTS_FIELD_NUMBER: builtins.int
scheduling_strategy: global___Circuit.SchedulingStrategy.ValueType
@property
def moments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Moment]:
"""The moments of the circuit, with the first element corresponding to the
first set of operations to apply, etc.
"""
def __init__(
self,
*,
scheduling_strategy: global___Circuit.SchedulingStrategy.ValueType = ...,
moments: collections.abc.Iterable[global___Moment] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["moments", b"moments", "scheduling_strategy", b"scheduling_strategy"]) -> None: ...
global___Circuit = Circuit
@typing_extensions.final
class Moment(google.protobuf.message.Message):
"""A moment is a collection of operations and circuit operations that operate
on a disjoint set of qubits. Conceptually, a moment represents operations
that all occur in the same finite period of time.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
OPERATIONS_FIELD_NUMBER: builtins.int
CIRCUIT_OPERATIONS_FIELD_NUMBER: builtins.int
@property
def operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Operation]:
"""All of the gate operations in the moment. Each operation and circuit
operation must act on different qubits.
"""
@property
def circuit_operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CircuitOperation]:
"""All of the circuit operations in the moment. Each operation and circuit
operation must act on different qubits.
"""
def __init__(
self,
*,
operations: collections.abc.Iterable[global___Operation] | None = ...,
circuit_operations: collections.abc.Iterable[global___CircuitOperation] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["circuit_operations", b"circuit_operations", "operations", b"operations"]) -> None: ...
global___Moment = Moment
@typing_extensions.final
class Schedule(google.protobuf.message.Message):
"""The quantum circuit, specified as a series of operations at specific
start times.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
SCHEDULED_OPERATIONS_FIELD_NUMBER: builtins.int
@property
def scheduled_operations(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ScheduledOperation]:
"""A list of all the operations and their absolute start times."""
def __init__(
self,
*,
scheduled_operations: collections.abc.Iterable[global___ScheduledOperation] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["scheduled_operations", b"scheduled_operations"]) -> None: ...
global___Schedule = Schedule
@typing_extensions.final
class ScheduledOperation(google.protobuf.message.Message):
"""An operation occurring at a specific start time."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
OPERATION_FIELD_NUMBER: builtins.int
START_TIME_PICOS_FIELD_NUMBER: builtins.int
@property
def operation(self) -> global___Operation:
"""Which operation is to be scheduled."""
start_time_picos: builtins.int
"""The start time of the operation, with zero representing the absolute
start of the circuit.
This must be consistent with the moment structure and must be positive.
"""
def __init__(
self,
*,
operation: global___Operation | None = ...,
start_time_picos: builtins.int = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["operation", b"operation"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["operation", b"operation", "start_time_picos", b"start_time_picos"]) -> None: ...
global___ScheduledOperation = ScheduledOperation
@typing_extensions.final
class Language(google.protobuf.message.Message):
"""The language in which the program is expressed."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
GATE_SET_FIELD_NUMBER: builtins.int
ARG_FUNCTION_LANGUAGE_FIELD_NUMBER: builtins.int
gate_set: builtins.str
"""The name of the gate set being used.
Valid names for the gate sets can be found in
cirq_google/serialization/gate_sets.py.
Deprecated: A device now only supports a single gate set.
Previously, the value of this field also refers to the name of the
serializer for the program. Currently, the only serializer available is
CircuitSerializer in cirq_google/serialization/circuit_serializer.py.
"""
arg_function_language: builtins.str
"""The language supported by ArgFunctions. These specifies what allowed
ArgFunction types there are.
Valid names for the arg function language can be found in
cirq/google/arg_func_langs.py
"""
def __init__(
self,
*,
gate_set: builtins.str = ...,
arg_function_language: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["arg_function_language", b"arg_function_language", "gate_set", b"gate_set"]) -> None: ...
global___Language = Language
@typing_extensions.final
class FloatArg(google.protobuf.message.Message):
"""Argument that is constrained to a float or symbolic expression"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
FLOAT_VALUE_FIELD_NUMBER: builtins.int
SYMBOL_FIELD_NUMBER: builtins.int
FUNC_FIELD_NUMBER: builtins.int
float_value: builtins.float
symbol: builtins.str
@property
def func(self) -> global___ArgFunction: ...
def __init__(
self,
*,
float_value: builtins.float = ...,
symbol: builtins.str = ...,
func: global___ArgFunction | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["arg", b"arg", "float_value", b"float_value", "func", b"func", "symbol", b"symbol"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["arg", b"arg", "float_value", b"float_value", "func", b"func", "symbol", b"symbol"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["arg", b"arg"]) -> typing_extensions.Literal["float_value", "symbol", "func"] | None: ...
global___FloatArg = FloatArg
@typing_extensions.final
class XPowGate(google.protobuf.message.Message):
"""Representation of cirq.XPowGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
EXPONENT_FIELD_NUMBER: builtins.int
@property
def exponent(self) -> global___FloatArg: ...
def __init__(
self,
*,
exponent: global___FloatArg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> None: ...
global___XPowGate = XPowGate
@typing_extensions.final
class YPowGate(google.protobuf.message.Message):
"""Representation of cirq.YPowGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
EXPONENT_FIELD_NUMBER: builtins.int
@property
def exponent(self) -> global___FloatArg: ...
def __init__(
self,
*,
exponent: global___FloatArg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> None: ...
global___YPowGate = YPowGate
@typing_extensions.final
class ZPowGate(google.protobuf.message.Message):
"""Representation of cirq.ZPowGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
EXPONENT_FIELD_NUMBER: builtins.int
IS_PHYSICAL_Z_FIELD_NUMBER: builtins.int
@property
def exponent(self) -> global___FloatArg: ...
is_physical_z: builtins.bool
"""If true, this is equivalent to:
cirq.ZPowGate(...).with_tags(cirq.google.PhysicalZTag)
"""
def __init__(
self,
*,
exponent: global___FloatArg | None = ...,
is_physical_z: builtins.bool = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["exponent", b"exponent", "is_physical_z", b"is_physical_z"]) -> None: ...
global___ZPowGate = ZPowGate
@typing_extensions.final
class PhasedXPowGate(google.protobuf.message.Message):
"""Representation of cirq.PhasedXPowGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
PHASE_EXPONENT_FIELD_NUMBER: builtins.int
EXPONENT_FIELD_NUMBER: builtins.int
@property
def phase_exponent(self) -> global___FloatArg: ...
@property
def exponent(self) -> global___FloatArg: ...
def __init__(
self,
*,
phase_exponent: global___FloatArg | None = ...,
exponent: global___FloatArg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["exponent", b"exponent", "phase_exponent", b"phase_exponent"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["exponent", b"exponent", "phase_exponent", b"phase_exponent"]) -> None: ...
global___PhasedXPowGate = PhasedXPowGate
@typing_extensions.final
class PhasedXZGate(google.protobuf.message.Message):
"""Representation of cirq.PhasedXZGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
X_EXPONENT_FIELD_NUMBER: builtins.int
Z_EXPONENT_FIELD_NUMBER: builtins.int
AXIS_PHASE_EXPONENT_FIELD_NUMBER: builtins.int
@property
def x_exponent(self) -> global___FloatArg: ...
@property
def z_exponent(self) -> global___FloatArg: ...
@property
def axis_phase_exponent(self) -> global___FloatArg: ...
def __init__(
self,
*,
x_exponent: global___FloatArg | None = ...,
z_exponent: global___FloatArg | None = ...,
axis_phase_exponent: global___FloatArg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["axis_phase_exponent", b"axis_phase_exponent", "x_exponent", b"x_exponent", "z_exponent", b"z_exponent"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["axis_phase_exponent", b"axis_phase_exponent", "x_exponent", b"x_exponent", "z_exponent", b"z_exponent"]) -> None: ...
global___PhasedXZGate = PhasedXZGate
@typing_extensions.final
class CZPowGate(google.protobuf.message.Message):
"""Representation of cirq.CZPowGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
EXPONENT_FIELD_NUMBER: builtins.int
@property
def exponent(self) -> global___FloatArg: ...
def __init__(
self,
*,
exponent: global___FloatArg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> None: ...
global___CZPowGate = CZPowGate
@typing_extensions.final
class FSimGate(google.protobuf.message.Message):
"""Representation of cirq.FSimGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
THETA_FIELD_NUMBER: builtins.int
PHI_FIELD_NUMBER: builtins.int
@property
def theta(self) -> global___FloatArg: ...
@property
def phi(self) -> global___FloatArg: ...
def __init__(
self,
*,
theta: global___FloatArg | None = ...,
phi: global___FloatArg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["phi", b"phi", "theta", b"theta"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["phi", b"phi", "theta", b"theta"]) -> None: ...
global___FSimGate = FSimGate
@typing_extensions.final
class ISwapPowGate(google.protobuf.message.Message):
"""Representation of cirq.ISwapPowGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
EXPONENT_FIELD_NUMBER: builtins.int
@property
def exponent(self) -> global___FloatArg: ...
def __init__(
self,
*,
exponent: global___FloatArg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["exponent", b"exponent"]) -> None: ...
global___ISwapPowGate = ISwapPowGate
@typing_extensions.final
class MeasurementGate(google.protobuf.message.Message):
"""Representation of cirq.MeasurementGate
i.e. cirq.measure
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
KEY_FIELD_NUMBER: builtins.int
INVERT_MASK_FIELD_NUMBER: builtins.int
@property
def key(self) -> global___Arg: ...
@property
def invert_mask(self) -> global___Arg: ...
def __init__(
self,
*,
key: global___Arg | None = ...,
invert_mask: global___Arg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["invert_mask", b"invert_mask", "key", b"key"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["invert_mask", b"invert_mask", "key", b"key"]) -> None: ...
global___MeasurementGate = MeasurementGate
@typing_extensions.final
class WaitGate(google.protobuf.message.Message):
"""Representation of cirq.WAitGate"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
DURATION_NANOS_FIELD_NUMBER: builtins.int
@property
def duration_nanos(self) -> global___FloatArg:
"""Duration of the waiting period,
serialized to the number of nanoseconds
"""
def __init__(
self,
*,
duration_nanos: global___FloatArg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["duration_nanos", b"duration_nanos"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["duration_nanos", b"duration_nanos"]) -> None: ...
global___WaitGate = WaitGate
@typing_extensions.final
class Operation(google.protobuf.message.Message):
"""An operation acts on a set of qubits."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@typing_extensions.final
class ArgsEntry(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor
KEY_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
key: builtins.str
@property
def value(self) -> global___Arg: ...
def __init__(
self,
*,
key: builtins.str = ...,
value: global___Arg | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ...
GATE_FIELD_NUMBER: builtins.int
XPOWGATE_FIELD_NUMBER: builtins.int
YPOWGATE_FIELD_NUMBER: builtins.int
ZPOWGATE_FIELD_NUMBER: builtins.int
PHASEDXPOWGATE_FIELD_NUMBER: builtins.int
PHASEDXZGATE_FIELD_NUMBER: builtins.int
CZPOWGATE_FIELD_NUMBER: builtins.int
FSIMGATE_FIELD_NUMBER: builtins.int
ISWAPPOWGATE_FIELD_NUMBER: builtins.int
MEASUREMENTGATE_FIELD_NUMBER: builtins.int
WAITGATE_FIELD_NUMBER: builtins.int
INTERNALGATE_FIELD_NUMBER: builtins.int
SINGLEQUBITCLIFFORDGATE_FIELD_NUMBER: builtins.int
ARGS_FIELD_NUMBER: builtins.int
QUBITS_FIELD_NUMBER: builtins.int
QUBIT_CONSTANT_INDEX_FIELD_NUMBER: builtins.int
TOKEN_VALUE_FIELD_NUMBER: builtins.int
TOKEN_CONSTANT_INDEX_FIELD_NUMBER: builtins.int
@property
def gate(self) -> global___Gate:
"""Which gate this operation corresponds to.
Populated pre-v2.5+.
"""
@property
def xpowgate(self) -> global___XPowGate: ...
@property
def ypowgate(self) -> global___YPowGate: ...
@property
def zpowgate(self) -> global___ZPowGate: ...
@property
def phasedxpowgate(self) -> global___PhasedXPowGate: ...
@property
def phasedxzgate(self) -> global___PhasedXZGate: ...
@property
def czpowgate(self) -> global___CZPowGate: ...
@property
def fsimgate(self) -> global___FSimGate: ...
@property
def iswappowgate(self) -> global___ISwapPowGate: ...
@property
def measurementgate(self) -> global___MeasurementGate: ...
@property
def waitgate(self) -> global___WaitGate: ...
@property
def internalgate(self) -> global___InternalGate: ...
@property
def singlequbitcliffordgate(self) -> global___SingleQubitCliffordGate: ...
@property
def args(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___Arg]:
"""Map from the argument name to the Argument needed to fully specify
the gate. Only populated pre-v2.5+.
"""
@property
def qubits(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Qubit]:
"""Which qubits the operation acts on.
Operations should populate one of the following two
fields: either to specify the qubit directly or
to reference an index in the enclosing Program's
constant messages. Note that qubit_constant_index
will only be populated in v2.5+
"""
@property
def qubit_constant_index(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
token_value: builtins.str
token_constant_index: builtins.int
def __init__(
self,
*,
gate: global___Gate | None = ...,
xpowgate: global___XPowGate | None = ...,
ypowgate: global___YPowGate | None = ...,
zpowgate: global___ZPowGate | None = ...,
phasedxpowgate: global___PhasedXPowGate | None = ...,
phasedxzgate: global___PhasedXZGate | None = ...,
czpowgate: global___CZPowGate | None = ...,
fsimgate: global___FSimGate | None = ...,
iswappowgate: global___ISwapPowGate | None = ...,
measurementgate: global___MeasurementGate | None = ...,
waitgate: global___WaitGate | None = ...,
internalgate: global___InternalGate | None = ...,
singlequbitcliffordgate: global___SingleQubitCliffordGate | None = ...,
args: collections.abc.Mapping[builtins.str, global___Arg] | None = ...,
qubits: collections.abc.Iterable[global___Qubit] | None = ...,
qubit_constant_index: collections.abc.Iterable[builtins.int] | None = ...,
token_value: builtins.str = ...,
token_constant_index: builtins.int = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["czpowgate", b"czpowgate", "fsimgate", b"fsimgate", "gate", b"gate", "gate_value", b"gate_value", "internalgate", b"internalgate", "iswappowgate", b"iswappowgate", "measurementgate", b"measurementgate", "phasedxpowgate", b"phasedxpowgate", "phasedxzgate", b"phasedxzgate", "singlequbitcliffordgate", b"singlequbitcliffordgate", "token", b"token", "token_constant_index", b"token_constant_index", "token_value", b"token_value", "waitgate", b"waitgate", "xpowgate", b"xpowgate", "ypowgate", b"ypowgate", "zpowgate", b"zpowgate"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["args", b"args", "czpowgate", b"czpowgate", "fsimgate", b"fsimgate", "gate", b"gate", "gate_value", b"gate_value", "internalgate", b"internalgate", "iswappowgate", b"iswappowgate", "measurementgate", b"measurementgate", "phasedxpowgate", b"phasedxpowgate", "phasedxzgate", b"phasedxzgate", "qubit_constant_index", b"qubit_constant_index", "qubits", b"qubits", "singlequbitcliffordgate", b"singlequbitcliffordgate", "token", b"token", "token_constant_index", b"token_constant_index", "token_value", b"token_value", "waitgate", b"waitgate", "xpowgate", b"xpowgate", "ypowgate", b"ypowgate", "zpowgate", b"zpowgate"]) -> None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing_extensions.Literal["gate_value", b"gate_value"]) -> typing_extensions.Literal["xpowgate", "ypowgate", "zpowgate", "phasedxpowgate", "phasedxzgate", "czpowgate", "fsimgate", "iswappowgate", "measurementgate", "waitgate", "internalgate", "singlequbitcliffordgate"] | None: ...
@typing.overload
def WhichOneof(self, oneof_group: typing_extensions.Literal["token", b"token"]) -> typing_extensions.Literal["token_value", "token_constant_index"] | None: ...
global___Operation = Operation
@typing_extensions.final
class Gate(google.protobuf.message.Message):
"""The instruction identifying the action taken on the quantum computer."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ID_FIELD_NUMBER: builtins.int
id: builtins.str
"""Name for the Gate.
These names must match those specified in the gate set. This is found
in cirq/google/gate_sets.py.
"""
def __init__(
self,
*,
id: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["id", b"id"]) -> None: ...
global___Gate = Gate
@typing_extensions.final
class Qubit(google.protobuf.message.Message):
"""An identifier for a qubit."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ID_FIELD_NUMBER: builtins.int
id: builtins.str
"""Id of the qubit. These depend on the device being scheduled upon.
Typically ids for qubits on a line are simple string versions of integers,
while for qubits on a square grid these are integers separated by a
underscore, i.e. '0_1', '1_2', etc.
"""
def __init__(
self,
*,
id: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["id", b"id"]) -> None: ...
global___Qubit = Qubit
@typing_extensions.final
class Arg(google.protobuf.message.Message):
"""Arguments needed to specify a gate."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
ARG_VALUE_FIELD_NUMBER: builtins.int
SYMBOL_FIELD_NUMBER: builtins.int
FUNC_FIELD_NUMBER: builtins.int
CONSTANT_INDEX_FIELD_NUMBER: builtins.int
@property
def arg_value(self) -> global___ArgValue: ...
symbol: builtins.str
@property
def func(self) -> global___ArgFunction: ...
constant_index: builtins.int
def __init__(
self,
*,
arg_value: global___ArgValue | None = ...,
symbol: builtins.str = ...,
func: global___ArgFunction | None = ...,
constant_index: builtins.int = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["arg", b"arg", "arg_value", b"arg_value", "constant_index", b"constant_index", "func", b"func", "symbol", b"symbol"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["arg", b"arg", "arg_value", b"arg_value", "constant_index", b"constant_index", "func", b"func", "symbol", b"symbol"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["arg", b"arg"]) -> typing_extensions.Literal["arg_value", "symbol", "func", "constant_index"] | None: ...
global___Arg = Arg
@typing_extensions.final
class ArgValue(google.protobuf.message.Message):
"""Value that can be passed as an argument to a gate."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
FLOAT_VALUE_FIELD_NUMBER: builtins.int
BOOL_VALUES_FIELD_NUMBER: builtins.int
STRING_VALUE_FIELD_NUMBER: builtins.int
DOUBLE_VALUE_FIELD_NUMBER: builtins.int
INT64_VALUES_FIELD_NUMBER: builtins.int
DOUBLE_VALUES_FIELD_NUMBER: builtins.int
STRING_VALUES_FIELD_NUMBER: builtins.int
float_value: builtins.float
@property
def bool_values(self) -> global___RepeatedBoolean: ...
string_value: builtins.str
double_value: builtins.float
@property
def int64_values(self) -> global___RepeatedInt64: ...
@property
def double_values(self) -> global___RepeatedDouble: ...
@property
def string_values(self) -> global___RepeatedString: ...
def __init__(
self,
*,
float_value: builtins.float = ...,
bool_values: global___RepeatedBoolean | None = ...,
string_value: builtins.str = ...,
double_value: builtins.float = ...,
int64_values: global___RepeatedInt64 | None = ...,
double_values: global___RepeatedDouble | None = ...,
string_values: global___RepeatedString | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["arg_value", b"arg_value", "bool_values", b"bool_values", "double_value", b"double_value", "double_values", b"double_values", "float_value", b"float_value", "int64_values", b"int64_values", "string_value", b"string_value", "string_values", b"string_values"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["arg_value", b"arg_value", "bool_values", b"bool_values", "double_value", b"double_value", "double_values", b"double_values", "float_value", b"float_value", "int64_values", b"int64_values", "string_value", b"string_value", "string_values", b"string_values"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["arg_value", b"arg_value"]) -> typing_extensions.Literal["float_value", "bool_values", "string_value", "double_value", "int64_values", "double_values", "string_values"] | None: ...
global___ArgValue = ArgValue
@typing_extensions.final
class RepeatedInt64(google.protobuf.message.Message):
"""A repeated int value."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
VALUES_FIELD_NUMBER: builtins.int
@property
def values(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]: ...
def __init__(
self,
*,
values: collections.abc.Iterable[builtins.int] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ...
global___RepeatedInt64 = RepeatedInt64
@typing_extensions.final
class RepeatedDouble(google.protobuf.message.Message):
"""A repeated double value."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
VALUES_FIELD_NUMBER: builtins.int
@property
def values(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.float]: ...
def __init__(
self,
*,
values: collections.abc.Iterable[builtins.float] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ...
global___RepeatedDouble = RepeatedDouble
@typing_extensions.final
class RepeatedString(google.protobuf.message.Message):
"""A repeated string value."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
VALUES_FIELD_NUMBER: builtins.int
@property
def values(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
def __init__(
self,
*,
values: collections.abc.Iterable[builtins.str] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ...
global___RepeatedString = RepeatedString
@typing_extensions.final
class RepeatedBoolean(google.protobuf.message.Message):
"""A repeated boolean value."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
VALUES_FIELD_NUMBER: builtins.int
@property
def values(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bool]: ...
def __init__(
self,
*,
values: collections.abc.Iterable[builtins.bool] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ...
global___RepeatedBoolean = RepeatedBoolean
@typing_extensions.final
class ArgFunction(google.protobuf.message.Message):
"""A function of arguments. This is an s-expression tree representing
mathematically the function being evaluated.
What language is supported is specified by the arg_function_language
in the language message.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
TYPE_FIELD_NUMBER: builtins.int
ARGS_FIELD_NUMBER: builtins.int
type: builtins.str
"""The name of the function. I.e. if the function is the sum of two symbols,
this could be '+', and the args would be two string symbol values.
Valid values for the type are given in cirq/google/arg_func_langs.py
and must be consistent with the arg_function_language specified in the
language field of the program.
"""
@property
def args(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Arg]:
"""The arguments to the function."""
def __init__(
self,
*,
type: builtins.str = ...,
args: collections.abc.Iterable[global___Arg] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["args", b"args", "type", b"type"]) -> None: ...
global___ArgFunction = ArgFunction
@typing_extensions.final
class CircuitOperation(google.protobuf.message.Message):
"""An operation that applies a modified version of a reference circuit. The
circuit is stored in the top-level Constants table; the mappings in this
object specify how that circuit should be modified for this operation.
Multiple CircuitOperations may reference the same base circuit even if their
mappings of that circuit are different.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
CIRCUIT_CONSTANT_INDEX_FIELD_NUMBER: builtins.int
REPETITION_SPECIFICATION_FIELD_NUMBER: builtins.int
QUBIT_MAP_FIELD_NUMBER: builtins.int
MEASUREMENT_KEY_MAP_FIELD_NUMBER: builtins.int
ARG_MAP_FIELD_NUMBER: builtins.int
circuit_constant_index: builtins.int
"""The index of the circuit in the top-level constant table."""
@property
def repetition_specification(self) -> global___RepetitionSpecification:
"""Specifier for repetitions of the circuit, which contains either a number
of repetitions or a list of repetition IDs.
"""
@property
def qubit_map(self) -> global___QubitMapping:
"""Map from qubits in the "inner" circuit (referenced by
circuit_constant_index) to qubits in the "outer" circuit (the one that
contains this operation).
"""
@property
def measurement_key_map(self) -> global___MeasurementKeyMapping:
"""Map of measurement keys in the "inner" circuit (referenced by
circuit_constant_index) to measurement keys in the "outer" circuit (the
one that contains this operation).
"""
@property
def arg_map(self) -> global___ArgMapping:
"""Map of args in the "inner" circuit (referenced by circuit_constant_index)
to args in the "outer" circuit (the one that contains this operation).
"""
def __init__(
self,
*,
circuit_constant_index: builtins.int = ...,
repetition_specification: global___RepetitionSpecification | None = ...,
qubit_map: global___QubitMapping | None = ...,
measurement_key_map: global___MeasurementKeyMapping | None = ...,
arg_map: global___ArgMapping | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["arg_map", b"arg_map", "measurement_key_map", b"measurement_key_map", "qubit_map", b"qubit_map", "repetition_specification", b"repetition_specification"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["arg_map", b"arg_map", "circuit_constant_index", b"circuit_constant_index", "measurement_key_map", b"measurement_key_map", "qubit_map", b"qubit_map", "repetition_specification", b"repetition_specification"]) -> None: ...
global___CircuitOperation = CircuitOperation
@typing_extensions.final
class RepetitionSpecification(google.protobuf.message.Message):
"""A description of the repetitions of a subcircuit. IDs are used as suffixes
for measurements in the repeated subcircuit; if repetition_count is given
instead, the IDs will simply be the integers [0..N-1].
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@typing_extensions.final
class RepetitionIds(google.protobuf.message.Message):
"""An ordered list of IDs for a sequence of repetitions."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
IDS_FIELD_NUMBER: builtins.int
@property
def ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
def __init__(
self,
*,
ids: collections.abc.Iterable[builtins.str] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["ids", b"ids"]) -> None: ...
REPETITION_IDS_FIELD_NUMBER: builtins.int
REPETITION_COUNT_FIELD_NUMBER: builtins.int
@property
def repetition_ids(self) -> global___RepetitionSpecification.RepetitionIds:
"""A list of unique IDs, one per repetition of the subcircuit."""
repetition_count: builtins.int
"""An integer number of repetitions to perform."""
def __init__(
self,
*,
repetition_ids: global___RepetitionSpecification.RepetitionIds | None = ...,
repetition_count: builtins.int = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["repetition_count", b"repetition_count", "repetition_ids", b"repetition_ids", "repetition_value", b"repetition_value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["repetition_count", b"repetition_count", "repetition_ids", b"repetition_ids", "repetition_value", b"repetition_value"]) -> None: ...
def WhichOneof(self, oneof_group: typing_extensions.Literal["repetition_value", b"repetition_value"]) -> typing_extensions.Literal["repetition_ids", "repetition_count"] | None: ...
global___RepetitionSpecification = RepetitionSpecification
@typing_extensions.final
class QubitMapping(google.protobuf.message.Message):
"""A mapping of qubits from one value to another. All mappings are applied
simultaneously and independently; for example, [(a, b), (b, a)] will swap
qubits a and b.
"""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
@typing_extensions.final
class QubitEntry(google.protobuf.message.Message):
"""Indicates that qubit "key" should be replaced with "value"."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
KEY_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
@property
def key(self) -> global___Qubit: ...
@property
def value(self) -> global___Qubit: ...
def __init__(
self,
*,
key: global___Qubit | None = ...,
value: global___Qubit | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ...
ENTRIES_FIELD_NUMBER: builtins.int
@property
def entries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___QubitMapping.QubitEntry]:
"""A list of qubit mappings to apply."""
def __init__(
self,
*,
entries: collections.abc.Iterable[global___QubitMapping.QubitEntry] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["entries", b"entries"]) -> None: ...
global___QubitMapping = QubitMapping
@typing_extensions.final
class MeasurementKey(google.protobuf.message.Message):
"""A key for matching a measurement event to its results."""
DESCRIPTOR: google.protobuf.descriptor.Descriptor
STRING_KEY_FIELD_NUMBER: builtins.int