microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
579fb3b830d056df6afed7eede31204e61589ff9

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

source/npm/qsharp/test/circuits-cases/functors.qs.snapshot.html

878lines · modecode

1<!doctype html>
2<html
3 xmlns="http://www.w3.org/1999/xhtml"
4 style="--minToolboxHeight: 150px; --minGateWidth: 40px; --gateHeight: 40px"
5>
6 <head>
7 <link rel="stylesheet" href="../../ux/qsharp-ux.css" />
8 <link rel="stylesheet" href="../../ux/qsharp-circuit.css" />
9 </head>
10 <body>
11 <div><h2>circuit-static-collapsed</h2></div>
12 <div id="circuit-static-collapsed" class="qs-circuit">
13 <svg
14 xmlns="http://www.w3.org/2000/svg"
15 class="qviz"
16 width="320"
17 height="204"
18 viewBox="0 0 320 204"
19 >
20 <g class="qubit-input-states">
21 <text
22 font-size="16"
23 x="20"
24 y="92"
25 text-anchor="start"
26 dominant-baseline="middle"
27 data-wire="0"
28 class="qs-maintext qs-qubit-label"
29 >
30 |
31 <tspan class="qs-mathtext">ψ</tspan>
32 <tspan baseline-shift="sub" font-size="65%">0</tspan>
33
34 </text>
35 </g>
36 <g class="wires">
37 <line x1="40" x2="320" y1="92" y2="92" class="qubit-wire" />
38 <g>
39 <line
40 x1="221"
41 x2="221"
42 y1="92"
43 y2="143"
44 class="register-classical"
45 />
46 <line
47 x1="219"
48 x2="219"
49 y1="92"
50 y2="145"
51 class="register-classical"
52 />
53 <line
54 x1="221"
55 x2="320"
56 y1="143"
57 y2="143"
58 class="register-classical"
59 />
60 <line
61 x1="219"
62 x2="320"
63 y1="145"
64 y2="145"
65 class="register-classical"
66 />
67 </g>
68 </g>
69 <g>
70 <g class="gate" data-location="0,0" data-expanded="true">
71 <rect
72 class="gate-unitary"
73 x="80"
74 y="46"
75 width="222"
76 height="128"
77 fill-opacity="0"
78 stroke-dasharray="8, 8"
79 />
80 <g>
81 <g class="gate" data-location="0,0-0,0">
82 <a href="#" class="qs-circuit-source-link">
83 <title>functors.qs:3:5 Foo(q);</title>
84 <g>
85 <g>
86 <rect
87 class="gate-unitary"
88 x="90"
89 y="72"
90 width="41"
91 height="40"
92 data-wire-ys="[92]"
93 data-width="41"
94 />
95 <text font-size="14" x="110.5" y="92" class="qs-maintext">
96 <tspan class="qs-mathtext">Foo</tspan>
97 </text>
98 </g>
99 </g>
100 </a>
101 <g class="gate-control gate-expand">
102 <circle cx="92" cy="74" r="10" />
103 <path d="M92,67 v14 M85,74 h14" />
104 </g>
105 </g>
106 <g class="gate" data-location="0,0-1,0">
107 <a href="#" class="qs-circuit-source-link">
108 <title>functors.qs:4:5 Adjoint Foo(q);</title>
109 <g>
110 <g>
111 <rect
112 class="gate-unitary"
113 x="143"
114 y="72"
115 width="45"
116 height="40"
117 data-wire-ys="[92]"
118 data-width="45"
119 />
120 <text font-size="14" x="165.5" y="92" class="qs-maintext">
121 <tspan class="qs-mathtext">Foo</tspan>
122 <tspan dx="2" dy="-3" style="font-size: 0.8em">†</tspan>
123 </text>
124 </g>
125 </g>
126 </a>
127 <g class="gate-control gate-expand">
128 <circle cx="145" cy="74" r="10" />
129 <path d="M145,67 v14 M138,74 h14" />
130 </g>
131 </g>
132 <g class="gate" data-location="0,0-2,0">
133 <a href="#" class="qs-circuit-source-link">
134 <title>functors.qs:5:6 [MResetZ(q)]</title>
135 <g>
136 <rect
137 class="gate-measure"
138 x="200"
139 y="72"
140 width="40"
141 height="40"
142 data-wire-ys="[92]"
143 data-width="40"
144 />
145 <path
146 class="arc-measure"
147 d="M 235 94 A 15 12 0 0 0 205 94"
148 style="pointer-events: none"
149 />
150 <line
151 x1="220"
152 x2="232"
153 y1="100"
154 y2="80"
155 class="qs-line-measure"
156 style="pointer-events: none"
157 />
158 </g>
159 </a>
160 </g>
161 <g class="gate" data-location="0,0-3,0">
162 <a href="#" class="qs-circuit-source-link">
163 <title>functors.qs:5:6 [MResetZ(q)]</title>
164 <g>
165 <g>
166 <rect
167 class="gate-ket"
168 x="252"
169 y="72"
170 width="40"
171 height="40"
172 data-wire-ys="[92]"
173 data-width="40"
174 />
175 <text
176 font-size="14"
177 x="272"
178 y="92"
179 class="qs-maintext ket-text"
180 >
181 |0⟩
182 </text>
183 </g>
184 </g>
185 </a>
186 </g>
187 </g>
188 <text
189 font-size="14"
190 x="90"
191 y="61"
192 class="qs-maintext qs-group-label"
193 >
194 <tspan class="qs-mathtext">Main</tspan>
195 </text>
196 <g class="gate-control gate-collapse">
197 <circle cx="82" cy="48" r="10" />
198 <path d="M75,48 h14" />
199 </g>
200 </g>
201 </g>
202 </svg>
203 </div>
204 <div><h2>circuit-static-expanded</h2></div>
205 <div id="circuit-static-expanded" class="qs-circuit">
206 <svg
207 xmlns="http://www.w3.org/2000/svg"
208 class="qviz"
209 width="354"
210 height="240"
211 viewBox="0 0 354 240"
212 >
213 <g class="qubit-input-states">
214 <text
215 font-size="16"
216 x="20"
217 y="118"
218 text-anchor="start"
219 dominant-baseline="middle"
220 data-wire="0"
221 class="qs-maintext qs-qubit-label"
222 >
223 |
224 <tspan class="qs-mathtext">ψ</tspan>
225 <tspan baseline-shift="sub" font-size="65%">0</tspan>
226
227 </text>
228 </g>
229 <g class="wires">
230 <line x1="40" x2="354" y1="118" y2="118" class="qubit-wire" />
231 <g>
232 <line
233 x1="255"
234 x2="255"
235 y1="118"
236 y2="169"
237 class="register-classical"
238 />
239 <line
240 x1="253"
241 x2="253"
242 y1="118"
243 y2="171"
244 class="register-classical"
245 />
246 <line
247 x1="255"
248 x2="354"
249 y1="169"
250 y2="169"
251 class="register-classical"
252 />
253 <line
254 x1="253"
255 x2="354"
256 y1="171"
257 y2="171"
258 class="register-classical"
259 />
260 </g>
261 </g>
262 <g>
263 <g class="gate" data-location="0,0" data-expanded="true">
264 <rect
265 class="gate-unitary"
266 x="80"
267 y="46"
268 width="256"
269 height="154"
270 fill-opacity="0"
271 stroke-dasharray="8, 8"
272 />
273 <g>
274 <g class="gate" data-location="0,0-0,0" data-expanded="true">
275 <rect
276 class="gate-unitary"
277 x="90"
278 y="72"
279 width="60"
280 height="76"
281 fill-opacity="0"
282 stroke-dasharray="8, 8"
283 />
284 <g>
285 <g class="gate" data-location="0,0-0,0-0,0">
286 <a href="#" class="qs-circuit-source-link">
287 <title>functors.qs:11:9 X(q);</title>
288 <g class="oplus" data-wire-ys="[118]" data-width="30">
289 <circle cx="120" cy="118" r="15" />
290 <line x1="120" x2="120" y1="103" y2="133" />
291 <line x1="105" x2="135" y1="118" y2="118" />
292 </g>
293 </a>
294 </g>
295 </g>
296 <a href="#" class="qs-circuit-source-link">
297 <title>functors.qs:3:5 Foo(q);</title>
298 <text
299 font-size="14"
300 x="100"
301 y="87"
302 class="qs-maintext qs-group-label"
303 style="pointer-events: all"
304 >
305 <tspan class="qs-mathtext">Foo</tspan>
306 </text>
307 </a>
308 <g class="gate-control gate-collapse">
309 <circle cx="92" cy="74" r="10" />
310 <path d="M85,74 h14" />
311 </g>
312 </g>
313 <g class="gate" data-location="0,0-1,0" data-expanded="true">
314 <rect
315 class="gate-unitary"
316 x="162"
317 y="72"
318 width="60"
319 height="76"
320 fill-opacity="0"
321 stroke-dasharray="8, 8"
322 />
323 <g>
324 <g class="gate" data-location="0,0-1,0-0,0">
325 <a href="#" class="qs-circuit-source-link">
326 <title>functors.qs:15:9 Y(q);</title>
327 <g>
328 <g>
329 <rect
330 class="gate-unitary"
331 x="172"
332 y="98"
333 width="40"
334 height="40"
335 data-wire-ys="[118]"
336 data-width="40"
337 />
338 <text
339 font-size="14"
340 x="192"
341 y="118"
342 class="qs-maintext"
343 >
344 <tspan class="qs-mathtext">Y</tspan>
345 </text>
346 </g>
347 </g>
348 </a>
349 </g>
350 </g>
351 <a href="#" class="qs-circuit-source-link">
352 <title>functors.qs:4:5 Adjoint Foo(q);</title>
353 <text
354 font-size="14"
355 x="172"
356 y="87"
357 class="qs-maintext qs-group-label"
358 style="pointer-events: all"
359 >
360 <tspan class="qs-mathtext">Foo</tspan>
361 <tspan dx="2" dy="-3" style="font-size: 0.8em">†</tspan>
362 </text>
363 </a>
364 <g class="gate-control gate-collapse">
365 <circle cx="164" cy="74" r="10" />
366 <path d="M157,74 h14" />
367 </g>
368 </g>
369 <g class="gate" data-location="0,0-2,0">
370 <a href="#" class="qs-circuit-source-link">
371 <title>functors.qs:5:6 [MResetZ(q)]</title>
372 <g>
373 <rect
374 class="gate-measure"
375 x="234"
376 y="98"
377 width="40"
378 height="40"
379 data-wire-ys="[118]"
380 data-width="40"
381 />
382 <path
383 class="arc-measure"
384 d="M 269 120 A 15 12 0 0 0 239 120"
385 style="pointer-events: none"
386 />
387 <line
388 x1="254"
389 x2="266"
390 y1="126"
391 y2="106"
392 class="qs-line-measure"
393 style="pointer-events: none"
394 />
395 </g>
396 </a>
397 </g>
398 <g class="gate" data-location="0,0-3,0">
399 <a href="#" class="qs-circuit-source-link">
400 <title>functors.qs:5:6 [MResetZ(q)]</title>
401 <g>
402 <g>
403 <rect
404 class="gate-ket"
405 x="286"
406 y="98"
407 width="40"
408 height="40"
409 data-wire-ys="[118]"
410 data-width="40"
411 />
412 <text
413 font-size="14"
414 x="306"
415 y="118"
416 class="qs-maintext ket-text"
417 >
418 |0⟩
419 </text>
420 </g>
421 </g>
422 </a>
423 </g>
424 </g>
425 <text
426 font-size="14"
427 x="90"
428 y="61"
429 class="qs-maintext qs-group-label"
430 >
431 <tspan class="qs-mathtext">Main</tspan>
432 </text>
433 <g class="gate-control gate-collapse">
434 <circle cx="82" cy="48" r="10" />
435 <path d="M75,48 h14" />
436 </g>
437 </g>
438 </g>
439 </svg>
440 </div>
441 <div><h2>circuit-eval-collapsed</h2></div>
442 <div id="circuit-eval-collapsed" class="qs-circuit">
443 <svg
444 xmlns="http://www.w3.org/2000/svg"
445 class="qviz"
446 width="320"
447 height="204"
448 viewBox="0 0 320 204"
449 >
450 <g class="qubit-input-states">
451 <a href="#" class="qs-circuit-source-link">
452 <title>functors.qs:2:5 use q = Qubit();</title>
453 <text
454 font-size="16"
455 x="20"
456 y="92"
457 text-anchor="start"
458 dominant-baseline="middle"
459 data-wire="0"
460 class="qs-maintext qs-qubit-label"
461 >
462 |
463 <tspan class="qs-mathtext">ψ</tspan>
464 <tspan baseline-shift="sub" font-size="65%">0</tspan>
465
466 </text>
467 </a>
468 </g>
469 <g class="wires">
470 <line x1="40" x2="320" y1="92" y2="92" class="qubit-wire" />
471 <g>
472 <line
473 x1="221"
474 x2="221"
475 y1="92"
476 y2="143"
477 class="register-classical"
478 />
479 <line
480 x1="219"
481 x2="219"
482 y1="92"
483 y2="145"
484 class="register-classical"
485 />
486 <line
487 x1="221"
488 x2="320"
489 y1="143"
490 y2="143"
491 class="register-classical"
492 />
493 <line
494 x1="219"
495 x2="320"
496 y1="145"
497 y2="145"
498 class="register-classical"
499 />
500 </g>
501 </g>
502 <g>
503 <g class="gate" data-location="0,0" data-expanded="true">
504 <rect
505 class="gate-unitary"
506 x="80"
507 y="46"
508 width="222"
509 height="128"
510 fill-opacity="0"
511 stroke-dasharray="8, 8"
512 />
513 <g>
514 <g class="gate" data-location="0,0-0,0">
515 <a href="#" class="qs-circuit-source-link">
516 <title>functors.qs:3:5 Foo(q);</title>
517 <g>
518 <g>
519 <rect
520 class="gate-unitary"
521 x="90"
522 y="72"
523 width="41"
524 height="40"
525 data-wire-ys="[92]"
526 data-width="41"
527 />
528 <text font-size="14" x="110.5" y="92" class="qs-maintext">
529 <tspan class="qs-mathtext">Foo</tspan>
530 </text>
531 </g>
532 </g>
533 </a>
534 <g class="gate-control gate-expand">
535 <circle cx="92" cy="74" r="10" />
536 <path d="M92,67 v14 M85,74 h14" />
537 </g>
538 </g>
539 <g class="gate" data-location="0,0-1,0">
540 <a href="#" class="qs-circuit-source-link">
541 <title>functors.qs:4:5 Adjoint Foo(q);</title>
542 <g>
543 <g>
544 <rect
545 class="gate-unitary"
546 x="143"
547 y="72"
548 width="45"
549 height="40"
550 data-wire-ys="[92]"
551 data-width="45"
552 />
553 <text font-size="14" x="165.5" y="92" class="qs-maintext">
554 <tspan class="qs-mathtext">Foo</tspan>
555 <tspan dx="2" dy="-3" style="font-size: 0.8em">†</tspan>
556 </text>
557 </g>
558 </g>
559 </a>
560 <g class="gate-control gate-expand">
561 <circle cx="145" cy="74" r="10" />
562 <path d="M145,67 v14 M138,74 h14" />
563 </g>
564 </g>
565 <g class="gate" data-location="0,0-2,0">
566 <a href="#" class="qs-circuit-source-link">
567 <title>functors.qs:5:6 [MResetZ(q)]</title>
568 <g>
569 <rect
570 class="gate-measure"
571 x="200"
572 y="72"
573 width="40"
574 height="40"
575 data-wire-ys="[92]"
576 data-width="40"
577 />
578 <path
579 class="arc-measure"
580 d="M 235 94 A 15 12 0 0 0 205 94"
581 style="pointer-events: none"
582 />
583 <line
584 x1="220"
585 x2="232"
586 y1="100"
587 y2="80"
588 class="qs-line-measure"
589 style="pointer-events: none"
590 />
591 </g>
592 </a>
593 </g>
594 <g class="gate" data-location="0,0-3,0">
595 <a href="#" class="qs-circuit-source-link">
596 <title>functors.qs:5:6 [MResetZ(q)]</title>
597 <g>
598 <g>
599 <rect
600 class="gate-ket"
601 x="252"
602 y="72"
603 width="40"
604 height="40"
605 data-wire-ys="[92]"
606 data-width="40"
607 />
608 <text
609 font-size="14"
610 x="272"
611 y="92"
612 class="qs-maintext ket-text"
613 >
614 |0⟩
615 </text>
616 </g>
617 </g>
618 </a>
619 </g>
620 </g>
621 <text
622 font-size="14"
623 x="90"
624 y="61"
625 class="qs-maintext qs-group-label"
626 >
627 <tspan class="qs-mathtext">Main</tspan>
628 </text>
629 <g class="gate-control gate-collapse">
630 <circle cx="82" cy="48" r="10" />
631 <path d="M75,48 h14" />
632 </g>
633 </g>
634 </g>
635 </svg>
636 </div>
637 <div><h2>circuit-eval-expanded</h2></div>
638 <div id="circuit-eval-expanded" class="qs-circuit">
639 <svg
640 xmlns="http://www.w3.org/2000/svg"
641 class="qviz"
642 width="354"
643 height="240"
644 viewBox="0 0 354 240"
645 >
646 <g class="qubit-input-states">
647 <a href="#" class="qs-circuit-source-link">
648 <title>functors.qs:2:5 use q = Qubit();</title>
649 <text
650 font-size="16"
651 x="20"
652 y="118"
653 text-anchor="start"
654 dominant-baseline="middle"
655 data-wire="0"
656 class="qs-maintext qs-qubit-label"
657 >
658 |
659 <tspan class="qs-mathtext">ψ</tspan>
660 <tspan baseline-shift="sub" font-size="65%">0</tspan>
661
662 </text>
663 </a>
664 </g>
665 <g class="wires">
666 <line x1="40" x2="354" y1="118" y2="118" class="qubit-wire" />
667 <g>
668 <line
669 x1="255"
670 x2="255"
671 y1="118"
672 y2="169"
673 class="register-classical"
674 />
675 <line
676 x1="253"
677 x2="253"
678 y1="118"
679 y2="171"
680 class="register-classical"
681 />
682 <line
683 x1="255"
684 x2="354"
685 y1="169"
686 y2="169"
687 class="register-classical"
688 />
689 <line
690 x1="253"
691 x2="354"
692 y1="171"
693 y2="171"
694 class="register-classical"
695 />
696 </g>
697 </g>
698 <g>
699 <g class="gate" data-location="0,0" data-expanded="true">
700 <rect
701 class="gate-unitary"
702 x="80"
703 y="46"
704 width="256"
705 height="154"
706 fill-opacity="0"
707 stroke-dasharray="8, 8"
708 />
709 <g>
710 <g class="gate" data-location="0,0-0,0" data-expanded="true">
711 <rect
712 class="gate-unitary"
713 x="90"
714 y="72"
715 width="60"
716 height="76"
717 fill-opacity="0"
718 stroke-dasharray="8, 8"
719 />
720 <g>
721 <g class="gate" data-location="0,0-0,0-0,0">
722 <a href="#" class="qs-circuit-source-link">
723 <title>functors.qs:11:9 X(q);</title>
724 <g class="oplus" data-wire-ys="[118]" data-width="30">
725 <circle cx="120" cy="118" r="15" />
726 <line x1="120" x2="120" y1="103" y2="133" />
727 <line x1="105" x2="135" y1="118" y2="118" />
728 </g>
729 </a>
730 </g>
731 </g>
732 <a href="#" class="qs-circuit-source-link">
733 <title>functors.qs:3:5 Foo(q);</title>
734 <text
735 font-size="14"
736 x="100"
737 y="87"
738 class="qs-maintext qs-group-label"
739 style="pointer-events: all"
740 >
741 <tspan class="qs-mathtext">Foo</tspan>
742 </text>
743 </a>
744 <g class="gate-control gate-collapse">
745 <circle cx="92" cy="74" r="10" />
746 <path d="M85,74 h14" />
747 </g>
748 </g>
749 <g class="gate" data-location="0,0-1,0" data-expanded="true">
750 <rect
751 class="gate-unitary"
752 x="162"
753 y="72"
754 width="60"
755 height="76"
756 fill-opacity="0"
757 stroke-dasharray="8, 8"
758 />
759 <g>
760 <g class="gate" data-location="0,0-1,0-0,0">
761 <a href="#" class="qs-circuit-source-link">
762 <title>functors.qs:15:9 Y(q);</title>
763 <g>
764 <g>
765 <rect
766 class="gate-unitary"
767 x="172"
768 y="98"
769 width="40"
770 height="40"
771 data-wire-ys="[118]"
772 data-width="40"
773 />
774 <text
775 font-size="14"
776 x="192"
777 y="118"
778 class="qs-maintext"
779 >
780 <tspan class="qs-mathtext">Y</tspan>
781 </text>
782 </g>
783 </g>
784 </a>
785 </g>
786 </g>
787 <a href="#" class="qs-circuit-source-link">
788 <title>functors.qs:4:5 Adjoint Foo(q);</title>
789 <text
790 font-size="14"
791 x="172"
792 y="87"
793 class="qs-maintext qs-group-label"
794 style="pointer-events: all"
795 >
796 <tspan class="qs-mathtext">Foo</tspan>
797 <tspan dx="2" dy="-3" style="font-size: 0.8em">†</tspan>
798 </text>
799 </a>
800 <g class="gate-control gate-collapse">
801 <circle cx="164" cy="74" r="10" />
802 <path d="M157,74 h14" />
803 </g>
804 </g>
805 <g class="gate" data-location="0,0-2,0">
806 <a href="#" class="qs-circuit-source-link">
807 <title>functors.qs:5:6 [MResetZ(q)]</title>
808 <g>
809 <rect
810 class="gate-measure"
811 x="234"
812 y="98"
813 width="40"
814 height="40"
815 data-wire-ys="[118]"
816 data-width="40"
817 />
818 <path
819 class="arc-measure"
820 d="M 269 120 A 15 12 0 0 0 239 120"
821 style="pointer-events: none"
822 />
823 <line
824 x1="254"
825 x2="266"
826 y1="126"
827 y2="106"
828 class="qs-line-measure"
829 style="pointer-events: none"
830 />
831 </g>
832 </a>
833 </g>
834 <g class="gate" data-location="0,0-3,0">
835 <a href="#" class="qs-circuit-source-link">
836 <title>functors.qs:5:6 [MResetZ(q)]</title>
837 <g>
838 <g>
839 <rect
840 class="gate-ket"
841 x="286"
842 y="98"
843 width="40"
844 height="40"
845 data-wire-ys="[118]"
846 data-width="40"
847 />
848 <text
849 font-size="14"
850 x="306"
851 y="118"
852 class="qs-maintext ket-text"
853 >
854 |0⟩
855 </text>
856 </g>
857 </g>
858 </a>
859 </g>
860 </g>
861 <text
862 font-size="14"
863 x="90"
864 y="61"
865 class="qs-maintext qs-group-label"
866 >
867 <tspan class="qs-mathtext">Main</tspan>
868 </text>
869 <g class="gate-control gate-collapse">
870 <circle cx="82" cy="48" r="10" />
871 <path d="M75,48 h14" />
872 </g>
873 </g>
874 </g>
875 </svg>
876 </div>
877 </body>
878</html>
879