classiq 0.41.2__py3-none-any.whl → 0.42.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. classiq/applications/chemistry/chemistry_model_constructor.py +31 -31
  2. classiq/execution/execution_session.py +42 -3
  3. classiq/interface/_version.py +1 -1
  4. classiq/interface/analyzer/analysis_params.py +16 -6
  5. classiq/interface/analyzer/result.py +2 -1
  6. classiq/interface/ast_node.py +2 -2
  7. classiq/interface/backend/pydantic_backend.py +1 -3
  8. classiq/interface/chemistry/fermionic_operator.py +17 -7
  9. classiq/interface/generator/amplitude_loading.py +12 -3
  10. classiq/interface/generator/application_apis/finance_declarations.py +22 -1
  11. classiq/interface/generator/expressions/atomic_expression_functions.py +2 -1
  12. classiq/interface/generator/expressions/enums/classical_enum.py +11 -0
  13. classiq/interface/generator/expressions/enums/ladder_operator.py +0 -10
  14. classiq/interface/generator/expressions/expression_constants.py +1 -0
  15. classiq/interface/generator/expressions/qmod_qarray_proxy.py +14 -1
  16. classiq/interface/generator/expressions/qmod_qscalar_proxy.py +7 -2
  17. classiq/interface/generator/expressions/qmod_sized_proxy.py +8 -3
  18. classiq/interface/generator/expressions/qmod_struct_instance.py +12 -1
  19. classiq/interface/generator/functions/builtins/core_library/atomic_quantum_functions.py +262 -195
  20. classiq/interface/generator/functions/builtins/internal_operators.py +1 -0
  21. classiq/interface/generator/functions/builtins/open_lib_functions.py +1645 -44
  22. classiq/interface/generator/functions/classical_type.py +21 -3
  23. classiq/interface/generator/generated_circuit_data.py +2 -0
  24. classiq/interface/generator/model/model.py +1 -1
  25. classiq/interface/{model → generator/model}/quantum_register.py +3 -0
  26. classiq/interface/helpers/classproperty.py +8 -0
  27. classiq/interface/ide/visual_model.py +68 -0
  28. classiq/interface/model/control.py +11 -1
  29. classiq/interface/model/quantum_expressions/amplitude_loading_operation.py +3 -8
  30. classiq/interface/model/quantum_expressions/quantum_expression.py +1 -30
  31. classiq/interface/model/quantum_function_call.py +0 -12
  32. classiq/interface/model/validations/handles_validator.py +2 -7
  33. classiq/interface/server/routes.py +1 -0
  34. classiq/qmod/builtins/classical_execution_primitives.py +1 -1
  35. classiq/qmod/builtins/functions.py +83 -31
  36. classiq/qmod/builtins/operations.py +16 -1
  37. classiq/qmod/declaration_inferrer.py +28 -4
  38. classiq/qmod/pretty_print/pretty_printer.py +22 -2
  39. classiq/qmod/qmod_constant.py +2 -1
  40. classiq/qmod/qmod_parameter.py +9 -2
  41. classiq/qmod/quantum_expandable.py +35 -11
  42. classiq/qmod/quantum_function.py +6 -5
  43. classiq/qmod/symbolic.py +22 -1
  44. classiq/qmod/utilities.py +5 -5
  45. {classiq-0.41.2.dist-info → classiq-0.42.0.dist-info}/METADATA +1 -1
  46. {classiq-0.41.2.dist-info → classiq-0.42.0.dist-info}/RECORD +47 -46
  47. classiq/interface/model/call_synthesis_data.py +0 -57
  48. {classiq-0.41.2.dist-info → classiq-0.42.0.dist-info}/WHEEL +0 -0
@@ -4,37 +4,40 @@ from classiq.interface.model.quantum_function_declaration import (
4
4
  QuantumFunctionDeclaration,
5
5
  )
6
6
 
7
- QFT_STEP = QuantumFunctionDeclaration.parse_raw(
7
+ QFT = QuantumFunctionDeclaration.parse_raw(
8
8
  """{
9
9
  "source_ref": null,
10
- "name": "qft_step",
10
+ "name": "qft",
11
11
  "param_decls": {},
12
12
  "port_declarations": {
13
13
  "target": {
14
+ "source_ref": null,
14
15
  "name": "target",
16
+ "quantum_type": {
17
+ "source_ref": null,
18
+ "kind": "qvec",
19
+ "length": null
20
+ },
21
+ "size": null,
15
22
  "kind": "PortDeclaration",
16
23
  "direction": "inout"
17
24
  }
18
25
  },
19
26
  "operand_declarations": {},
20
- "positional_arg_declarations": []
21
- }"""
22
- )
23
-
24
- QFT = QuantumFunctionDeclaration.parse_raw(
25
- """{
26
- "source_ref": null,
27
- "name": "qft",
28
- "param_decls": {},
29
- "port_declarations": {
30
- "target": {
27
+ "positional_arg_declarations": [
28
+ {
29
+ "source_ref": null,
31
30
  "name": "target",
31
+ "quantum_type": {
32
+ "source_ref": null,
33
+ "kind": "qvec",
34
+ "length": null
35
+ },
36
+ "size": null,
32
37
  "kind": "PortDeclaration",
33
38
  "direction": "inout"
34
39
  }
35
- },
36
- "operand_declarations": {},
37
- "positional_arg_declarations": []
40
+ ]
38
41
  }"""
39
42
  )
40
43
 
@@ -45,22 +48,39 @@ QPE_FLEXIBLE = QuantumFunctionDeclaration.parse_raw(
45
48
  "param_decls": {},
46
49
  "port_declarations": {
47
50
  "phase": {
51
+ "source_ref": null,
48
52
  "name": "phase",
49
53
  "quantum_type": {
50
- "kind": "qnum"
54
+ "source_ref": null,
55
+ "kind": "qnum",
56
+ "size": null,
57
+ "is_signed": null,
58
+ "fraction_digits": null
51
59
  },
60
+ "size": null,
52
61
  "kind": "PortDeclaration",
53
62
  "direction": "inout"
54
63
  }
55
64
  },
56
65
  "operand_declarations": {
57
66
  "unitary_with_power": {
67
+ "source_ref": null,
58
68
  "name": "unitary_with_power",
69
+ "param_decls": {
70
+ "arg0": {
71
+ "source_ref": null,
72
+ "kind": "int"
73
+ }
74
+ },
75
+ "port_declarations": {},
76
+ "operand_declarations": {},
59
77
  "positional_arg_declarations": [
60
78
  {
79
+ "source_ref": null,
61
80
  "kind": "ClassicalParameterDeclaration",
62
81
  "name": "arg0",
63
82
  "classical_type": {
83
+ "source_ref": null,
64
84
  "kind": "int"
65
85
  }
66
86
  }
@@ -71,12 +91,23 @@ QPE_FLEXIBLE = QuantumFunctionDeclaration.parse_raw(
71
91
  },
72
92
  "positional_arg_declarations": [
73
93
  {
94
+ "source_ref": null,
74
95
  "name": "unitary_with_power",
96
+ "param_decls": {
97
+ "arg0": {
98
+ "source_ref": null,
99
+ "kind": "int"
100
+ }
101
+ },
102
+ "port_declarations": {},
103
+ "operand_declarations": {},
75
104
  "positional_arg_declarations": [
76
105
  {
106
+ "source_ref": null,
77
107
  "kind": "ClassicalParameterDeclaration",
78
108
  "name": "arg0",
79
109
  "classical_type": {
110
+ "source_ref": null,
80
111
  "kind": "int"
81
112
  }
82
113
  }
@@ -85,10 +116,16 @@ QPE_FLEXIBLE = QuantumFunctionDeclaration.parse_raw(
85
116
  "is_list": false
86
117
  },
87
118
  {
119
+ "source_ref": null,
88
120
  "name": "phase",
89
121
  "quantum_type": {
90
- "kind": "qnum"
122
+ "source_ref": null,
123
+ "kind": "qnum",
124
+ "size": null,
125
+ "is_signed": null,
126
+ "fraction_digits": null
91
127
  },
128
+ "size": null,
92
129
  "kind": "PortDeclaration",
93
130
  "direction": "inout"
94
131
  }
@@ -103,17 +140,27 @@ QPE = QuantumFunctionDeclaration.parse_raw(
103
140
  "param_decls": {},
104
141
  "port_declarations": {
105
142
  "phase": {
143
+ "source_ref": null,
106
144
  "name": "phase",
107
145
  "quantum_type": {
108
- "kind": "qnum"
146
+ "source_ref": null,
147
+ "kind": "qnum",
148
+ "size": null,
149
+ "is_signed": null,
150
+ "fraction_digits": null
109
151
  },
152
+ "size": null,
110
153
  "kind": "PortDeclaration",
111
154
  "direction": "inout"
112
155
  }
113
156
  },
114
157
  "operand_declarations": {
115
158
  "unitary": {
159
+ "source_ref": null,
116
160
  "name": "unitary",
161
+ "param_decls": {},
162
+ "port_declarations": {},
163
+ "operand_declarations": {},
117
164
  "positional_arg_declarations": [],
118
165
  "kind": "QuantumOperandDeclaration",
119
166
  "is_list": false
@@ -121,16 +168,26 @@ QPE = QuantumFunctionDeclaration.parse_raw(
121
168
  },
122
169
  "positional_arg_declarations": [
123
170
  {
171
+ "source_ref": null,
124
172
  "name": "unitary",
173
+ "param_decls": {},
174
+ "port_declarations": {},
175
+ "operand_declarations": {},
125
176
  "positional_arg_declarations": [],
126
177
  "kind": "QuantumOperandDeclaration",
127
178
  "is_list": false
128
179
  },
129
180
  {
181
+ "source_ref": null,
130
182
  "name": "phase",
131
183
  "quantum_type": {
132
- "kind": "qnum"
184
+ "source_ref": null,
185
+ "kind": "qnum",
186
+ "size": null,
187
+ "is_signed": null,
188
+ "fraction_digits": null
133
189
  },
190
+ "size": null,
134
191
  "kind": "PortDeclaration",
135
192
  "direction": "inout"
136
193
  }
@@ -238,33 +295,62 @@ AMPLITUDE_ESTIMATION = QuantumFunctionDeclaration.parse_raw(
238
295
  "param_decls": {},
239
296
  "port_declarations": {
240
297
  "phase": {
298
+ "source_ref": null,
241
299
  "name": "phase",
242
300
  "quantum_type": {
243
- "kind": "qnum"
301
+ "source_ref": null,
302
+ "kind": "qnum",
303
+ "size": null,
304
+ "is_signed": null,
305
+ "fraction_digits": null
244
306
  },
307
+ "size": null,
245
308
  "kind": "PortDeclaration",
246
309
  "direction": "inout"
247
310
  },
248
311
  "packed_vars": {
312
+ "source_ref": null,
249
313
  "name": "packed_vars",
250
314
  "quantum_type": {
315
+ "source_ref": null,
251
316
  "kind": "qvec",
252
317
  "length": null
253
318
  },
319
+ "size": null,
254
320
  "kind": "PortDeclaration",
255
321
  "direction": "inout"
256
322
  }
257
323
  },
258
324
  "operand_declarations": {
259
325
  "oracle": {
326
+ "source_ref": null,
260
327
  "name": "oracle",
328
+ "param_decls": {},
329
+ "port_declarations": {
330
+ "arg0": {
331
+ "source_ref": null,
332
+ "name": "arg0",
333
+ "quantum_type": {
334
+ "source_ref": null,
335
+ "kind": "qvec",
336
+ "length": null
337
+ },
338
+ "size": null,
339
+ "kind": "PortDeclaration",
340
+ "direction": "inout"
341
+ }
342
+ },
343
+ "operand_declarations": {},
261
344
  "positional_arg_declarations": [
262
345
  {
346
+ "source_ref": null,
263
347
  "name": "arg0",
264
348
  "quantum_type": {
349
+ "source_ref": null,
265
350
  "kind": "qvec",
266
351
  "length": null
267
352
  },
353
+ "size": null,
268
354
  "kind": "PortDeclaration",
269
355
  "direction": "inout"
270
356
  }
@@ -273,14 +359,34 @@ AMPLITUDE_ESTIMATION = QuantumFunctionDeclaration.parse_raw(
273
359
  "is_list": false
274
360
  },
275
361
  "space_transform": {
362
+ "source_ref": null,
276
363
  "name": "space_transform",
364
+ "param_decls": {},
365
+ "port_declarations": {
366
+ "arg0": {
367
+ "source_ref": null,
368
+ "name": "arg0",
369
+ "quantum_type": {
370
+ "source_ref": null,
371
+ "kind": "qvec",
372
+ "length": null
373
+ },
374
+ "size": null,
375
+ "kind": "PortDeclaration",
376
+ "direction": "inout"
377
+ }
378
+ },
379
+ "operand_declarations": {},
277
380
  "positional_arg_declarations": [
278
381
  {
382
+ "source_ref": null,
279
383
  "name": "arg0",
280
384
  "quantum_type": {
385
+ "source_ref": null,
281
386
  "kind": "qvec",
282
387
  "length": null
283
388
  },
389
+ "size": null,
284
390
  "kind": "PortDeclaration",
285
391
  "direction": "inout"
286
392
  }
@@ -291,14 +397,34 @@ AMPLITUDE_ESTIMATION = QuantumFunctionDeclaration.parse_raw(
291
397
  },
292
398
  "positional_arg_declarations": [
293
399
  {
400
+ "source_ref": null,
294
401
  "name": "oracle",
402
+ "param_decls": {},
403
+ "port_declarations": {
404
+ "arg0": {
405
+ "source_ref": null,
406
+ "name": "arg0",
407
+ "quantum_type": {
408
+ "source_ref": null,
409
+ "kind": "qvec",
410
+ "length": null
411
+ },
412
+ "size": null,
413
+ "kind": "PortDeclaration",
414
+ "direction": "inout"
415
+ }
416
+ },
417
+ "operand_declarations": {},
295
418
  "positional_arg_declarations": [
296
419
  {
420
+ "source_ref": null,
297
421
  "name": "arg0",
298
422
  "quantum_type": {
423
+ "source_ref": null,
299
424
  "kind": "qvec",
300
425
  "length": null
301
426
  },
427
+ "size": null,
302
428
  "kind": "PortDeclaration",
303
429
  "direction": "inout"
304
430
  }
@@ -307,14 +433,34 @@ AMPLITUDE_ESTIMATION = QuantumFunctionDeclaration.parse_raw(
307
433
  "is_list": false
308
434
  },
309
435
  {
436
+ "source_ref": null,
310
437
  "name": "space_transform",
438
+ "param_decls": {},
439
+ "port_declarations": {
440
+ "arg0": {
441
+ "source_ref": null,
442
+ "name": "arg0",
443
+ "quantum_type": {
444
+ "source_ref": null,
445
+ "kind": "qvec",
446
+ "length": null
447
+ },
448
+ "size": null,
449
+ "kind": "PortDeclaration",
450
+ "direction": "inout"
451
+ }
452
+ },
453
+ "operand_declarations": {},
311
454
  "positional_arg_declarations": [
312
455
  {
456
+ "source_ref": null,
313
457
  "name": "arg0",
314
458
  "quantum_type": {
459
+ "source_ref": null,
315
460
  "kind": "qvec",
316
461
  "length": null
317
462
  },
463
+ "size": null,
318
464
  "kind": "PortDeclaration",
319
465
  "direction": "inout"
320
466
  }
@@ -323,19 +469,28 @@ AMPLITUDE_ESTIMATION = QuantumFunctionDeclaration.parse_raw(
323
469
  "is_list": false
324
470
  },
325
471
  {
472
+ "source_ref": null,
326
473
  "name": "phase",
327
474
  "quantum_type": {
328
- "kind": "qnum"
475
+ "source_ref": null,
476
+ "kind": "qnum",
477
+ "size": null,
478
+ "is_signed": null,
479
+ "fraction_digits": null
329
480
  },
481
+ "size": null,
330
482
  "kind": "PortDeclaration",
331
483
  "direction": "inout"
332
484
  },
333
485
  {
486
+ "source_ref": null,
334
487
  "name": "packed_vars",
335
488
  "quantum_type": {
489
+ "source_ref": null,
336
490
  "kind": "qvec",
337
491
  "length": null
338
492
  },
493
+ "size": null,
339
494
  "kind": "PortDeclaration",
340
495
  "direction": "inout"
341
496
  }
@@ -350,33 +505,70 @@ PHASE_ORACLE = QuantumFunctionDeclaration.parse_raw(
350
505
  "param_decls": {},
351
506
  "port_declarations": {
352
507
  "target": {
508
+ "source_ref": null,
353
509
  "name": "target",
354
510
  "quantum_type": {
511
+ "source_ref": null,
355
512
  "kind": "qvec",
356
513
  "length": null
357
514
  },
515
+ "size": null,
358
516
  "kind": "PortDeclaration",
359
517
  "direction": "inout"
360
518
  }
361
519
  },
362
520
  "operand_declarations": {
363
521
  "predicate": {
522
+ "source_ref": null,
364
523
  "name": "predicate",
524
+ "param_decls": {},
525
+ "port_declarations": {
526
+ "arg0": {
527
+ "source_ref": null,
528
+ "name": "arg0",
529
+ "quantum_type": {
530
+ "source_ref": null,
531
+ "kind": "qvec",
532
+ "length": null
533
+ },
534
+ "size": null,
535
+ "kind": "PortDeclaration",
536
+ "direction": "inout"
537
+ },
538
+ "arg1": {
539
+ "source_ref": null,
540
+ "name": "arg1",
541
+ "quantum_type": {
542
+ "source_ref": null,
543
+ "kind": "qbit"
544
+ },
545
+ "size": null,
546
+ "kind": "PortDeclaration",
547
+ "direction": "inout"
548
+ }
549
+ },
550
+ "operand_declarations": {},
365
551
  "positional_arg_declarations": [
366
552
  {
553
+ "source_ref": null,
367
554
  "name": "arg0",
368
555
  "quantum_type": {
556
+ "source_ref": null,
369
557
  "kind": "qvec",
370
558
  "length": null
371
559
  },
560
+ "size": null,
372
561
  "kind": "PortDeclaration",
373
562
  "direction": "inout"
374
563
  },
375
564
  {
565
+ "source_ref": null,
376
566
  "name": "arg1",
377
567
  "quantum_type": {
568
+ "source_ref": null,
378
569
  "kind": "qbit"
379
570
  },
571
+ "size": null,
380
572
  "kind": "PortDeclaration",
381
573
  "direction": "inout"
382
574
  }
@@ -387,22 +579,56 @@ PHASE_ORACLE = QuantumFunctionDeclaration.parse_raw(
387
579
  },
388
580
  "positional_arg_declarations": [
389
581
  {
582
+ "source_ref": null,
390
583
  "name": "predicate",
584
+ "param_decls": {},
585
+ "port_declarations": {
586
+ "arg0": {
587
+ "source_ref": null,
588
+ "name": "arg0",
589
+ "quantum_type": {
590
+ "source_ref": null,
591
+ "kind": "qvec",
592
+ "length": null
593
+ },
594
+ "size": null,
595
+ "kind": "PortDeclaration",
596
+ "direction": "inout"
597
+ },
598
+ "arg1": {
599
+ "source_ref": null,
600
+ "name": "arg1",
601
+ "quantum_type": {
602
+ "source_ref": null,
603
+ "kind": "qbit"
604
+ },
605
+ "size": null,
606
+ "kind": "PortDeclaration",
607
+ "direction": "inout"
608
+ }
609
+ },
610
+ "operand_declarations": {},
391
611
  "positional_arg_declarations": [
392
612
  {
613
+ "source_ref": null,
393
614
  "name": "arg0",
394
615
  "quantum_type": {
616
+ "source_ref": null,
395
617
  "kind": "qvec",
396
618
  "length": null
397
619
  },
620
+ "size": null,
398
621
  "kind": "PortDeclaration",
399
622
  "direction": "inout"
400
623
  },
401
624
  {
625
+ "source_ref": null,
402
626
  "name": "arg1",
403
627
  "quantum_type": {
628
+ "source_ref": null,
404
629
  "kind": "qbit"
405
630
  },
631
+ "size": null,
406
632
  "kind": "PortDeclaration",
407
633
  "direction": "inout"
408
634
  }
@@ -411,11 +637,14 @@ PHASE_ORACLE = QuantumFunctionDeclaration.parse_raw(
411
637
  "is_list": false
412
638
  },
413
639
  {
640
+ "source_ref": null,
414
641
  "name": "target",
415
642
  "quantum_type": {
643
+ "source_ref": null,
416
644
  "kind": "qvec",
417
645
  "length": null
418
646
  },
647
+ "size": null,
419
648
  "kind": "PortDeclaration",
420
649
  "direction": "inout"
421
650
  }
@@ -430,11 +659,14 @@ REFLECT_ABOUT_ZERO = QuantumFunctionDeclaration.parse_raw(
430
659
  "param_decls": {},
431
660
  "port_declarations": {
432
661
  "packed_vars": {
662
+ "source_ref": null,
433
663
  "name": "packed_vars",
434
664
  "quantum_type": {
665
+ "source_ref": null,
435
666
  "kind": "qvec",
436
667
  "length": null
437
668
  },
669
+ "size": null,
438
670
  "kind": "PortDeclaration",
439
671
  "direction": "inout"
440
672
  }
@@ -442,11 +674,14 @@ REFLECT_ABOUT_ZERO = QuantumFunctionDeclaration.parse_raw(
442
674
  "operand_declarations": {},
443
675
  "positional_arg_declarations": [
444
676
  {
677
+ "source_ref": null,
445
678
  "name": "packed_vars",
446
679
  "quantum_type": {
680
+ "source_ref": null,
447
681
  "kind": "qvec",
448
682
  "length": null
449
683
  },
684
+ "size": null,
450
685
  "kind": "PortDeclaration",
451
686
  "direction": "inout"
452
687
  }
@@ -461,25 +696,48 @@ GROVER_DIFFUSER = QuantumFunctionDeclaration.parse_raw(
461
696
  "param_decls": {},
462
697
  "port_declarations": {
463
698
  "packed_vars": {
699
+ "source_ref": null,
464
700
  "name": "packed_vars",
465
701
  "quantum_type": {
702
+ "source_ref": null,
466
703
  "kind": "qvec",
467
704
  "length": null
468
705
  },
706
+ "size": null,
469
707
  "kind": "PortDeclaration",
470
708
  "direction": "inout"
471
709
  }
472
710
  },
473
711
  "operand_declarations": {
474
712
  "space_transform": {
713
+ "source_ref": null,
475
714
  "name": "space_transform",
715
+ "param_decls": {},
716
+ "port_declarations": {
717
+ "arg0": {
718
+ "source_ref": null,
719
+ "name": "arg0",
720
+ "quantum_type": {
721
+ "source_ref": null,
722
+ "kind": "qvec",
723
+ "length": null
724
+ },
725
+ "size": null,
726
+ "kind": "PortDeclaration",
727
+ "direction": "inout"
728
+ }
729
+ },
730
+ "operand_declarations": {},
476
731
  "positional_arg_declarations": [
477
732
  {
733
+ "source_ref": null,
478
734
  "name": "arg0",
479
735
  "quantum_type": {
736
+ "source_ref": null,
480
737
  "kind": "qvec",
481
738
  "length": null
482
739
  },
740
+ "size": null,
483
741
  "kind": "PortDeclaration",
484
742
  "direction": "inout"
485
743
  }
@@ -490,14 +748,34 @@ GROVER_DIFFUSER = QuantumFunctionDeclaration.parse_raw(
490
748
  },
491
749
  "positional_arg_declarations": [
492
750
  {
751
+ "source_ref": null,
493
752
  "name": "space_transform",
753
+ "param_decls": {},
754
+ "port_declarations": {
755
+ "arg0": {
756
+ "source_ref": null,
757
+ "name": "arg0",
758
+ "quantum_type": {
759
+ "source_ref": null,
760
+ "kind": "qvec",
761
+ "length": null
762
+ },
763
+ "size": null,
764
+ "kind": "PortDeclaration",
765
+ "direction": "inout"
766
+ }
767
+ },
768
+ "operand_declarations": {},
494
769
  "positional_arg_declarations": [
495
770
  {
771
+ "source_ref": null,
496
772
  "name": "arg0",
497
773
  "quantum_type": {
774
+ "source_ref": null,
498
775
  "kind": "qvec",
499
776
  "length": null
500
777
  },
778
+ "size": null,
501
779
  "kind": "PortDeclaration",
502
780
  "direction": "inout"
503
781
  }
@@ -506,11 +784,14 @@ GROVER_DIFFUSER = QuantumFunctionDeclaration.parse_raw(
506
784
  "is_list": false
507
785
  },
508
786
  {
787
+ "source_ref": null,
509
788
  "name": "packed_vars",
510
789
  "quantum_type": {
790
+ "source_ref": null,
511
791
  "kind": "qvec",
512
792
  "length": null
513
793
  },
794
+ "size": null,
514
795
  "kind": "PortDeclaration",
515
796
  "direction": "inout"
516
797
  }
@@ -525,25 +806,48 @@ GROVER_OPERATOR = QuantumFunctionDeclaration.parse_raw(
525
806
  "param_decls": {},
526
807
  "port_declarations": {
527
808
  "packed_vars": {
809
+ "source_ref": null,
528
810
  "name": "packed_vars",
529
811
  "quantum_type": {
812
+ "source_ref": null,
530
813
  "kind": "qvec",
531
814
  "length": null
532
815
  },
816
+ "size": null,
533
817
  "kind": "PortDeclaration",
534
818
  "direction": "inout"
535
819
  }
536
820
  },
537
821
  "operand_declarations": {
538
822
  "oracle": {
823
+ "source_ref": null,
539
824
  "name": "oracle",
825
+ "param_decls": {},
826
+ "port_declarations": {
827
+ "arg0": {
828
+ "source_ref": null,
829
+ "name": "arg0",
830
+ "quantum_type": {
831
+ "source_ref": null,
832
+ "kind": "qvec",
833
+ "length": null
834
+ },
835
+ "size": null,
836
+ "kind": "PortDeclaration",
837
+ "direction": "inout"
838
+ }
839
+ },
840
+ "operand_declarations": {},
540
841
  "positional_arg_declarations": [
541
842
  {
843
+ "source_ref": null,
542
844
  "name": "arg0",
543
845
  "quantum_type": {
846
+ "source_ref": null,
544
847
  "kind": "qvec",
545
848
  "length": null
546
849
  },
850
+ "size": null,
547
851
  "kind": "PortDeclaration",
548
852
  "direction": "inout"
549
853
  }
@@ -552,14 +856,34 @@ GROVER_OPERATOR = QuantumFunctionDeclaration.parse_raw(
552
856
  "is_list": false
553
857
  },
554
858
  "space_transform": {
859
+ "source_ref": null,
555
860
  "name": "space_transform",
861
+ "param_decls": {},
862
+ "port_declarations": {
863
+ "arg0": {
864
+ "source_ref": null,
865
+ "name": "arg0",
866
+ "quantum_type": {
867
+ "source_ref": null,
868
+ "kind": "qvec",
869
+ "length": null
870
+ },
871
+ "size": null,
872
+ "kind": "PortDeclaration",
873
+ "direction": "inout"
874
+ }
875
+ },
876
+ "operand_declarations": {},
556
877
  "positional_arg_declarations": [
557
878
  {
879
+ "source_ref": null,
558
880
  "name": "arg0",
559
881
  "quantum_type": {
882
+ "source_ref": null,
560
883
  "kind": "qvec",
561
884
  "length": null
562
885
  },
886
+ "size": null,
563
887
  "kind": "PortDeclaration",
564
888
  "direction": "inout"
565
889
  }
@@ -570,14 +894,34 @@ GROVER_OPERATOR = QuantumFunctionDeclaration.parse_raw(
570
894
  },
571
895
  "positional_arg_declarations": [
572
896
  {
897
+ "source_ref": null,
573
898
  "name": "oracle",
899
+ "param_decls": {},
900
+ "port_declarations": {
901
+ "arg0": {
902
+ "source_ref": null,
903
+ "name": "arg0",
904
+ "quantum_type": {
905
+ "source_ref": null,
906
+ "kind": "qvec",
907
+ "length": null
908
+ },
909
+ "size": null,
910
+ "kind": "PortDeclaration",
911
+ "direction": "inout"
912
+ }
913
+ },
914
+ "operand_declarations": {},
574
915
  "positional_arg_declarations": [
575
916
  {
917
+ "source_ref": null,
576
918
  "name": "arg0",
577
919
  "quantum_type": {
920
+ "source_ref": null,
578
921
  "kind": "qvec",
579
922
  "length": null
580
923
  },
924
+ "size": null,
581
925
  "kind": "PortDeclaration",
582
926
  "direction": "inout"
583
927
  }
@@ -586,14 +930,34 @@ GROVER_OPERATOR = QuantumFunctionDeclaration.parse_raw(
586
930
  "is_list": false
587
931
  },
588
932
  {
933
+ "source_ref": null,
589
934
  "name": "space_transform",
935
+ "param_decls": {},
936
+ "port_declarations": {
937
+ "arg0": {
938
+ "source_ref": null,
939
+ "name": "arg0",
940
+ "quantum_type": {
941
+ "source_ref": null,
942
+ "kind": "qvec",
943
+ "length": null
944
+ },
945
+ "size": null,
946
+ "kind": "PortDeclaration",
947
+ "direction": "inout"
948
+ }
949
+ },
950
+ "operand_declarations": {},
590
951
  "positional_arg_declarations": [
591
952
  {
953
+ "source_ref": null,
592
954
  "name": "arg0",
593
955
  "quantum_type": {
956
+ "source_ref": null,
594
957
  "kind": "qvec",
595
958
  "length": null
596
959
  },
960
+ "size": null,
597
961
  "kind": "PortDeclaration",
598
962
  "direction": "inout"
599
963
  }
@@ -602,11 +966,14 @@ GROVER_OPERATOR = QuantumFunctionDeclaration.parse_raw(
602
966
  "is_list": false
603
967
  },
604
968
  {
969
+ "source_ref": null,
605
970
  "name": "packed_vars",
606
971
  "quantum_type": {
972
+ "source_ref": null,
607
973
  "kind": "qvec",
608
974
  "length": null
609
975
  },
976
+ "size": null,
610
977
  "kind": "PortDeclaration",
611
978
  "direction": "inout"
612
979
  }
@@ -620,30 +987,54 @@ GROVER_SEARCH = QuantumFunctionDeclaration.parse_raw(
620
987
  "name": "grover_search",
621
988
  "param_decls": {
622
989
  "reps": {
990
+ "source_ref": null,
623
991
  "kind": "int"
624
992
  }
625
993
  },
626
994
  "port_declarations": {
627
995
  "packed_vars": {
996
+ "source_ref": null,
628
997
  "name": "packed_vars",
629
998
  "quantum_type": {
999
+ "source_ref": null,
630
1000
  "kind": "qvec",
631
1001
  "length": null
632
1002
  },
1003
+ "size": null,
633
1004
  "kind": "PortDeclaration",
634
1005
  "direction": "inout"
635
1006
  }
636
1007
  },
637
1008
  "operand_declarations": {
638
1009
  "oracle": {
1010
+ "source_ref": null,
639
1011
  "name": "oracle",
1012
+ "param_decls": {},
1013
+ "port_declarations": {
1014
+ "arg0": {
1015
+ "source_ref": null,
1016
+ "name": "arg0",
1017
+ "quantum_type": {
1018
+ "source_ref": null,
1019
+ "kind": "qvec",
1020
+ "length": null
1021
+ },
1022
+ "size": null,
1023
+ "kind": "PortDeclaration",
1024
+ "direction": "inout"
1025
+ }
1026
+ },
1027
+ "operand_declarations": {},
640
1028
  "positional_arg_declarations": [
641
1029
  {
1030
+ "source_ref": null,
642
1031
  "name": "arg0",
643
1032
  "quantum_type": {
1033
+ "source_ref": null,
644
1034
  "kind": "qvec",
645
1035
  "length": null
646
1036
  },
1037
+ "size": null,
647
1038
  "kind": "PortDeclaration",
648
1039
  "direction": "inout"
649
1040
  }
@@ -654,21 +1045,43 @@ GROVER_SEARCH = QuantumFunctionDeclaration.parse_raw(
654
1045
  },
655
1046
  "positional_arg_declarations": [
656
1047
  {
1048
+ "source_ref": null,
657
1049
  "kind": "ClassicalParameterDeclaration",
658
1050
  "name": "reps",
659
1051
  "classical_type": {
1052
+ "source_ref": null,
660
1053
  "kind": "int"
661
1054
  }
662
1055
  },
663
1056
  {
1057
+ "source_ref": null,
664
1058
  "name": "oracle",
1059
+ "param_decls": {},
1060
+ "port_declarations": {
1061
+ "arg0": {
1062
+ "source_ref": null,
1063
+ "name": "arg0",
1064
+ "quantum_type": {
1065
+ "source_ref": null,
1066
+ "kind": "qvec",
1067
+ "length": null
1068
+ },
1069
+ "size": null,
1070
+ "kind": "PortDeclaration",
1071
+ "direction": "inout"
1072
+ }
1073
+ },
1074
+ "operand_declarations": {},
665
1075
  "positional_arg_declarations": [
666
1076
  {
1077
+ "source_ref": null,
667
1078
  "name": "arg0",
668
1079
  "quantum_type": {
1080
+ "source_ref": null,
669
1081
  "kind": "qvec",
670
1082
  "length": null
671
1083
  },
1084
+ "size": null,
672
1085
  "kind": "PortDeclaration",
673
1086
  "direction": "inout"
674
1087
  }
@@ -677,11 +1090,14 @@ GROVER_SEARCH = QuantumFunctionDeclaration.parse_raw(
677
1090
  "is_list": false
678
1091
  },
679
1092
  {
1093
+ "source_ref": null,
680
1094
  "name": "packed_vars",
681
1095
  "quantum_type": {
1096
+ "source_ref": null,
682
1097
  "kind": "qvec",
683
1098
  "length": null
684
1099
  },
1100
+ "size": null,
685
1101
  "kind": "PortDeclaration",
686
1102
  "direction": "inout"
687
1103
  }
@@ -721,8 +1137,8 @@ APPLY_TO_ALL = QuantumFunctionDeclaration.parse_raw(
721
1137
  "operand_declarations": {
722
1138
  "gate_operand": {
723
1139
  "name": "gate_operand",
724
- "port_declarations": {
725
- "target": {
1140
+ "positional_arg_declarations": [
1141
+ {
726
1142
  "name": "target",
727
1143
  "size": {
728
1144
  "expr": "1"
@@ -730,7 +1146,7 @@ APPLY_TO_ALL = QuantumFunctionDeclaration.parse_raw(
730
1146
  "kind": "PortDeclaration",
731
1147
  "direction": "inout"
732
1148
  }
733
- },
1149
+ ],
734
1150
  "kind": "QuantumOperandDeclaration"
735
1151
  }
736
1152
  },
@@ -745,11 +1161,14 @@ QFT_NO_SWAP = QuantumFunctionDeclaration.parse_raw(
745
1161
  "param_decls": {},
746
1162
  "port_declarations": {
747
1163
  "qbv": {
1164
+ "source_ref": null,
748
1165
  "name": "qbv",
749
1166
  "quantum_type": {
1167
+ "source_ref": null,
750
1168
  "kind": "qvec",
751
1169
  "length": null
752
1170
  },
1171
+ "size": null,
753
1172
  "kind": "PortDeclaration",
754
1173
  "direction": "inout"
755
1174
  }
@@ -757,11 +1176,14 @@ QFT_NO_SWAP = QuantumFunctionDeclaration.parse_raw(
757
1176
  "operand_declarations": {},
758
1177
  "positional_arg_declarations": [
759
1178
  {
1179
+ "source_ref": null,
760
1180
  "name": "qbv",
761
1181
  "quantum_type": {
1182
+ "source_ref": null,
762
1183
  "kind": "qvec",
763
1184
  "length": null
764
1185
  },
1186
+ "size": null,
765
1187
  "kind": "PortDeclaration",
766
1188
  "direction": "inout"
767
1189
  }
@@ -775,24 +1197,31 @@ _CHECK_MSB = QuantumFunctionDeclaration.parse_raw(
775
1197
  "name": "_check_msb",
776
1198
  "param_decls": {
777
1199
  "ref": {
1200
+ "source_ref": null,
778
1201
  "kind": "int"
779
1202
  }
780
1203
  },
781
1204
  "port_declarations": {
782
1205
  "x": {
1206
+ "source_ref": null,
783
1207
  "name": "x",
784
1208
  "quantum_type": {
1209
+ "source_ref": null,
785
1210
  "kind": "qvec",
786
1211
  "length": null
787
1212
  },
1213
+ "size": null,
788
1214
  "kind": "PortDeclaration",
789
1215
  "direction": "inout"
790
1216
  },
791
1217
  "aux": {
1218
+ "source_ref": null,
792
1219
  "name": "aux",
793
1220
  "quantum_type": {
1221
+ "source_ref": null,
794
1222
  "kind": "qbit"
795
1223
  },
1224
+ "size": null,
796
1225
  "kind": "PortDeclaration",
797
1226
  "direction": "inout"
798
1227
  }
@@ -800,26 +1229,34 @@ _CHECK_MSB = QuantumFunctionDeclaration.parse_raw(
800
1229
  "operand_declarations": {},
801
1230
  "positional_arg_declarations": [
802
1231
  {
1232
+ "source_ref": null,
803
1233
  "kind": "ClassicalParameterDeclaration",
804
1234
  "name": "ref",
805
1235
  "classical_type": {
1236
+ "source_ref": null,
806
1237
  "kind": "int"
807
1238
  }
808
1239
  },
809
1240
  {
1241
+ "source_ref": null,
810
1242
  "name": "x",
811
1243
  "quantum_type": {
1244
+ "source_ref": null,
812
1245
  "kind": "qvec",
813
1246
  "length": null
814
1247
  },
1248
+ "size": null,
815
1249
  "kind": "PortDeclaration",
816
1250
  "direction": "inout"
817
1251
  },
818
1252
  {
1253
+ "source_ref": null,
819
1254
  "name": "aux",
820
1255
  "quantum_type": {
1256
+ "source_ref": null,
821
1257
  "kind": "qbit"
822
1258
  },
1259
+ "size": null,
823
1260
  "kind": "PortDeclaration",
824
1261
  "direction": "inout"
825
1262
  }
@@ -833,23 +1270,33 @@ _CTRL_X = QuantumFunctionDeclaration.parse_raw(
833
1270
  "name": "_ctrl_x",
834
1271
  "param_decls": {
835
1272
  "ref": {
1273
+ "source_ref": null,
836
1274
  "kind": "int"
837
1275
  }
838
1276
  },
839
1277
  "port_declarations": {
840
1278
  "ctrl": {
1279
+ "source_ref": null,
841
1280
  "name": "ctrl",
842
1281
  "quantum_type": {
843
- "kind": "qnum"
1282
+ "source_ref": null,
1283
+ "kind": "qnum",
1284
+ "size": null,
1285
+ "is_signed": null,
1286
+ "fraction_digits": null
844
1287
  },
1288
+ "size": null,
845
1289
  "kind": "PortDeclaration",
846
1290
  "direction": "inout"
847
1291
  },
848
1292
  "aux": {
1293
+ "source_ref": null,
849
1294
  "name": "aux",
850
1295
  "quantum_type": {
1296
+ "source_ref": null,
851
1297
  "kind": "qbit"
852
1298
  },
1299
+ "size": null,
853
1300
  "kind": "PortDeclaration",
854
1301
  "direction": "inout"
855
1302
  }
@@ -857,25 +1304,36 @@ _CTRL_X = QuantumFunctionDeclaration.parse_raw(
857
1304
  "operand_declarations": {},
858
1305
  "positional_arg_declarations": [
859
1306
  {
1307
+ "source_ref": null,
860
1308
  "kind": "ClassicalParameterDeclaration",
861
1309
  "name": "ref",
862
1310
  "classical_type": {
1311
+ "source_ref": null,
863
1312
  "kind": "int"
864
1313
  }
865
1314
  },
866
1315
  {
1316
+ "source_ref": null,
867
1317
  "name": "ctrl",
868
1318
  "quantum_type": {
869
- "kind": "qnum"
1319
+ "source_ref": null,
1320
+ "kind": "qnum",
1321
+ "size": null,
1322
+ "is_signed": null,
1323
+ "fraction_digits": null
870
1324
  },
1325
+ "size": null,
871
1326
  "kind": "PortDeclaration",
872
1327
  "direction": "inout"
873
1328
  },
874
1329
  {
1330
+ "source_ref": null,
875
1331
  "name": "aux",
876
1332
  "quantum_type": {
1333
+ "source_ref": null,
877
1334
  "kind": "qbit"
878
1335
  },
1336
+ "size": null,
879
1337
  "kind": "PortDeclaration",
880
1338
  "direction": "inout"
881
1339
  }
@@ -889,16 +1347,20 @@ QFT_SPACE_ADD_CONST = QuantumFunctionDeclaration.parse_raw(
889
1347
  "name": "qft_space_add_const",
890
1348
  "param_decls": {
891
1349
  "value": {
1350
+ "source_ref": null,
892
1351
  "kind": "int"
893
1352
  }
894
1353
  },
895
1354
  "port_declarations": {
896
1355
  "phi_b": {
1356
+ "source_ref": null,
897
1357
  "name": "phi_b",
898
1358
  "quantum_type": {
1359
+ "source_ref": null,
899
1360
  "kind": "qvec",
900
1361
  "length": null
901
1362
  },
1363
+ "size": null,
902
1364
  "kind": "PortDeclaration",
903
1365
  "direction": "inout"
904
1366
  }
@@ -906,18 +1368,23 @@ QFT_SPACE_ADD_CONST = QuantumFunctionDeclaration.parse_raw(
906
1368
  "operand_declarations": {},
907
1369
  "positional_arg_declarations": [
908
1370
  {
1371
+ "source_ref": null,
909
1372
  "kind": "ClassicalParameterDeclaration",
910
1373
  "name": "value",
911
1374
  "classical_type": {
1375
+ "source_ref": null,
912
1376
  "kind": "int"
913
1377
  }
914
1378
  },
915
1379
  {
1380
+ "source_ref": null,
916
1381
  "name": "phi_b",
917
1382
  "quantum_type": {
1383
+ "source_ref": null,
918
1384
  "kind": "qvec",
919
1385
  "length": null
920
1386
  },
1387
+ "size": null,
921
1388
  "kind": "PortDeclaration",
922
1389
  "direction": "inout"
923
1390
  }
@@ -931,43 +1398,57 @@ CC_MODULAR_ADD = QuantumFunctionDeclaration.parse_raw(
931
1398
  "name": "cc_modular_add",
932
1399
  "param_decls": {
933
1400
  "n": {
1401
+ "source_ref": null,
934
1402
  "kind": "int"
935
1403
  },
936
1404
  "a": {
1405
+ "source_ref": null,
937
1406
  "kind": "int"
938
1407
  }
939
1408
  },
940
1409
  "port_declarations": {
941
1410
  "phi_b": {
1411
+ "source_ref": null,
942
1412
  "name": "phi_b",
943
1413
  "quantum_type": {
1414
+ "source_ref": null,
944
1415
  "kind": "qvec",
945
1416
  "length": null
946
1417
  },
1418
+ "size": null,
947
1419
  "kind": "PortDeclaration",
948
1420
  "direction": "inout"
949
1421
  },
950
1422
  "c1": {
1423
+ "source_ref": null,
951
1424
  "name": "c1",
952
1425
  "quantum_type": {
1426
+ "source_ref": null,
953
1427
  "kind": "qbit"
954
1428
  },
1429
+ "size": null,
955
1430
  "kind": "PortDeclaration",
956
1431
  "direction": "inout"
957
1432
  },
958
1433
  "c2": {
1434
+ "source_ref": null,
959
1435
  "name": "c2",
960
1436
  "quantum_type": {
1437
+ "source_ref": null,
961
1438
  "kind": "qbit"
962
1439
  },
1440
+ "size": null,
963
1441
  "kind": "PortDeclaration",
964
1442
  "direction": "inout"
965
1443
  },
966
1444
  "aux": {
1445
+ "source_ref": null,
967
1446
  "name": "aux",
968
1447
  "quantum_type": {
1448
+ "source_ref": null,
969
1449
  "kind": "qbit"
970
1450
  },
1451
+ "size": null,
971
1452
  "kind": "PortDeclaration",
972
1453
  "direction": "inout"
973
1454
  }
@@ -975,49 +1456,65 @@ CC_MODULAR_ADD = QuantumFunctionDeclaration.parse_raw(
975
1456
  "operand_declarations": {},
976
1457
  "positional_arg_declarations": [
977
1458
  {
1459
+ "source_ref": null,
978
1460
  "kind": "ClassicalParameterDeclaration",
979
1461
  "name": "n",
980
1462
  "classical_type": {
1463
+ "source_ref": null,
981
1464
  "kind": "int"
982
1465
  }
983
1466
  },
984
1467
  {
1468
+ "source_ref": null,
985
1469
  "kind": "ClassicalParameterDeclaration",
986
1470
  "name": "a",
987
1471
  "classical_type": {
1472
+ "source_ref": null,
988
1473
  "kind": "int"
989
1474
  }
990
1475
  },
991
1476
  {
1477
+ "source_ref": null,
992
1478
  "name": "phi_b",
993
1479
  "quantum_type": {
1480
+ "source_ref": null,
994
1481
  "kind": "qvec",
995
1482
  "length": null
996
1483
  },
1484
+ "size": null,
997
1485
  "kind": "PortDeclaration",
998
1486
  "direction": "inout"
999
1487
  },
1000
1488
  {
1489
+ "source_ref": null,
1001
1490
  "name": "c1",
1002
1491
  "quantum_type": {
1492
+ "source_ref": null,
1003
1493
  "kind": "qbit"
1004
1494
  },
1495
+ "size": null,
1005
1496
  "kind": "PortDeclaration",
1006
1497
  "direction": "inout"
1007
1498
  },
1008
1499
  {
1500
+ "source_ref": null,
1009
1501
  "name": "c2",
1010
1502
  "quantum_type": {
1503
+ "source_ref": null,
1011
1504
  "kind": "qbit"
1012
1505
  },
1506
+ "size": null,
1013
1507
  "kind": "PortDeclaration",
1014
1508
  "direction": "inout"
1015
1509
  },
1016
1510
  {
1511
+ "source_ref": null,
1017
1512
  "name": "aux",
1018
1513
  "quantum_type": {
1514
+ "source_ref": null,
1019
1515
  "kind": "qbit"
1020
1516
  },
1517
+ "size": null,
1021
1518
  "kind": "PortDeclaration",
1022
1519
  "direction": "inout"
1023
1520
  }
@@ -1031,44 +1528,58 @@ C_MODULAR_MULTIPLY = QuantumFunctionDeclaration.parse_raw(
1031
1528
  "name": "c_modular_multiply",
1032
1529
  "param_decls": {
1033
1530
  "n": {
1531
+ "source_ref": null,
1034
1532
  "kind": "int"
1035
1533
  },
1036
1534
  "a": {
1535
+ "source_ref": null,
1037
1536
  "kind": "int"
1038
1537
  }
1039
1538
  },
1040
1539
  "port_declarations": {
1041
1540
  "b": {
1541
+ "source_ref": null,
1042
1542
  "name": "b",
1043
1543
  "quantum_type": {
1544
+ "source_ref": null,
1044
1545
  "kind": "qvec",
1045
1546
  "length": null
1046
1547
  },
1548
+ "size": null,
1047
1549
  "kind": "PortDeclaration",
1048
1550
  "direction": "inout"
1049
1551
  },
1050
1552
  "x": {
1553
+ "source_ref": null,
1051
1554
  "name": "x",
1052
1555
  "quantum_type": {
1556
+ "source_ref": null,
1053
1557
  "kind": "qvec",
1054
1558
  "length": null
1055
1559
  },
1560
+ "size": null,
1056
1561
  "kind": "PortDeclaration",
1057
1562
  "direction": "inout"
1058
1563
  },
1059
1564
  "ctrl": {
1565
+ "source_ref": null,
1060
1566
  "name": "ctrl",
1061
1567
  "quantum_type": {
1568
+ "source_ref": null,
1062
1569
  "kind": "qbit"
1063
1570
  },
1571
+ "size": null,
1064
1572
  "kind": "PortDeclaration",
1065
1573
  "direction": "inout"
1066
1574
  },
1067
1575
  "aux": {
1576
+ "source_ref": null,
1068
1577
  "name": "aux",
1069
1578
  "quantum_type": {
1579
+ "source_ref": null,
1070
1580
  "kind": "qbit"
1071
1581
  },
1582
+ "size": null,
1072
1583
  "kind": "PortDeclaration",
1073
1584
  "direction": "inout"
1074
1585
  }
@@ -1076,50 +1587,66 @@ C_MODULAR_MULTIPLY = QuantumFunctionDeclaration.parse_raw(
1076
1587
  "operand_declarations": {},
1077
1588
  "positional_arg_declarations": [
1078
1589
  {
1590
+ "source_ref": null,
1079
1591
  "kind": "ClassicalParameterDeclaration",
1080
1592
  "name": "n",
1081
1593
  "classical_type": {
1594
+ "source_ref": null,
1082
1595
  "kind": "int"
1083
1596
  }
1084
1597
  },
1085
1598
  {
1599
+ "source_ref": null,
1086
1600
  "kind": "ClassicalParameterDeclaration",
1087
1601
  "name": "a",
1088
1602
  "classical_type": {
1603
+ "source_ref": null,
1089
1604
  "kind": "int"
1090
1605
  }
1091
1606
  },
1092
1607
  {
1608
+ "source_ref": null,
1093
1609
  "name": "b",
1094
1610
  "quantum_type": {
1611
+ "source_ref": null,
1095
1612
  "kind": "qvec",
1096
1613
  "length": null
1097
1614
  },
1615
+ "size": null,
1098
1616
  "kind": "PortDeclaration",
1099
1617
  "direction": "inout"
1100
1618
  },
1101
1619
  {
1620
+ "source_ref": null,
1102
1621
  "name": "x",
1103
1622
  "quantum_type": {
1623
+ "source_ref": null,
1104
1624
  "kind": "qvec",
1105
1625
  "length": null
1106
1626
  },
1627
+ "size": null,
1107
1628
  "kind": "PortDeclaration",
1108
1629
  "direction": "inout"
1109
1630
  },
1110
1631
  {
1632
+ "source_ref": null,
1111
1633
  "name": "ctrl",
1112
1634
  "quantum_type": {
1635
+ "source_ref": null,
1113
1636
  "kind": "qbit"
1114
1637
  },
1638
+ "size": null,
1115
1639
  "kind": "PortDeclaration",
1116
1640
  "direction": "inout"
1117
1641
  },
1118
1642
  {
1643
+ "source_ref": null,
1119
1644
  "name": "aux",
1120
1645
  "quantum_type": {
1646
+ "source_ref": null,
1121
1647
  "kind": "qbit"
1122
1648
  },
1649
+ "size": null,
1123
1650
  "kind": "PortDeclaration",
1124
1651
  "direction": "inout"
1125
1652
  }
@@ -1134,20 +1661,26 @@ MULTISWAP = QuantumFunctionDeclaration.parse_raw(
1134
1661
  "param_decls": {},
1135
1662
  "port_declarations": {
1136
1663
  "x": {
1664
+ "source_ref": null,
1137
1665
  "name": "x",
1138
1666
  "quantum_type": {
1667
+ "source_ref": null,
1139
1668
  "kind": "qvec",
1140
1669
  "length": null
1141
1670
  },
1671
+ "size": null,
1142
1672
  "kind": "PortDeclaration",
1143
1673
  "direction": "inout"
1144
1674
  },
1145
1675
  "y": {
1676
+ "source_ref": null,
1146
1677
  "name": "y",
1147
1678
  "quantum_type": {
1679
+ "source_ref": null,
1148
1680
  "kind": "qvec",
1149
1681
  "length": null
1150
1682
  },
1683
+ "size": null,
1151
1684
  "kind": "PortDeclaration",
1152
1685
  "direction": "inout"
1153
1686
  }
@@ -1155,20 +1688,26 @@ MULTISWAP = QuantumFunctionDeclaration.parse_raw(
1155
1688
  "operand_declarations": {},
1156
1689
  "positional_arg_declarations": [
1157
1690
  {
1691
+ "source_ref": null,
1158
1692
  "name": "x",
1159
1693
  "quantum_type": {
1694
+ "source_ref": null,
1160
1695
  "kind": "qvec",
1161
1696
  "length": null
1162
1697
  },
1698
+ "size": null,
1163
1699
  "kind": "PortDeclaration",
1164
1700
  "direction": "inout"
1165
1701
  },
1166
1702
  {
1703
+ "source_ref": null,
1167
1704
  "name": "y",
1168
1705
  "quantum_type": {
1706
+ "source_ref": null,
1169
1707
  "kind": "qvec",
1170
1708
  "length": null
1171
1709
  },
1710
+ "size": null,
1172
1711
  "kind": "PortDeclaration",
1173
1712
  "direction": "inout"
1174
1713
  }
@@ -1182,35 +1721,46 @@ INPLACE_C_MODULAR_MULTIPLY = QuantumFunctionDeclaration.parse_raw(
1182
1721
  "name": "inplace_c_modular_multiply",
1183
1722
  "param_decls": {
1184
1723
  "n": {
1724
+ "source_ref": null,
1185
1725
  "kind": "int"
1186
1726
  },
1187
1727
  "a": {
1728
+ "source_ref": null,
1188
1729
  "kind": "int"
1189
1730
  }
1190
1731
  },
1191
1732
  "port_declarations": {
1192
1733
  "x": {
1734
+ "source_ref": null,
1193
1735
  "name": "x",
1194
1736
  "quantum_type": {
1737
+ "source_ref": null,
1195
1738
  "kind": "qvec",
1196
1739
  "length": null
1197
1740
  },
1741
+ "size": null,
1198
1742
  "kind": "PortDeclaration",
1199
1743
  "direction": "inout"
1200
1744
  },
1201
1745
  "ctrl": {
1746
+ "source_ref": null,
1202
1747
  "name": "ctrl",
1203
1748
  "quantum_type": {
1749
+ "source_ref": null,
1204
1750
  "kind": "qbit"
1205
1751
  },
1752
+ "size": null,
1206
1753
  "kind": "PortDeclaration",
1207
1754
  "direction": "inout"
1208
1755
  },
1209
1756
  "aux": {
1757
+ "source_ref": null,
1210
1758
  "name": "aux",
1211
1759
  "quantum_type": {
1760
+ "source_ref": null,
1212
1761
  "kind": "qbit"
1213
1762
  },
1763
+ "size": null,
1214
1764
  "kind": "PortDeclaration",
1215
1765
  "direction": "inout"
1216
1766
  }
@@ -1218,41 +1768,54 @@ INPLACE_C_MODULAR_MULTIPLY = QuantumFunctionDeclaration.parse_raw(
1218
1768
  "operand_declarations": {},
1219
1769
  "positional_arg_declarations": [
1220
1770
  {
1771
+ "source_ref": null,
1221
1772
  "kind": "ClassicalParameterDeclaration",
1222
1773
  "name": "n",
1223
1774
  "classical_type": {
1775
+ "source_ref": null,
1224
1776
  "kind": "int"
1225
1777
  }
1226
1778
  },
1227
1779
  {
1780
+ "source_ref": null,
1228
1781
  "kind": "ClassicalParameterDeclaration",
1229
1782
  "name": "a",
1230
1783
  "classical_type": {
1784
+ "source_ref": null,
1231
1785
  "kind": "int"
1232
1786
  }
1233
1787
  },
1234
1788
  {
1789
+ "source_ref": null,
1235
1790
  "name": "x",
1236
1791
  "quantum_type": {
1792
+ "source_ref": null,
1237
1793
  "kind": "qvec",
1238
1794
  "length": null
1239
1795
  },
1796
+ "size": null,
1240
1797
  "kind": "PortDeclaration",
1241
1798
  "direction": "inout"
1242
1799
  },
1243
1800
  {
1801
+ "source_ref": null,
1244
1802
  "name": "ctrl",
1245
1803
  "quantum_type": {
1804
+ "source_ref": null,
1246
1805
  "kind": "qbit"
1247
1806
  },
1807
+ "size": null,
1248
1808
  "kind": "PortDeclaration",
1249
1809
  "direction": "inout"
1250
1810
  },
1251
1811
  {
1812
+ "source_ref": null,
1252
1813
  "name": "aux",
1253
1814
  "quantum_type": {
1815
+ "source_ref": null,
1254
1816
  "kind": "qbit"
1255
1817
  },
1818
+ "size": null,
1256
1819
  "kind": "PortDeclaration",
1257
1820
  "direction": "inout"
1258
1821
  }
@@ -1266,28 +1829,36 @@ MODULAR_EXP = QuantumFunctionDeclaration.parse_raw(
1266
1829
  "name": "modular_exp",
1267
1830
  "param_decls": {
1268
1831
  "n": {
1832
+ "source_ref": null,
1269
1833
  "kind": "int"
1270
1834
  },
1271
1835
  "a": {
1836
+ "source_ref": null,
1272
1837
  "kind": "int"
1273
1838
  }
1274
1839
  },
1275
1840
  "port_declarations": {
1276
1841
  "x": {
1842
+ "source_ref": null,
1277
1843
  "name": "x",
1278
1844
  "quantum_type": {
1845
+ "source_ref": null,
1279
1846
  "kind": "qvec",
1280
1847
  "length": null
1281
1848
  },
1849
+ "size": null,
1282
1850
  "kind": "PortDeclaration",
1283
1851
  "direction": "inout"
1284
1852
  },
1285
1853
  "power": {
1854
+ "source_ref": null,
1286
1855
  "name": "power",
1287
1856
  "quantum_type": {
1857
+ "source_ref": null,
1288
1858
  "kind": "qvec",
1289
1859
  "length": null
1290
1860
  },
1861
+ "size": null,
1291
1862
  "kind": "PortDeclaration",
1292
1863
  "direction": "inout"
1293
1864
  }
@@ -1295,34 +1866,44 @@ MODULAR_EXP = QuantumFunctionDeclaration.parse_raw(
1295
1866
  "operand_declarations": {},
1296
1867
  "positional_arg_declarations": [
1297
1868
  {
1869
+ "source_ref": null,
1298
1870
  "kind": "ClassicalParameterDeclaration",
1299
1871
  "name": "n",
1300
1872
  "classical_type": {
1873
+ "source_ref": null,
1301
1874
  "kind": "int"
1302
1875
  }
1303
1876
  },
1304
1877
  {
1878
+ "source_ref": null,
1305
1879
  "kind": "ClassicalParameterDeclaration",
1306
1880
  "name": "a",
1307
1881
  "classical_type": {
1882
+ "source_ref": null,
1308
1883
  "kind": "int"
1309
1884
  }
1310
1885
  },
1311
1886
  {
1887
+ "source_ref": null,
1312
1888
  "name": "x",
1313
1889
  "quantum_type": {
1890
+ "source_ref": null,
1314
1891
  "kind": "qvec",
1315
1892
  "length": null
1316
1893
  },
1894
+ "size": null,
1317
1895
  "kind": "PortDeclaration",
1318
1896
  "direction": "inout"
1319
1897
  },
1320
1898
  {
1899
+ "source_ref": null,
1321
1900
  "name": "power",
1322
1901
  "quantum_type": {
1902
+ "source_ref": null,
1323
1903
  "kind": "qvec",
1324
1904
  "length": null
1325
1905
  },
1906
+ "size": null,
1326
1907
  "kind": "PortDeclaration",
1327
1908
  "direction": "inout"
1328
1909
  }
@@ -1335,53 +1916,92 @@ QSVT_STEP = QuantumFunctionDeclaration.parse_raw(
1335
1916
  "source_ref": null,
1336
1917
  "name": "qsvt_step",
1337
1918
  "param_decls": {
1338
- "phase_seq": {
1339
- "kind": "list",
1340
- "element_type": {
1341
- "kind": "real"
1342
- }
1919
+ "phase1": {
1920
+ "source_ref": null,
1921
+ "kind": "real"
1343
1922
  },
1344
- "index": {
1345
- "kind": "int"
1923
+ "phase2": {
1924
+ "source_ref": null,
1925
+ "kind": "real"
1346
1926
  }
1347
1927
  },
1348
1928
  "port_declarations": {
1349
1929
  "qvar": {
1930
+ "source_ref": null,
1350
1931
  "name": "qvar",
1351
1932
  "quantum_type": {
1933
+ "source_ref": null,
1352
1934
  "kind": "qvec",
1353
1935
  "length": null
1354
1936
  },
1937
+ "size": null,
1355
1938
  "kind": "PortDeclaration",
1356
1939
  "direction": "inout"
1357
1940
  },
1358
1941
  "aux": {
1942
+ "source_ref": null,
1359
1943
  "name": "aux",
1360
1944
  "quantum_type": {
1945
+ "source_ref": null,
1361
1946
  "kind": "qbit"
1362
1947
  },
1948
+ "size": null,
1363
1949
  "kind": "PortDeclaration",
1364
1950
  "direction": "inout"
1365
1951
  }
1366
1952
  },
1367
1953
  "operand_declarations": {
1368
1954
  "proj_cnot_1": {
1955
+ "source_ref": null,
1369
1956
  "name": "proj_cnot_1",
1957
+ "param_decls": {},
1958
+ "port_declarations": {
1959
+ "arg0": {
1960
+ "source_ref": null,
1961
+ "name": "arg0",
1962
+ "quantum_type": {
1963
+ "source_ref": null,
1964
+ "kind": "qvec",
1965
+ "length": null
1966
+ },
1967
+ "size": null,
1968
+ "kind": "PortDeclaration",
1969
+ "direction": "inout"
1970
+ },
1971
+ "arg1": {
1972
+ "source_ref": null,
1973
+ "name": "arg1",
1974
+ "quantum_type": {
1975
+ "source_ref": null,
1976
+ "kind": "qbit"
1977
+ },
1978
+ "size": null,
1979
+ "kind": "PortDeclaration",
1980
+ "direction": "inout"
1981
+ }
1982
+ },
1983
+ "operand_declarations": {},
1370
1984
  "positional_arg_declarations": [
1371
1985
  {
1986
+ "source_ref": null,
1372
1987
  "name": "arg0",
1373
1988
  "quantum_type": {
1989
+ "source_ref": null,
1374
1990
  "kind": "qvec",
1375
1991
  "length": null
1376
1992
  },
1993
+ "size": null,
1377
1994
  "kind": "PortDeclaration",
1378
1995
  "direction": "inout"
1379
1996
  },
1380
1997
  {
1998
+ "source_ref": null,
1381
1999
  "name": "arg1",
1382
2000
  "quantum_type": {
2001
+ "source_ref": null,
1383
2002
  "kind": "qbit"
1384
2003
  },
2004
+ "size": null,
1385
2005
  "kind": "PortDeclaration",
1386
2006
  "direction": "inout"
1387
2007
  }
@@ -1390,22 +2010,56 @@ QSVT_STEP = QuantumFunctionDeclaration.parse_raw(
1390
2010
  "is_list": false
1391
2011
  },
1392
2012
  "proj_cnot_2": {
2013
+ "source_ref": null,
1393
2014
  "name": "proj_cnot_2",
2015
+ "param_decls": {},
2016
+ "port_declarations": {
2017
+ "arg0": {
2018
+ "source_ref": null,
2019
+ "name": "arg0",
2020
+ "quantum_type": {
2021
+ "source_ref": null,
2022
+ "kind": "qvec",
2023
+ "length": null
2024
+ },
2025
+ "size": null,
2026
+ "kind": "PortDeclaration",
2027
+ "direction": "inout"
2028
+ },
2029
+ "arg1": {
2030
+ "source_ref": null,
2031
+ "name": "arg1",
2032
+ "quantum_type": {
2033
+ "source_ref": null,
2034
+ "kind": "qbit"
2035
+ },
2036
+ "size": null,
2037
+ "kind": "PortDeclaration",
2038
+ "direction": "inout"
2039
+ }
2040
+ },
2041
+ "operand_declarations": {},
1394
2042
  "positional_arg_declarations": [
1395
2043
  {
2044
+ "source_ref": null,
1396
2045
  "name": "arg0",
1397
2046
  "quantum_type": {
2047
+ "source_ref": null,
1398
2048
  "kind": "qvec",
1399
2049
  "length": null
1400
2050
  },
2051
+ "size": null,
1401
2052
  "kind": "PortDeclaration",
1402
2053
  "direction": "inout"
1403
2054
  },
1404
2055
  {
2056
+ "source_ref": null,
1405
2057
  "name": "arg1",
1406
2058
  "quantum_type": {
2059
+ "source_ref": null,
1407
2060
  "kind": "qbit"
1408
2061
  },
2062
+ "size": null,
1409
2063
  "kind": "PortDeclaration",
1410
2064
  "direction": "inout"
1411
2065
  }
@@ -1414,14 +2068,34 @@ QSVT_STEP = QuantumFunctionDeclaration.parse_raw(
1414
2068
  "is_list": false
1415
2069
  },
1416
2070
  "u": {
2071
+ "source_ref": null,
1417
2072
  "name": "u",
2073
+ "param_decls": {},
2074
+ "port_declarations": {
2075
+ "arg0": {
2076
+ "source_ref": null,
2077
+ "name": "arg0",
2078
+ "quantum_type": {
2079
+ "source_ref": null,
2080
+ "kind": "qvec",
2081
+ "length": null
2082
+ },
2083
+ "size": null,
2084
+ "kind": "PortDeclaration",
2085
+ "direction": "inout"
2086
+ }
2087
+ },
2088
+ "operand_declarations": {},
1418
2089
  "positional_arg_declarations": [
1419
2090
  {
2091
+ "source_ref": null,
1420
2092
  "name": "arg0",
1421
2093
  "quantum_type": {
2094
+ "source_ref": null,
1422
2095
  "kind": "qvec",
1423
2096
  "length": null
1424
2097
  },
2098
+ "size": null,
1425
2099
  "kind": "PortDeclaration",
1426
2100
  "direction": "inout"
1427
2101
  }
@@ -1432,39 +2106,74 @@ QSVT_STEP = QuantumFunctionDeclaration.parse_raw(
1432
2106
  },
1433
2107
  "positional_arg_declarations": [
1434
2108
  {
2109
+ "source_ref": null,
1435
2110
  "kind": "ClassicalParameterDeclaration",
1436
- "name": "phase_seq",
2111
+ "name": "phase1",
1437
2112
  "classical_type": {
1438
- "kind": "list",
1439
- "element_type": {
1440
- "kind": "real"
1441
- }
2113
+ "source_ref": null,
2114
+ "kind": "real"
1442
2115
  }
1443
2116
  },
1444
2117
  {
2118
+ "source_ref": null,
1445
2119
  "kind": "ClassicalParameterDeclaration",
1446
- "name": "index",
2120
+ "name": "phase2",
1447
2121
  "classical_type": {
1448
- "kind": "int"
2122
+ "source_ref": null,
2123
+ "kind": "real"
1449
2124
  }
1450
2125
  },
1451
2126
  {
2127
+ "source_ref": null,
1452
2128
  "name": "proj_cnot_1",
2129
+ "param_decls": {},
2130
+ "port_declarations": {
2131
+ "arg0": {
2132
+ "source_ref": null,
2133
+ "name": "arg0",
2134
+ "quantum_type": {
2135
+ "source_ref": null,
2136
+ "kind": "qvec",
2137
+ "length": null
2138
+ },
2139
+ "size": null,
2140
+ "kind": "PortDeclaration",
2141
+ "direction": "inout"
2142
+ },
2143
+ "arg1": {
2144
+ "source_ref": null,
2145
+ "name": "arg1",
2146
+ "quantum_type": {
2147
+ "source_ref": null,
2148
+ "kind": "qbit"
2149
+ },
2150
+ "size": null,
2151
+ "kind": "PortDeclaration",
2152
+ "direction": "inout"
2153
+ }
2154
+ },
2155
+ "operand_declarations": {},
1453
2156
  "positional_arg_declarations": [
1454
2157
  {
2158
+ "source_ref": null,
1455
2159
  "name": "arg0",
1456
2160
  "quantum_type": {
2161
+ "source_ref": null,
1457
2162
  "kind": "qvec",
1458
2163
  "length": null
1459
2164
  },
2165
+ "size": null,
1460
2166
  "kind": "PortDeclaration",
1461
2167
  "direction": "inout"
1462
2168
  },
1463
2169
  {
2170
+ "source_ref": null,
1464
2171
  "name": "arg1",
1465
2172
  "quantum_type": {
2173
+ "source_ref": null,
1466
2174
  "kind": "qbit"
1467
2175
  },
2176
+ "size": null,
1468
2177
  "kind": "PortDeclaration",
1469
2178
  "direction": "inout"
1470
2179
  }
@@ -1473,22 +2182,56 @@ QSVT_STEP = QuantumFunctionDeclaration.parse_raw(
1473
2182
  "is_list": false
1474
2183
  },
1475
2184
  {
2185
+ "source_ref": null,
1476
2186
  "name": "proj_cnot_2",
2187
+ "param_decls": {},
2188
+ "port_declarations": {
2189
+ "arg0": {
2190
+ "source_ref": null,
2191
+ "name": "arg0",
2192
+ "quantum_type": {
2193
+ "source_ref": null,
2194
+ "kind": "qvec",
2195
+ "length": null
2196
+ },
2197
+ "size": null,
2198
+ "kind": "PortDeclaration",
2199
+ "direction": "inout"
2200
+ },
2201
+ "arg1": {
2202
+ "source_ref": null,
2203
+ "name": "arg1",
2204
+ "quantum_type": {
2205
+ "source_ref": null,
2206
+ "kind": "qbit"
2207
+ },
2208
+ "size": null,
2209
+ "kind": "PortDeclaration",
2210
+ "direction": "inout"
2211
+ }
2212
+ },
2213
+ "operand_declarations": {},
1477
2214
  "positional_arg_declarations": [
1478
2215
  {
2216
+ "source_ref": null,
1479
2217
  "name": "arg0",
1480
2218
  "quantum_type": {
2219
+ "source_ref": null,
1481
2220
  "kind": "qvec",
1482
2221
  "length": null
1483
2222
  },
2223
+ "size": null,
1484
2224
  "kind": "PortDeclaration",
1485
2225
  "direction": "inout"
1486
2226
  },
1487
2227
  {
2228
+ "source_ref": null,
1488
2229
  "name": "arg1",
1489
2230
  "quantum_type": {
2231
+ "source_ref": null,
1490
2232
  "kind": "qbit"
1491
2233
  },
2234
+ "size": null,
1492
2235
  "kind": "PortDeclaration",
1493
2236
  "direction": "inout"
1494
2237
  }
@@ -1497,14 +2240,34 @@ QSVT_STEP = QuantumFunctionDeclaration.parse_raw(
1497
2240
  "is_list": false
1498
2241
  },
1499
2242
  {
2243
+ "source_ref": null,
1500
2244
  "name": "u",
2245
+ "param_decls": {},
2246
+ "port_declarations": {
2247
+ "arg0": {
2248
+ "source_ref": null,
2249
+ "name": "arg0",
2250
+ "quantum_type": {
2251
+ "source_ref": null,
2252
+ "kind": "qvec",
2253
+ "length": null
2254
+ },
2255
+ "size": null,
2256
+ "kind": "PortDeclaration",
2257
+ "direction": "inout"
2258
+ }
2259
+ },
2260
+ "operand_declarations": {},
1501
2261
  "positional_arg_declarations": [
1502
2262
  {
2263
+ "source_ref": null,
1503
2264
  "name": "arg0",
1504
2265
  "quantum_type": {
2266
+ "source_ref": null,
1505
2267
  "kind": "qvec",
1506
2268
  "length": null
1507
2269
  },
2270
+ "size": null,
1508
2271
  "kind": "PortDeclaration",
1509
2272
  "direction": "inout"
1510
2273
  }
@@ -1513,19 +2276,25 @@ QSVT_STEP = QuantumFunctionDeclaration.parse_raw(
1513
2276
  "is_list": false
1514
2277
  },
1515
2278
  {
2279
+ "source_ref": null,
1516
2280
  "name": "qvar",
1517
2281
  "quantum_type": {
2282
+ "source_ref": null,
1518
2283
  "kind": "qvec",
1519
2284
  "length": null
1520
2285
  },
2286
+ "size": null,
1521
2287
  "kind": "PortDeclaration",
1522
2288
  "direction": "inout"
1523
2289
  },
1524
2290
  {
2291
+ "source_ref": null,
1525
2292
  "name": "aux",
1526
2293
  "quantum_type": {
2294
+ "source_ref": null,
1527
2295
  "kind": "qbit"
1528
2296
  },
2297
+ "size": null,
1529
2298
  "kind": "PortDeclaration",
1530
2299
  "direction": "inout"
1531
2300
  }
@@ -1539,49 +2308,91 @@ QSVT = QuantumFunctionDeclaration.parse_raw(
1539
2308
  "name": "qsvt",
1540
2309
  "param_decls": {
1541
2310
  "phase_seq": {
2311
+ "source_ref": null,
1542
2312
  "kind": "list",
1543
2313
  "element_type": {
2314
+ "source_ref": null,
1544
2315
  "kind": "real"
1545
2316
  }
1546
2317
  }
1547
2318
  },
1548
2319
  "port_declarations": {
1549
2320
  "qvar": {
2321
+ "source_ref": null,
1550
2322
  "name": "qvar",
1551
2323
  "quantum_type": {
2324
+ "source_ref": null,
1552
2325
  "kind": "qvec",
1553
2326
  "length": null
1554
2327
  },
2328
+ "size": null,
1555
2329
  "kind": "PortDeclaration",
1556
2330
  "direction": "inout"
1557
2331
  },
1558
2332
  "aux": {
2333
+ "source_ref": null,
1559
2334
  "name": "aux",
1560
2335
  "quantum_type": {
2336
+ "source_ref": null,
1561
2337
  "kind": "qbit"
1562
2338
  },
2339
+ "size": null,
1563
2340
  "kind": "PortDeclaration",
1564
2341
  "direction": "inout"
1565
2342
  }
1566
2343
  },
1567
2344
  "operand_declarations": {
1568
2345
  "proj_cnot_1": {
2346
+ "source_ref": null,
1569
2347
  "name": "proj_cnot_1",
2348
+ "param_decls": {},
2349
+ "port_declarations": {
2350
+ "arg0": {
2351
+ "source_ref": null,
2352
+ "name": "arg0",
2353
+ "quantum_type": {
2354
+ "source_ref": null,
2355
+ "kind": "qvec",
2356
+ "length": null
2357
+ },
2358
+ "size": null,
2359
+ "kind": "PortDeclaration",
2360
+ "direction": "inout"
2361
+ },
2362
+ "arg1": {
2363
+ "source_ref": null,
2364
+ "name": "arg1",
2365
+ "quantum_type": {
2366
+ "source_ref": null,
2367
+ "kind": "qbit"
2368
+ },
2369
+ "size": null,
2370
+ "kind": "PortDeclaration",
2371
+ "direction": "inout"
2372
+ }
2373
+ },
2374
+ "operand_declarations": {},
1570
2375
  "positional_arg_declarations": [
1571
2376
  {
2377
+ "source_ref": null,
1572
2378
  "name": "arg0",
1573
2379
  "quantum_type": {
2380
+ "source_ref": null,
1574
2381
  "kind": "qvec",
1575
2382
  "length": null
1576
2383
  },
2384
+ "size": null,
1577
2385
  "kind": "PortDeclaration",
1578
2386
  "direction": "inout"
1579
2387
  },
1580
2388
  {
2389
+ "source_ref": null,
1581
2390
  "name": "arg1",
1582
2391
  "quantum_type": {
2392
+ "source_ref": null,
1583
2393
  "kind": "qbit"
1584
2394
  },
2395
+ "size": null,
1585
2396
  "kind": "PortDeclaration",
1586
2397
  "direction": "inout"
1587
2398
  }
@@ -1590,22 +2401,56 @@ QSVT = QuantumFunctionDeclaration.parse_raw(
1590
2401
  "is_list": false
1591
2402
  },
1592
2403
  "proj_cnot_2": {
2404
+ "source_ref": null,
1593
2405
  "name": "proj_cnot_2",
2406
+ "param_decls": {},
2407
+ "port_declarations": {
2408
+ "arg0": {
2409
+ "source_ref": null,
2410
+ "name": "arg0",
2411
+ "quantum_type": {
2412
+ "source_ref": null,
2413
+ "kind": "qvec",
2414
+ "length": null
2415
+ },
2416
+ "size": null,
2417
+ "kind": "PortDeclaration",
2418
+ "direction": "inout"
2419
+ },
2420
+ "arg1": {
2421
+ "source_ref": null,
2422
+ "name": "arg1",
2423
+ "quantum_type": {
2424
+ "source_ref": null,
2425
+ "kind": "qbit"
2426
+ },
2427
+ "size": null,
2428
+ "kind": "PortDeclaration",
2429
+ "direction": "inout"
2430
+ }
2431
+ },
2432
+ "operand_declarations": {},
1594
2433
  "positional_arg_declarations": [
1595
2434
  {
2435
+ "source_ref": null,
1596
2436
  "name": "arg0",
1597
2437
  "quantum_type": {
2438
+ "source_ref": null,
1598
2439
  "kind": "qvec",
1599
2440
  "length": null
1600
2441
  },
2442
+ "size": null,
1601
2443
  "kind": "PortDeclaration",
1602
2444
  "direction": "inout"
1603
2445
  },
1604
2446
  {
2447
+ "source_ref": null,
1605
2448
  "name": "arg1",
1606
2449
  "quantum_type": {
2450
+ "source_ref": null,
1607
2451
  "kind": "qbit"
1608
2452
  },
2453
+ "size": null,
1609
2454
  "kind": "PortDeclaration",
1610
2455
  "direction": "inout"
1611
2456
  }
@@ -1614,14 +2459,34 @@ QSVT = QuantumFunctionDeclaration.parse_raw(
1614
2459
  "is_list": false
1615
2460
  },
1616
2461
  "u": {
2462
+ "source_ref": null,
1617
2463
  "name": "u",
2464
+ "param_decls": {},
2465
+ "port_declarations": {
2466
+ "arg0": {
2467
+ "source_ref": null,
2468
+ "name": "arg0",
2469
+ "quantum_type": {
2470
+ "source_ref": null,
2471
+ "kind": "qvec",
2472
+ "length": null
2473
+ },
2474
+ "size": null,
2475
+ "kind": "PortDeclaration",
2476
+ "direction": "inout"
2477
+ }
2478
+ },
2479
+ "operand_declarations": {},
1618
2480
  "positional_arg_declarations": [
1619
2481
  {
2482
+ "source_ref": null,
1620
2483
  "name": "arg0",
1621
2484
  "quantum_type": {
2485
+ "source_ref": null,
1622
2486
  "kind": "qvec",
1623
2487
  "length": null
1624
2488
  },
2489
+ "size": null,
1625
2490
  "kind": "PortDeclaration",
1626
2491
  "direction": "inout"
1627
2492
  }
@@ -1632,32 +2497,69 @@ QSVT = QuantumFunctionDeclaration.parse_raw(
1632
2497
  },
1633
2498
  "positional_arg_declarations": [
1634
2499
  {
2500
+ "source_ref": null,
1635
2501
  "kind": "ClassicalParameterDeclaration",
1636
2502
  "name": "phase_seq",
1637
2503
  "classical_type": {
2504
+ "source_ref": null,
1638
2505
  "kind": "list",
1639
2506
  "element_type": {
2507
+ "source_ref": null,
1640
2508
  "kind": "real"
1641
2509
  }
1642
2510
  }
1643
2511
  },
1644
2512
  {
2513
+ "source_ref": null,
1645
2514
  "name": "proj_cnot_1",
2515
+ "param_decls": {},
2516
+ "port_declarations": {
2517
+ "arg0": {
2518
+ "source_ref": null,
2519
+ "name": "arg0",
2520
+ "quantum_type": {
2521
+ "source_ref": null,
2522
+ "kind": "qvec",
2523
+ "length": null
2524
+ },
2525
+ "size": null,
2526
+ "kind": "PortDeclaration",
2527
+ "direction": "inout"
2528
+ },
2529
+ "arg1": {
2530
+ "source_ref": null,
2531
+ "name": "arg1",
2532
+ "quantum_type": {
2533
+ "source_ref": null,
2534
+ "kind": "qbit"
2535
+ },
2536
+ "size": null,
2537
+ "kind": "PortDeclaration",
2538
+ "direction": "inout"
2539
+ }
2540
+ },
2541
+ "operand_declarations": {},
1646
2542
  "positional_arg_declarations": [
1647
2543
  {
2544
+ "source_ref": null,
1648
2545
  "name": "arg0",
1649
2546
  "quantum_type": {
2547
+ "source_ref": null,
1650
2548
  "kind": "qvec",
1651
2549
  "length": null
1652
2550
  },
2551
+ "size": null,
1653
2552
  "kind": "PortDeclaration",
1654
2553
  "direction": "inout"
1655
2554
  },
1656
2555
  {
2556
+ "source_ref": null,
1657
2557
  "name": "arg1",
1658
2558
  "quantum_type": {
2559
+ "source_ref": null,
1659
2560
  "kind": "qbit"
1660
2561
  },
2562
+ "size": null,
1661
2563
  "kind": "PortDeclaration",
1662
2564
  "direction": "inout"
1663
2565
  }
@@ -1666,22 +2568,56 @@ QSVT = QuantumFunctionDeclaration.parse_raw(
1666
2568
  "is_list": false
1667
2569
  },
1668
2570
  {
2571
+ "source_ref": null,
1669
2572
  "name": "proj_cnot_2",
2573
+ "param_decls": {},
2574
+ "port_declarations": {
2575
+ "arg0": {
2576
+ "source_ref": null,
2577
+ "name": "arg0",
2578
+ "quantum_type": {
2579
+ "source_ref": null,
2580
+ "kind": "qvec",
2581
+ "length": null
2582
+ },
2583
+ "size": null,
2584
+ "kind": "PortDeclaration",
2585
+ "direction": "inout"
2586
+ },
2587
+ "arg1": {
2588
+ "source_ref": null,
2589
+ "name": "arg1",
2590
+ "quantum_type": {
2591
+ "source_ref": null,
2592
+ "kind": "qbit"
2593
+ },
2594
+ "size": null,
2595
+ "kind": "PortDeclaration",
2596
+ "direction": "inout"
2597
+ }
2598
+ },
2599
+ "operand_declarations": {},
1670
2600
  "positional_arg_declarations": [
1671
2601
  {
2602
+ "source_ref": null,
1672
2603
  "name": "arg0",
1673
2604
  "quantum_type": {
2605
+ "source_ref": null,
1674
2606
  "kind": "qvec",
1675
2607
  "length": null
1676
2608
  },
2609
+ "size": null,
1677
2610
  "kind": "PortDeclaration",
1678
2611
  "direction": "inout"
1679
2612
  },
1680
2613
  {
2614
+ "source_ref": null,
1681
2615
  "name": "arg1",
1682
2616
  "quantum_type": {
2617
+ "source_ref": null,
1683
2618
  "kind": "qbit"
1684
2619
  },
2620
+ "size": null,
1685
2621
  "kind": "PortDeclaration",
1686
2622
  "direction": "inout"
1687
2623
  }
@@ -1690,14 +2626,34 @@ QSVT = QuantumFunctionDeclaration.parse_raw(
1690
2626
  "is_list": false
1691
2627
  },
1692
2628
  {
2629
+ "source_ref": null,
1693
2630
  "name": "u",
2631
+ "param_decls": {},
2632
+ "port_declarations": {
2633
+ "arg0": {
2634
+ "source_ref": null,
2635
+ "name": "arg0",
2636
+ "quantum_type": {
2637
+ "source_ref": null,
2638
+ "kind": "qvec",
2639
+ "length": null
2640
+ },
2641
+ "size": null,
2642
+ "kind": "PortDeclaration",
2643
+ "direction": "inout"
2644
+ }
2645
+ },
2646
+ "operand_declarations": {},
1694
2647
  "positional_arg_declarations": [
1695
2648
  {
2649
+ "source_ref": null,
1696
2650
  "name": "arg0",
1697
2651
  "quantum_type": {
2652
+ "source_ref": null,
1698
2653
  "kind": "qvec",
1699
2654
  "length": null
1700
2655
  },
2656
+ "size": null,
1701
2657
  "kind": "PortDeclaration",
1702
2658
  "direction": "inout"
1703
2659
  }
@@ -1706,19 +2662,25 @@ QSVT = QuantumFunctionDeclaration.parse_raw(
1706
2662
  "is_list": false
1707
2663
  },
1708
2664
  {
2665
+ "source_ref": null,
1709
2666
  "name": "qvar",
1710
2667
  "quantum_type": {
2668
+ "source_ref": null,
1711
2669
  "kind": "qvec",
1712
2670
  "length": null
1713
2671
  },
2672
+ "size": null,
1714
2673
  "kind": "PortDeclaration",
1715
2674
  "direction": "inout"
1716
2675
  },
1717
2676
  {
2677
+ "source_ref": null,
1718
2678
  "name": "aux",
1719
2679
  "quantum_type": {
2680
+ "source_ref": null,
1720
2681
  "kind": "qbit"
1721
2682
  },
2683
+ "size": null,
1722
2684
  "kind": "PortDeclaration",
1723
2685
  "direction": "inout"
1724
2686
  }
@@ -1732,46 +2694,87 @@ PROJECTOR_CONTROLLED_PHASE = QuantumFunctionDeclaration.parse_raw(
1732
2694
  "name": "projector_controlled_phase",
1733
2695
  "param_decls": {
1734
2696
  "phase": {
2697
+ "source_ref": null,
1735
2698
  "kind": "real"
1736
2699
  }
1737
2700
  },
1738
2701
  "port_declarations": {
1739
2702
  "qvar": {
2703
+ "source_ref": null,
1740
2704
  "name": "qvar",
1741
2705
  "quantum_type": {
2706
+ "source_ref": null,
1742
2707
  "kind": "qvec",
1743
2708
  "length": null
1744
2709
  },
2710
+ "size": null,
1745
2711
  "kind": "PortDeclaration",
1746
2712
  "direction": "inout"
1747
2713
  },
1748
2714
  "aux": {
2715
+ "source_ref": null,
1749
2716
  "name": "aux",
1750
2717
  "quantum_type": {
2718
+ "source_ref": null,
1751
2719
  "kind": "qbit"
1752
2720
  },
2721
+ "size": null,
1753
2722
  "kind": "PortDeclaration",
1754
2723
  "direction": "inout"
1755
2724
  }
1756
2725
  },
1757
2726
  "operand_declarations": {
1758
2727
  "proj_cnot": {
2728
+ "source_ref": null,
1759
2729
  "name": "proj_cnot",
2730
+ "param_decls": {},
2731
+ "port_declarations": {
2732
+ "arg0": {
2733
+ "source_ref": null,
2734
+ "name": "arg0",
2735
+ "quantum_type": {
2736
+ "source_ref": null,
2737
+ "kind": "qvec",
2738
+ "length": null
2739
+ },
2740
+ "size": null,
2741
+ "kind": "PortDeclaration",
2742
+ "direction": "inout"
2743
+ },
2744
+ "arg1": {
2745
+ "source_ref": null,
2746
+ "name": "arg1",
2747
+ "quantum_type": {
2748
+ "source_ref": null,
2749
+ "kind": "qbit"
2750
+ },
2751
+ "size": null,
2752
+ "kind": "PortDeclaration",
2753
+ "direction": "inout"
2754
+ }
2755
+ },
2756
+ "operand_declarations": {},
1760
2757
  "positional_arg_declarations": [
1761
2758
  {
2759
+ "source_ref": null,
1762
2760
  "name": "arg0",
1763
2761
  "quantum_type": {
2762
+ "source_ref": null,
1764
2763
  "kind": "qvec",
1765
2764
  "length": null
1766
2765
  },
2766
+ "size": null,
1767
2767
  "kind": "PortDeclaration",
1768
2768
  "direction": "inout"
1769
2769
  },
1770
2770
  {
2771
+ "source_ref": null,
1771
2772
  "name": "arg1",
1772
2773
  "quantum_type": {
2774
+ "source_ref": null,
1773
2775
  "kind": "qbit"
1774
2776
  },
2777
+ "size": null,
1775
2778
  "kind": "PortDeclaration",
1776
2779
  "direction": "inout"
1777
2780
  }
@@ -1782,29 +2785,65 @@ PROJECTOR_CONTROLLED_PHASE = QuantumFunctionDeclaration.parse_raw(
1782
2785
  },
1783
2786
  "positional_arg_declarations": [
1784
2787
  {
2788
+ "source_ref": null,
1785
2789
  "kind": "ClassicalParameterDeclaration",
1786
2790
  "name": "phase",
1787
2791
  "classical_type": {
2792
+ "source_ref": null,
1788
2793
  "kind": "real"
1789
2794
  }
1790
2795
  },
1791
2796
  {
2797
+ "source_ref": null,
1792
2798
  "name": "proj_cnot",
2799
+ "param_decls": {},
2800
+ "port_declarations": {
2801
+ "arg0": {
2802
+ "source_ref": null,
2803
+ "name": "arg0",
2804
+ "quantum_type": {
2805
+ "source_ref": null,
2806
+ "kind": "qvec",
2807
+ "length": null
2808
+ },
2809
+ "size": null,
2810
+ "kind": "PortDeclaration",
2811
+ "direction": "inout"
2812
+ },
2813
+ "arg1": {
2814
+ "source_ref": null,
2815
+ "name": "arg1",
2816
+ "quantum_type": {
2817
+ "source_ref": null,
2818
+ "kind": "qbit"
2819
+ },
2820
+ "size": null,
2821
+ "kind": "PortDeclaration",
2822
+ "direction": "inout"
2823
+ }
2824
+ },
2825
+ "operand_declarations": {},
1793
2826
  "positional_arg_declarations": [
1794
2827
  {
2828
+ "source_ref": null,
1795
2829
  "name": "arg0",
1796
2830
  "quantum_type": {
2831
+ "source_ref": null,
1797
2832
  "kind": "qvec",
1798
2833
  "length": null
1799
2834
  },
2835
+ "size": null,
1800
2836
  "kind": "PortDeclaration",
1801
2837
  "direction": "inout"
1802
2838
  },
1803
2839
  {
2840
+ "source_ref": null,
1804
2841
  "name": "arg1",
1805
2842
  "quantum_type": {
2843
+ "source_ref": null,
1806
2844
  "kind": "qbit"
1807
2845
  },
2846
+ "size": null,
1808
2847
  "kind": "PortDeclaration",
1809
2848
  "direction": "inout"
1810
2849
  }
@@ -1813,19 +2852,25 @@ PROJECTOR_CONTROLLED_PHASE = QuantumFunctionDeclaration.parse_raw(
1813
2852
  "is_list": false
1814
2853
  },
1815
2854
  {
2855
+ "source_ref": null,
1816
2856
  "name": "qvar",
1817
2857
  "quantum_type": {
2858
+ "source_ref": null,
1818
2859
  "kind": "qvec",
1819
2860
  "length": null
1820
2861
  },
2862
+ "size": null,
1821
2863
  "kind": "PortDeclaration",
1822
2864
  "direction": "inout"
1823
2865
  },
1824
2866
  {
2867
+ "source_ref": null,
1825
2868
  "name": "aux",
1826
2869
  "quantum_type": {
2870
+ "source_ref": null,
1827
2871
  "kind": "qbit"
1828
2872
  },
2873
+ "size": null,
1829
2874
  "kind": "PortDeclaration",
1830
2875
  "direction": "inout"
1831
2876
  }
@@ -1839,49 +2884,91 @@ QSVT_INVERSION = QuantumFunctionDeclaration.parse_raw(
1839
2884
  "name": "qsvt_inversion",
1840
2885
  "param_decls": {
1841
2886
  "phase_seq": {
2887
+ "source_ref": null,
1842
2888
  "kind": "list",
1843
2889
  "element_type": {
2890
+ "source_ref": null,
1844
2891
  "kind": "real"
1845
2892
  }
1846
2893
  }
1847
2894
  },
1848
2895
  "port_declarations": {
1849
2896
  "qvar": {
2897
+ "source_ref": null,
1850
2898
  "name": "qvar",
1851
2899
  "quantum_type": {
2900
+ "source_ref": null,
1852
2901
  "kind": "qvec",
1853
2902
  "length": null
1854
2903
  },
2904
+ "size": null,
1855
2905
  "kind": "PortDeclaration",
1856
2906
  "direction": "inout"
1857
2907
  },
1858
2908
  "aux": {
2909
+ "source_ref": null,
1859
2910
  "name": "aux",
1860
2911
  "quantum_type": {
2912
+ "source_ref": null,
1861
2913
  "kind": "qbit"
1862
2914
  },
2915
+ "size": null,
1863
2916
  "kind": "PortDeclaration",
1864
2917
  "direction": "inout"
1865
2918
  }
1866
2919
  },
1867
2920
  "operand_declarations": {
1868
2921
  "block_encoding_cnot": {
2922
+ "source_ref": null,
1869
2923
  "name": "block_encoding_cnot",
2924
+ "param_decls": {},
2925
+ "port_declarations": {
2926
+ "arg0": {
2927
+ "source_ref": null,
2928
+ "name": "arg0",
2929
+ "quantum_type": {
2930
+ "source_ref": null,
2931
+ "kind": "qvec",
2932
+ "length": null
2933
+ },
2934
+ "size": null,
2935
+ "kind": "PortDeclaration",
2936
+ "direction": "inout"
2937
+ },
2938
+ "arg1": {
2939
+ "source_ref": null,
2940
+ "name": "arg1",
2941
+ "quantum_type": {
2942
+ "source_ref": null,
2943
+ "kind": "qbit"
2944
+ },
2945
+ "size": null,
2946
+ "kind": "PortDeclaration",
2947
+ "direction": "inout"
2948
+ }
2949
+ },
2950
+ "operand_declarations": {},
1870
2951
  "positional_arg_declarations": [
1871
2952
  {
2953
+ "source_ref": null,
1872
2954
  "name": "arg0",
1873
2955
  "quantum_type": {
2956
+ "source_ref": null,
1874
2957
  "kind": "qvec",
1875
2958
  "length": null
1876
2959
  },
2960
+ "size": null,
1877
2961
  "kind": "PortDeclaration",
1878
2962
  "direction": "inout"
1879
2963
  },
1880
2964
  {
2965
+ "source_ref": null,
1881
2966
  "name": "arg1",
1882
2967
  "quantum_type": {
2968
+ "source_ref": null,
1883
2969
  "kind": "qbit"
1884
2970
  },
2971
+ "size": null,
1885
2972
  "kind": "PortDeclaration",
1886
2973
  "direction": "inout"
1887
2974
  }
@@ -1890,14 +2977,34 @@ QSVT_INVERSION = QuantumFunctionDeclaration.parse_raw(
1890
2977
  "is_list": false
1891
2978
  },
1892
2979
  "u": {
2980
+ "source_ref": null,
1893
2981
  "name": "u",
2982
+ "param_decls": {},
2983
+ "port_declarations": {
2984
+ "arg0": {
2985
+ "source_ref": null,
2986
+ "name": "arg0",
2987
+ "quantum_type": {
2988
+ "source_ref": null,
2989
+ "kind": "qvec",
2990
+ "length": null
2991
+ },
2992
+ "size": null,
2993
+ "kind": "PortDeclaration",
2994
+ "direction": "inout"
2995
+ }
2996
+ },
2997
+ "operand_declarations": {},
1894
2998
  "positional_arg_declarations": [
1895
2999
  {
3000
+ "source_ref": null,
1896
3001
  "name": "arg0",
1897
3002
  "quantum_type": {
3003
+ "source_ref": null,
1898
3004
  "kind": "qvec",
1899
3005
  "length": null
1900
3006
  },
3007
+ "size": null,
1901
3008
  "kind": "PortDeclaration",
1902
3009
  "direction": "inout"
1903
3010
  }
@@ -1908,32 +3015,69 @@ QSVT_INVERSION = QuantumFunctionDeclaration.parse_raw(
1908
3015
  },
1909
3016
  "positional_arg_declarations": [
1910
3017
  {
3018
+ "source_ref": null,
1911
3019
  "kind": "ClassicalParameterDeclaration",
1912
3020
  "name": "phase_seq",
1913
3021
  "classical_type": {
3022
+ "source_ref": null,
1914
3023
  "kind": "list",
1915
3024
  "element_type": {
3025
+ "source_ref": null,
1916
3026
  "kind": "real"
1917
3027
  }
1918
3028
  }
1919
3029
  },
1920
3030
  {
3031
+ "source_ref": null,
1921
3032
  "name": "block_encoding_cnot",
3033
+ "param_decls": {},
3034
+ "port_declarations": {
3035
+ "arg0": {
3036
+ "source_ref": null,
3037
+ "name": "arg0",
3038
+ "quantum_type": {
3039
+ "source_ref": null,
3040
+ "kind": "qvec",
3041
+ "length": null
3042
+ },
3043
+ "size": null,
3044
+ "kind": "PortDeclaration",
3045
+ "direction": "inout"
3046
+ },
3047
+ "arg1": {
3048
+ "source_ref": null,
3049
+ "name": "arg1",
3050
+ "quantum_type": {
3051
+ "source_ref": null,
3052
+ "kind": "qbit"
3053
+ },
3054
+ "size": null,
3055
+ "kind": "PortDeclaration",
3056
+ "direction": "inout"
3057
+ }
3058
+ },
3059
+ "operand_declarations": {},
1922
3060
  "positional_arg_declarations": [
1923
3061
  {
3062
+ "source_ref": null,
1924
3063
  "name": "arg0",
1925
3064
  "quantum_type": {
3065
+ "source_ref": null,
1926
3066
  "kind": "qvec",
1927
3067
  "length": null
1928
3068
  },
3069
+ "size": null,
1929
3070
  "kind": "PortDeclaration",
1930
3071
  "direction": "inout"
1931
3072
  },
1932
3073
  {
3074
+ "source_ref": null,
1933
3075
  "name": "arg1",
1934
3076
  "quantum_type": {
3077
+ "source_ref": null,
1935
3078
  "kind": "qbit"
1936
3079
  },
3080
+ "size": null,
1937
3081
  "kind": "PortDeclaration",
1938
3082
  "direction": "inout"
1939
3083
  }
@@ -1942,14 +3086,34 @@ QSVT_INVERSION = QuantumFunctionDeclaration.parse_raw(
1942
3086
  "is_list": false
1943
3087
  },
1944
3088
  {
3089
+ "source_ref": null,
1945
3090
  "name": "u",
3091
+ "param_decls": {},
3092
+ "port_declarations": {
3093
+ "arg0": {
3094
+ "source_ref": null,
3095
+ "name": "arg0",
3096
+ "quantum_type": {
3097
+ "source_ref": null,
3098
+ "kind": "qvec",
3099
+ "length": null
3100
+ },
3101
+ "size": null,
3102
+ "kind": "PortDeclaration",
3103
+ "direction": "inout"
3104
+ }
3105
+ },
3106
+ "operand_declarations": {},
1946
3107
  "positional_arg_declarations": [
1947
3108
  {
3109
+ "source_ref": null,
1948
3110
  "name": "arg0",
1949
3111
  "quantum_type": {
3112
+ "source_ref": null,
1950
3113
  "kind": "qvec",
1951
3114
  "length": null
1952
3115
  },
3116
+ "size": null,
1953
3117
  "kind": "PortDeclaration",
1954
3118
  "direction": "inout"
1955
3119
  }
@@ -1958,19 +3122,25 @@ QSVT_INVERSION = QuantumFunctionDeclaration.parse_raw(
1958
3122
  "is_list": false
1959
3123
  },
1960
3124
  {
3125
+ "source_ref": null,
1961
3126
  "name": "qvar",
1962
3127
  "quantum_type": {
3128
+ "source_ref": null,
1963
3129
  "kind": "qvec",
1964
3130
  "length": null
1965
3131
  },
3132
+ "size": null,
1966
3133
  "kind": "PortDeclaration",
1967
3134
  "direction": "inout"
1968
3135
  },
1969
3136
  {
3137
+ "source_ref": null,
1970
3138
  "name": "aux",
1971
3139
  "quantum_type": {
3140
+ "source_ref": null,
1972
3141
  "kind": "qbit"
1973
3142
  },
3143
+ "size": null,
1974
3144
  "kind": "PortDeclaration",
1975
3145
  "direction": "inout"
1976
3146
  }
@@ -2255,28 +3425,37 @@ SWAP_TEST = QuantumFunctionDeclaration.parse_raw(
2255
3425
  "param_decls": {},
2256
3426
  "port_declarations": {
2257
3427
  "state1": {
3428
+ "source_ref": null,
2258
3429
  "name": "state1",
2259
3430
  "quantum_type": {
3431
+ "source_ref": null,
2260
3432
  "kind": "qvec",
2261
3433
  "length": null
2262
3434
  },
3435
+ "size": null,
2263
3436
  "kind": "PortDeclaration",
2264
3437
  "direction": "inout"
2265
3438
  },
2266
3439
  "state2": {
3440
+ "source_ref": null,
2267
3441
  "name": "state2",
2268
3442
  "quantum_type": {
3443
+ "source_ref": null,
2269
3444
  "kind": "qvec",
2270
3445
  "length": null
2271
3446
  },
3447
+ "size": null,
2272
3448
  "kind": "PortDeclaration",
2273
3449
  "direction": "inout"
2274
3450
  },
2275
3451
  "test": {
3452
+ "source_ref": null,
2276
3453
  "name": "test",
2277
3454
  "quantum_type": {
3455
+ "source_ref": null,
2278
3456
  "kind": "qbit"
2279
3457
  },
3458
+ "size": null,
2280
3459
  "kind": "PortDeclaration",
2281
3460
  "direction": "output"
2282
3461
  }
@@ -2284,28 +3463,37 @@ SWAP_TEST = QuantumFunctionDeclaration.parse_raw(
2284
3463
  "operand_declarations": {},
2285
3464
  "positional_arg_declarations": [
2286
3465
  {
3466
+ "source_ref": null,
2287
3467
  "name": "state1",
2288
3468
  "quantum_type": {
3469
+ "source_ref": null,
2289
3470
  "kind": "qvec",
2290
3471
  "length": null
2291
3472
  },
3473
+ "size": null,
2292
3474
  "kind": "PortDeclaration",
2293
3475
  "direction": "inout"
2294
3476
  },
2295
3477
  {
3478
+ "source_ref": null,
2296
3479
  "name": "state2",
2297
3480
  "quantum_type": {
3481
+ "source_ref": null,
2298
3482
  "kind": "qvec",
2299
3483
  "length": null
2300
3484
  },
3485
+ "size": null,
2301
3486
  "kind": "PortDeclaration",
2302
3487
  "direction": "inout"
2303
3488
  },
2304
3489
  {
3490
+ "source_ref": null,
2305
3491
  "name": "test",
2306
3492
  "quantum_type": {
3493
+ "source_ref": null,
2307
3494
  "kind": "qbit"
2308
3495
  },
3496
+ "size": null,
2309
3497
  "kind": "PortDeclaration",
2310
3498
  "direction": "output"
2311
3499
  }
@@ -2319,16 +3507,20 @@ PREPARE_GHZ_STATE = QuantumFunctionDeclaration.parse_raw(
2319
3507
  "name": "prepare_ghz_state",
2320
3508
  "param_decls": {
2321
3509
  "size": {
3510
+ "source_ref": null,
2322
3511
  "kind": "int"
2323
3512
  }
2324
3513
  },
2325
3514
  "port_declarations": {
2326
3515
  "q": {
3516
+ "source_ref": null,
2327
3517
  "name": "q",
2328
3518
  "quantum_type": {
3519
+ "source_ref": null,
2329
3520
  "kind": "qvec",
2330
3521
  "length": null
2331
3522
  },
3523
+ "size": null,
2332
3524
  "kind": "PortDeclaration",
2333
3525
  "direction": "output"
2334
3526
  }
@@ -2336,18 +3528,23 @@ PREPARE_GHZ_STATE = QuantumFunctionDeclaration.parse_raw(
2336
3528
  "operand_declarations": {},
2337
3529
  "positional_arg_declarations": [
2338
3530
  {
3531
+ "source_ref": null,
2339
3532
  "kind": "ClassicalParameterDeclaration",
2340
3533
  "name": "size",
2341
3534
  "classical_type": {
3535
+ "source_ref": null,
2342
3536
  "kind": "int"
2343
3537
  }
2344
3538
  },
2345
3539
  {
3540
+ "source_ref": null,
2346
3541
  "name": "q",
2347
3542
  "quantum_type": {
3543
+ "source_ref": null,
2348
3544
  "kind": "qvec",
2349
3545
  "length": null
2350
3546
  },
3547
+ "size": null,
2351
3548
  "kind": "PortDeclaration",
2352
3549
  "direction": "output"
2353
3550
  }
@@ -2361,16 +3558,20 @@ PREPARE_EXPONENTIAL_STATE = QuantumFunctionDeclaration.parse_raw(
2361
3558
  "name": "prepare_exponential_state",
2362
3559
  "param_decls": {
2363
3560
  "rate": {
3561
+ "source_ref": null,
2364
3562
  "kind": "int"
2365
3563
  }
2366
3564
  },
2367
3565
  "port_declarations": {
2368
3566
  "q": {
3567
+ "source_ref": null,
2369
3568
  "name": "q",
2370
3569
  "quantum_type": {
3570
+ "source_ref": null,
2371
3571
  "kind": "qvec",
2372
3572
  "length": null
2373
3573
  },
3574
+ "size": null,
2374
3575
  "kind": "PortDeclaration",
2375
3576
  "direction": "inout"
2376
3577
  }
@@ -2378,18 +3579,23 @@ PREPARE_EXPONENTIAL_STATE = QuantumFunctionDeclaration.parse_raw(
2378
3579
  "operand_declarations": {},
2379
3580
  "positional_arg_declarations": [
2380
3581
  {
3582
+ "source_ref": null,
2381
3583
  "kind": "ClassicalParameterDeclaration",
2382
3584
  "name": "rate",
2383
3585
  "classical_type": {
3586
+ "source_ref": null,
2384
3587
  "kind": "int"
2385
3588
  }
2386
3589
  },
2387
3590
  {
3591
+ "source_ref": null,
2388
3592
  "name": "q",
2389
3593
  "quantum_type": {
3594
+ "source_ref": null,
2390
3595
  "kind": "qvec",
2391
3596
  "length": null
2392
3597
  },
3598
+ "size": null,
2393
3599
  "kind": "PortDeclaration",
2394
3600
  "direction": "inout"
2395
3601
  }
@@ -2403,18 +3609,23 @@ PREPARE_BELL_STATE = QuantumFunctionDeclaration.parse_raw(
2403
3609
  "name": "prepare_bell_state",
2404
3610
  "param_decls": {
2405
3611
  "state_num": {
3612
+ "source_ref": null,
2406
3613
  "kind": "int"
2407
3614
  }
2408
3615
  },
2409
3616
  "port_declarations": {
2410
3617
  "q": {
3618
+ "source_ref": null,
2411
3619
  "name": "q",
2412
3620
  "quantum_type": {
3621
+ "source_ref": null,
2413
3622
  "kind": "qvec",
2414
3623
  "length": {
3624
+ "source_ref": null,
2415
3625
  "expr": "2"
2416
3626
  }
2417
3627
  },
3628
+ "size": null,
2418
3629
  "kind": "PortDeclaration",
2419
3630
  "direction": "output"
2420
3631
  }
@@ -2422,20 +3633,26 @@ PREPARE_BELL_STATE = QuantumFunctionDeclaration.parse_raw(
2422
3633
  "operand_declarations": {},
2423
3634
  "positional_arg_declarations": [
2424
3635
  {
3636
+ "source_ref": null,
2425
3637
  "kind": "ClassicalParameterDeclaration",
2426
3638
  "name": "state_num",
2427
3639
  "classical_type": {
3640
+ "source_ref": null,
2428
3641
  "kind": "int"
2429
3642
  }
2430
3643
  },
2431
3644
  {
3645
+ "source_ref": null,
2432
3646
  "name": "q",
2433
3647
  "quantum_type": {
3648
+ "source_ref": null,
2434
3649
  "kind": "qvec",
2435
3650
  "length": {
3651
+ "source_ref": null,
2436
3652
  "expr": "2"
2437
3653
  }
2438
3654
  },
3655
+ "size": null,
2439
3656
  "kind": "PortDeclaration",
2440
3657
  "direction": "output"
2441
3658
  }
@@ -2449,16 +3666,20 @@ INPLACE_PREPARE_INT = QuantumFunctionDeclaration.parse_raw(
2449
3666
  "name": "inplace_prepare_int",
2450
3667
  "param_decls": {
2451
3668
  "value": {
3669
+ "source_ref": null,
2452
3670
  "kind": "int"
2453
3671
  }
2454
3672
  },
2455
3673
  "port_declarations": {
2456
3674
  "target": {
3675
+ "source_ref": null,
2457
3676
  "name": "target",
2458
3677
  "quantum_type": {
3678
+ "source_ref": null,
2459
3679
  "kind": "qvec",
2460
3680
  "length": null
2461
3681
  },
3682
+ "size": null,
2462
3683
  "kind": "PortDeclaration",
2463
3684
  "direction": "inout"
2464
3685
  }
@@ -2466,18 +3687,23 @@ INPLACE_PREPARE_INT = QuantumFunctionDeclaration.parse_raw(
2466
3687
  "operand_declarations": {},
2467
3688
  "positional_arg_declarations": [
2468
3689
  {
3690
+ "source_ref": null,
2469
3691
  "kind": "ClassicalParameterDeclaration",
2470
3692
  "name": "value",
2471
3693
  "classical_type": {
3694
+ "source_ref": null,
2472
3695
  "kind": "int"
2473
3696
  }
2474
3697
  },
2475
3698
  {
3699
+ "source_ref": null,
2476
3700
  "name": "target",
2477
3701
  "quantum_type": {
3702
+ "source_ref": null,
2478
3703
  "kind": "qvec",
2479
3704
  "length": null
2480
3705
  },
3706
+ "size": null,
2481
3707
  "kind": "PortDeclaration",
2482
3708
  "direction": "inout"
2483
3709
  }
@@ -2491,15 +3717,22 @@ PREPARE_INT = QuantumFunctionDeclaration.parse_raw(
2491
3717
  "name": "prepare_int",
2492
3718
  "param_decls": {
2493
3719
  "value": {
3720
+ "source_ref": null,
2494
3721
  "kind": "int"
2495
3722
  }
2496
3723
  },
2497
3724
  "port_declarations": {
2498
3725
  "out": {
3726
+ "source_ref": null,
2499
3727
  "name": "out",
2500
3728
  "quantum_type": {
2501
- "kind": "qnum"
3729
+ "source_ref": null,
3730
+ "kind": "qnum",
3731
+ "size": null,
3732
+ "is_signed": null,
3733
+ "fraction_digits": null
2502
3734
  },
3735
+ "size": null,
2503
3736
  "kind": "PortDeclaration",
2504
3737
  "direction": "output"
2505
3738
  }
@@ -2507,17 +3740,25 @@ PREPARE_INT = QuantumFunctionDeclaration.parse_raw(
2507
3740
  "operand_declarations": {},
2508
3741
  "positional_arg_declarations": [
2509
3742
  {
3743
+ "source_ref": null,
2510
3744
  "kind": "ClassicalParameterDeclaration",
2511
3745
  "name": "value",
2512
3746
  "classical_type": {
3747
+ "source_ref": null,
2513
3748
  "kind": "int"
2514
3749
  }
2515
3750
  },
2516
3751
  {
3752
+ "source_ref": null,
2517
3753
  "name": "out",
2518
3754
  "quantum_type": {
2519
- "kind": "qnum"
3755
+ "source_ref": null,
3756
+ "kind": "qnum",
3757
+ "size": null,
3758
+ "is_signed": null,
3759
+ "fraction_digits": null
2520
3760
  },
3761
+ "size": null,
2521
3762
  "kind": "PortDeclaration",
2522
3763
  "direction": "output"
2523
3764
  }
@@ -2531,13 +3772,18 @@ SWITCH = QuantumFunctionDeclaration.parse_raw(
2531
3772
  "name": "switch",
2532
3773
  "param_decls": {
2533
3774
  "selector": {
3775
+ "source_ref": null,
2534
3776
  "kind": "int"
2535
3777
  }
2536
3778
  },
2537
3779
  "port_declarations": {},
2538
3780
  "operand_declarations": {
2539
3781
  "cases": {
3782
+ "source_ref": null,
2540
3783
  "name": "cases",
3784
+ "param_decls": {},
3785
+ "port_declarations": {},
3786
+ "operand_declarations": {},
2541
3787
  "positional_arg_declarations": [],
2542
3788
  "kind": "QuantumOperandDeclaration",
2543
3789
  "is_list": true
@@ -2545,14 +3791,20 @@ SWITCH = QuantumFunctionDeclaration.parse_raw(
2545
3791
  },
2546
3792
  "positional_arg_declarations": [
2547
3793
  {
3794
+ "source_ref": null,
2548
3795
  "kind": "ClassicalParameterDeclaration",
2549
3796
  "name": "selector",
2550
3797
  "classical_type": {
3798
+ "source_ref": null,
2551
3799
  "kind": "int"
2552
3800
  }
2553
3801
  },
2554
3802
  {
3803
+ "source_ref": null,
2555
3804
  "name": "cases",
3805
+ "param_decls": {},
3806
+ "port_declarations": {},
3807
+ "operand_declarations": {},
2556
3808
  "positional_arg_declarations": [],
2557
3809
  "kind": "QuantumOperandDeclaration",
2558
3810
  "is_list": true
@@ -2561,12 +3813,354 @@ SWITCH = QuantumFunctionDeclaration.parse_raw(
2561
3813
  }"""
2562
3814
  )
2563
3815
 
3816
+ _QCT_D_OPERATOR = QuantumFunctionDeclaration.parse_raw(
3817
+ """{
3818
+ "source_ref": null,
3819
+ "name": "_qct_d_operator",
3820
+ "param_decls": {},
3821
+ "port_declarations": {
3822
+ "x": {
3823
+ "source_ref": null,
3824
+ "name": "x",
3825
+ "quantum_type": {
3826
+ "source_ref": null,
3827
+ "kind": "qnum",
3828
+ "size": null,
3829
+ "is_signed": null,
3830
+ "fraction_digits": null
3831
+ },
3832
+ "size": null,
3833
+ "kind": "PortDeclaration",
3834
+ "direction": "inout"
3835
+ },
3836
+ "q": {
3837
+ "source_ref": null,
3838
+ "name": "q",
3839
+ "quantum_type": {
3840
+ "source_ref": null,
3841
+ "kind": "qbit"
3842
+ },
3843
+ "size": null,
3844
+ "kind": "PortDeclaration",
3845
+ "direction": "inout"
3846
+ }
3847
+ },
3848
+ "operand_declarations": {},
3849
+ "positional_arg_declarations": [
3850
+ {
3851
+ "source_ref": null,
3852
+ "name": "x",
3853
+ "quantum_type": {
3854
+ "source_ref": null,
3855
+ "kind": "qnum",
3856
+ "size": null,
3857
+ "is_signed": null,
3858
+ "fraction_digits": null
3859
+ },
3860
+ "size": null,
3861
+ "kind": "PortDeclaration",
3862
+ "direction": "inout"
3863
+ },
3864
+ {
3865
+ "source_ref": null,
3866
+ "name": "q",
3867
+ "quantum_type": {
3868
+ "source_ref": null,
3869
+ "kind": "qbit"
3870
+ },
3871
+ "size": null,
3872
+ "kind": "PortDeclaration",
3873
+ "direction": "inout"
3874
+ }
3875
+ ]
3876
+ }"""
3877
+ )
3878
+
3879
+ _QCT_PI_OPERATOR = QuantumFunctionDeclaration.parse_raw(
3880
+ """{
3881
+ "source_ref": null,
3882
+ "name": "_qct_pi_operator",
3883
+ "param_decls": {},
3884
+ "port_declarations": {
3885
+ "x": {
3886
+ "source_ref": null,
3887
+ "name": "x",
3888
+ "quantum_type": {
3889
+ "source_ref": null,
3890
+ "kind": "qvec",
3891
+ "length": null
3892
+ },
3893
+ "size": null,
3894
+ "kind": "PortDeclaration",
3895
+ "direction": "inout"
3896
+ },
3897
+ "q": {
3898
+ "source_ref": null,
3899
+ "name": "q",
3900
+ "quantum_type": {
3901
+ "source_ref": null,
3902
+ "kind": "qbit"
3903
+ },
3904
+ "size": null,
3905
+ "kind": "PortDeclaration",
3906
+ "direction": "inout"
3907
+ }
3908
+ },
3909
+ "operand_declarations": {},
3910
+ "positional_arg_declarations": [
3911
+ {
3912
+ "source_ref": null,
3913
+ "name": "x",
3914
+ "quantum_type": {
3915
+ "source_ref": null,
3916
+ "kind": "qvec",
3917
+ "length": null
3918
+ },
3919
+ "size": null,
3920
+ "kind": "PortDeclaration",
3921
+ "direction": "inout"
3922
+ },
3923
+ {
3924
+ "source_ref": null,
3925
+ "name": "q",
3926
+ "quantum_type": {
3927
+ "source_ref": null,
3928
+ "kind": "qbit"
3929
+ },
3930
+ "size": null,
3931
+ "kind": "PortDeclaration",
3932
+ "direction": "inout"
3933
+ }
3934
+ ]
3935
+ }"""
3936
+ )
3937
+
3938
+ QCT_QST_TYPE1 = QuantumFunctionDeclaration.parse_raw(
3939
+ """{
3940
+ "source_ref": null,
3941
+ "name": "qct_qst_type1",
3942
+ "param_decls": {},
3943
+ "port_declarations": {
3944
+ "x": {
3945
+ "source_ref": null,
3946
+ "name": "x",
3947
+ "quantum_type": {
3948
+ "source_ref": null,
3949
+ "kind": "qvec",
3950
+ "length": null
3951
+ },
3952
+ "size": null,
3953
+ "kind": "PortDeclaration",
3954
+ "direction": "inout"
3955
+ }
3956
+ },
3957
+ "operand_declarations": {},
3958
+ "positional_arg_declarations": [
3959
+ {
3960
+ "source_ref": null,
3961
+ "name": "x",
3962
+ "quantum_type": {
3963
+ "source_ref": null,
3964
+ "kind": "qvec",
3965
+ "length": null
3966
+ },
3967
+ "size": null,
3968
+ "kind": "PortDeclaration",
3969
+ "direction": "inout"
3970
+ }
3971
+ ]
3972
+ }"""
3973
+ )
3974
+
3975
+ QCT_QST_TYPE2 = QuantumFunctionDeclaration.parse_raw(
3976
+ """{
3977
+ "source_ref": null,
3978
+ "name": "qct_qst_type2",
3979
+ "param_decls": {},
3980
+ "port_declarations": {
3981
+ "x": {
3982
+ "source_ref": null,
3983
+ "name": "x",
3984
+ "quantum_type": {
3985
+ "source_ref": null,
3986
+ "kind": "qvec",
3987
+ "length": null
3988
+ },
3989
+ "size": null,
3990
+ "kind": "PortDeclaration",
3991
+ "direction": "inout"
3992
+ },
3993
+ "q": {
3994
+ "source_ref": null,
3995
+ "name": "q",
3996
+ "quantum_type": {
3997
+ "source_ref": null,
3998
+ "kind": "qbit"
3999
+ },
4000
+ "size": null,
4001
+ "kind": "PortDeclaration",
4002
+ "direction": "inout"
4003
+ }
4004
+ },
4005
+ "operand_declarations": {},
4006
+ "positional_arg_declarations": [
4007
+ {
4008
+ "source_ref": null,
4009
+ "name": "x",
4010
+ "quantum_type": {
4011
+ "source_ref": null,
4012
+ "kind": "qvec",
4013
+ "length": null
4014
+ },
4015
+ "size": null,
4016
+ "kind": "PortDeclaration",
4017
+ "direction": "inout"
4018
+ },
4019
+ {
4020
+ "source_ref": null,
4021
+ "name": "q",
4022
+ "quantum_type": {
4023
+ "source_ref": null,
4024
+ "kind": "qbit"
4025
+ },
4026
+ "size": null,
4027
+ "kind": "PortDeclaration",
4028
+ "direction": "inout"
4029
+ }
4030
+ ]
4031
+ }"""
4032
+ )
4033
+
4034
+ QCT_TYPE2 = QuantumFunctionDeclaration.parse_raw(
4035
+ """{
4036
+ "source_ref": null,
4037
+ "name": "qct_type2",
4038
+ "param_decls": {},
4039
+ "port_declarations": {
4040
+ "x": {
4041
+ "source_ref": null,
4042
+ "name": "x",
4043
+ "quantum_type": {
4044
+ "source_ref": null,
4045
+ "kind": "qvec",
4046
+ "length": null
4047
+ },
4048
+ "size": null,
4049
+ "kind": "PortDeclaration",
4050
+ "direction": "inout"
4051
+ }
4052
+ },
4053
+ "operand_declarations": {},
4054
+ "positional_arg_declarations": [
4055
+ {
4056
+ "source_ref": null,
4057
+ "name": "x",
4058
+ "quantum_type": {
4059
+ "source_ref": null,
4060
+ "kind": "qvec",
4061
+ "length": null
4062
+ },
4063
+ "size": null,
4064
+ "kind": "PortDeclaration",
4065
+ "direction": "inout"
4066
+ }
4067
+ ]
4068
+ }"""
4069
+ )
4070
+
4071
+ QST_TYPE2 = QuantumFunctionDeclaration.parse_raw(
4072
+ """{
4073
+ "source_ref": null,
4074
+ "name": "qst_type2",
4075
+ "param_decls": {},
4076
+ "port_declarations": {
4077
+ "x": {
4078
+ "source_ref": null,
4079
+ "name": "x",
4080
+ "quantum_type": {
4081
+ "source_ref": null,
4082
+ "kind": "qvec",
4083
+ "length": null
4084
+ },
4085
+ "size": null,
4086
+ "kind": "PortDeclaration",
4087
+ "direction": "inout"
4088
+ }
4089
+ },
4090
+ "operand_declarations": {},
4091
+ "positional_arg_declarations": [
4092
+ {
4093
+ "source_ref": null,
4094
+ "name": "x",
4095
+ "quantum_type": {
4096
+ "source_ref": null,
4097
+ "kind": "qvec",
4098
+ "length": null
4099
+ },
4100
+ "size": null,
4101
+ "kind": "PortDeclaration",
4102
+ "direction": "inout"
4103
+ }
4104
+ ]
4105
+ }"""
4106
+ )
4107
+
4108
+ MODULAR_INCREMENT = QuantumFunctionDeclaration.parse_raw(
4109
+ """{
4110
+ "source_ref": null,
4111
+ "name": "modular_increment",
4112
+ "param_decls": {
4113
+ "a": {
4114
+ "source_ref": null,
4115
+ "kind": "int"
4116
+ }
4117
+ },
4118
+ "port_declarations": {
4119
+ "x": {
4120
+ "source_ref": null,
4121
+ "name": "x",
4122
+ "quantum_type": {
4123
+ "source_ref": null,
4124
+ "kind": "qvec",
4125
+ "length": null
4126
+ },
4127
+ "size": null,
4128
+ "kind": "PortDeclaration",
4129
+ "direction": "inout"
4130
+ }
4131
+ },
4132
+ "operand_declarations": {},
4133
+ "positional_arg_declarations": [
4134
+ {
4135
+ "source_ref": null,
4136
+ "kind": "ClassicalParameterDeclaration",
4137
+ "name": "a",
4138
+ "classical_type": {
4139
+ "source_ref": null,
4140
+ "kind": "int"
4141
+ }
4142
+ },
4143
+ {
4144
+ "source_ref": null,
4145
+ "name": "x",
4146
+ "quantum_type": {
4147
+ "source_ref": null,
4148
+ "kind": "qvec",
4149
+ "length": null
4150
+ },
4151
+ "size": null,
4152
+ "kind": "PortDeclaration",
4153
+ "direction": "inout"
4154
+ }
4155
+ ]
4156
+ }"""
4157
+ )
4158
+
2564
4159
  OPEN_LIB_DECLS = [
2565
4160
  func for func in vars().values() if isinstance(func, QuantumFunctionDeclaration)
2566
4161
  ]
2567
4162
 
2568
4163
  __all__ = [
2569
- "QFT_STEP",
2570
4164
  "QFT",
2571
4165
  "QPE_FLEXIBLE",
2572
4166
  "QPE",
@@ -2607,5 +4201,12 @@ __all__ = [
2607
4201
  "INPLACE_PREPARE_INT",
2608
4202
  "PREPARE_INT",
2609
4203
  "SWITCH",
4204
+ "_QCT_D_OPERATOR",
4205
+ "_QCT_PI_OPERATOR",
4206
+ "QCT_QST_TYPE1",
4207
+ "QCT_QST_TYPE2",
4208
+ "QCT_TYPE2",
4209
+ "QST_TYPE2",
4210
+ "MODULAR_INCREMENT",
2610
4211
  "OPEN_LIB_DECLS",
2611
4212
  ]