microsoft/qdk
Publicmirrored from https://github.com/microsoft/qdkAvailable
source/npm/qsharp/test/circuits-cases/bell-pair.qs.snapshot.html
690lines · 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-eval-collapsed</h2></div> |
| 12 | <div id="circuit-eval-collapsed" class="qs-circuit"> |
| 13 | <svg |
| 14 | xmlns="http://www.w3.org/2000/svg" |
| 15 | class="qviz" |
| 16 | width="341" |
| 17 | height="240" |
| 18 | style="max-width: fit-content" |
| 19 | viewBox="0 0 341 240" |
| 20 | > |
| 21 | <g class="qubit-input-states"> |
| 22 | <a href="#" class="qs-circuit-source-link"> |
| 23 | <title>bell-pair.qs:2:21 use (q1, q2) = (Qubit(), Qubit());</title> |
| 24 | <text |
| 25 | font-size="16" |
| 26 | x="20" |
| 27 | y="92" |
| 28 | text-anchor="start" |
| 29 | dominant-baseline="middle" |
| 30 | data-wire="0" |
| 31 | class="qs-maintext qs-qubit-label" |
| 32 | > |
| 33 | | |
| 34 | <tspan class="qs-mathtext">ψ</tspan> |
| 35 | <tspan baseline-shift="sub" font-size="65%">0</tspan> |
| 36 | ⟩ |
| 37 | </text> |
| 38 | </a> |
| 39 | <a href="#" class="qs-circuit-source-link"> |
| 40 | <title>bell-pair.qs:2:30 use (q1, q2) = (Qubit(), Qubit());</title> |
| 41 | <text |
| 42 | font-size="16" |
| 43 | x="20" |
| 44 | y="164" |
| 45 | text-anchor="start" |
| 46 | dominant-baseline="middle" |
| 47 | data-wire="1" |
| 48 | class="qs-maintext qs-qubit-label" |
| 49 | > |
| 50 | | |
| 51 | <tspan class="qs-mathtext">ψ</tspan> |
| 52 | <tspan baseline-shift="sub" font-size="65%">1</tspan> |
| 53 | ⟩ |
| 54 | </text> |
| 55 | </a> |
| 56 | </g> |
| 57 | <g class="wires"> |
| 58 | <line x1="40" x2="341" y1="92" y2="92" class="qubit-wire" /> |
| 59 | <line x1="40" x2="341" y1="164" y2="164" class="qubit-wire" /> |
| 60 | <g> |
| 61 | <line |
| 62 | x1="242" |
| 63 | x2="242" |
| 64 | y1="92" |
| 65 | y2="131" |
| 66 | class="register-classical" |
| 67 | /> |
| 68 | <line |
| 69 | x1="240" |
| 70 | x2="240" |
| 71 | y1="92" |
| 72 | y2="133" |
| 73 | class="register-classical" |
| 74 | /> |
| 75 | <line |
| 76 | x1="242" |
| 77 | x2="341" |
| 78 | y1="131" |
| 79 | y2="131" |
| 80 | class="register-classical" |
| 81 | /> |
| 82 | <line |
| 83 | x1="240" |
| 84 | x2="341" |
| 85 | y1="133" |
| 86 | y2="133" |
| 87 | class="register-classical" |
| 88 | /> |
| 89 | </g> |
| 90 | <g> |
| 91 | <line |
| 92 | x1="242" |
| 93 | x2="242" |
| 94 | y1="164" |
| 95 | y2="203" |
| 96 | class="register-classical" |
| 97 | /> |
| 98 | <line |
| 99 | x1="240" |
| 100 | x2="240" |
| 101 | y1="164" |
| 102 | y2="205" |
| 103 | class="register-classical" |
| 104 | /> |
| 105 | <line |
| 106 | x1="242" |
| 107 | x2="341" |
| 108 | y1="203" |
| 109 | y2="203" |
| 110 | class="register-classical" |
| 111 | /> |
| 112 | <line |
| 113 | x1="240" |
| 114 | x2="341" |
| 115 | y1="205" |
| 116 | y2="205" |
| 117 | class="register-classical" |
| 118 | /> |
| 119 | </g> |
| 120 | </g> |
| 121 | <g> |
| 122 | <g |
| 123 | class="gate" |
| 124 | data-expanded="true" |
| 125 | data-location="0,0" |
| 126 | data-zoom-out="false" |
| 127 | data-zoom-in="true" |
| 128 | > |
| 129 | <rect |
| 130 | class="gate-unitary" |
| 131 | x="80" |
| 132 | y="46" |
| 133 | width="243" |
| 134 | height="188" |
| 135 | fill-opacity="0" |
| 136 | stroke-dasharray="8, 8" |
| 137 | /> |
| 138 | <g> |
| 139 | <g |
| 140 | class="gate" |
| 141 | data-location="0,0-0,0" |
| 142 | data-zoom-out="true" |
| 143 | data-zoom-in="true" |
| 144 | > |
| 145 | <a href="#" class="qs-circuit-source-link"> |
| 146 | <title>bell-pair.qs:3:5 PrepareBellPair(q1, q2);</title> |
| 147 | <g> |
| 148 | <g> |
| 149 | <rect |
| 150 | class="gate-unitary" |
| 151 | x="90" |
| 152 | y="72" |
| 153 | width="119" |
| 154 | height="112" |
| 155 | data-wire-ys="[92,164]" |
| 156 | data-width="119" |
| 157 | /> |
| 158 | <text |
| 159 | font-size="14" |
| 160 | x="149.5" |
| 161 | y="128" |
| 162 | class="qs-maintext" |
| 163 | > |
| 164 | <tspan class="qs-mathtext">PrepareBellPair</tspan> |
| 165 | </text> |
| 166 | </g> |
| 167 | </g> |
| 168 | </a> |
| 169 | <g class="gate-control gate-expand"> |
| 170 | <circle cx="92" cy="74" r="10" /> |
| 171 | <path d="M92,67 v14 M85,74 h14" /> |
| 172 | </g> |
| 173 | </g> |
| 174 | <g |
| 175 | class="gate" |
| 176 | data-location="0,0-1,0" |
| 177 | data-zoom-out="true" |
| 178 | data-zoom-in="false" |
| 179 | > |
| 180 | <a href="#" class="qs-circuit-source-link"> |
| 181 | <title>bell-pair.qs:4:6 (MResetZ(q1), MResetZ(q2))</title> |
| 182 | <g> |
| 183 | <rect |
| 184 | class="gate-measure" |
| 185 | x="221" |
| 186 | y="72" |
| 187 | width="40" |
| 188 | height="40" |
| 189 | data-wire-ys="[92]" |
| 190 | data-width="40" |
| 191 | /> |
| 192 | <path |
| 193 | class="arc-measure" |
| 194 | d="M 256 94 A 15 12 0 0 0 226 94" |
| 195 | style="pointer-events: none" |
| 196 | /> |
| 197 | <line |
| 198 | x1="241" |
| 199 | x2="253" |
| 200 | y1="100" |
| 201 | y2="80" |
| 202 | class="qs-line-measure" |
| 203 | style="pointer-events: none" |
| 204 | /> |
| 205 | </g> |
| 206 | </a> |
| 207 | </g> |
| 208 | <g |
| 209 | class="gate" |
| 210 | data-location="0,0-1,1" |
| 211 | data-zoom-out="true" |
| 212 | data-zoom-in="false" |
| 213 | > |
| 214 | <a href="#" class="qs-circuit-source-link"> |
| 215 | <title>bell-pair.qs:4:19 (MResetZ(q1), MResetZ(q2))</title> |
| 216 | <g> |
| 217 | <rect |
| 218 | class="gate-measure" |
| 219 | x="221" |
| 220 | y="144" |
| 221 | width="40" |
| 222 | height="40" |
| 223 | data-wire-ys="[164]" |
| 224 | data-width="40" |
| 225 | /> |
| 226 | <path |
| 227 | class="arc-measure" |
| 228 | d="M 256 166 A 15 12 0 0 0 226 166" |
| 229 | style="pointer-events: none" |
| 230 | /> |
| 231 | <line |
| 232 | x1="241" |
| 233 | x2="253" |
| 234 | y1="172" |
| 235 | y2="152" |
| 236 | class="qs-line-measure" |
| 237 | style="pointer-events: none" |
| 238 | /> |
| 239 | </g> |
| 240 | </a> |
| 241 | </g> |
| 242 | <g |
| 243 | class="gate" |
| 244 | data-location="0,0-2,0" |
| 245 | data-zoom-out="true" |
| 246 | data-zoom-in="false" |
| 247 | > |
| 248 | <a href="#" class="qs-circuit-source-link"> |
| 249 | <title>bell-pair.qs:4:6 (MResetZ(q1), MResetZ(q2))</title> |
| 250 | <g> |
| 251 | <g> |
| 252 | <rect |
| 253 | class="gate-ket" |
| 254 | x="273" |
| 255 | y="72" |
| 256 | width="40" |
| 257 | height="40" |
| 258 | data-wire-ys="[92]" |
| 259 | data-width="40" |
| 260 | /> |
| 261 | <text |
| 262 | font-size="14" |
| 263 | x="293" |
| 264 | y="92" |
| 265 | class="qs-maintext ket-text" |
| 266 | > |
| 267 | |0⟩ |
| 268 | </text> |
| 269 | </g> |
| 270 | </g> |
| 271 | </a> |
| 272 | </g> |
| 273 | <g |
| 274 | class="gate" |
| 275 | data-location="0,0-2,1" |
| 276 | data-zoom-out="true" |
| 277 | data-zoom-in="false" |
| 278 | > |
| 279 | <a href="#" class="qs-circuit-source-link"> |
| 280 | <title>bell-pair.qs:4:19 (MResetZ(q1), MResetZ(q2))</title> |
| 281 | <g> |
| 282 | <g> |
| 283 | <rect |
| 284 | class="gate-ket" |
| 285 | x="273" |
| 286 | y="144" |
| 287 | width="40" |
| 288 | height="40" |
| 289 | data-wire-ys="[164]" |
| 290 | data-width="40" |
| 291 | /> |
| 292 | <text |
| 293 | font-size="14" |
| 294 | x="293" |
| 295 | y="164" |
| 296 | class="qs-maintext ket-text" |
| 297 | > |
| 298 | |0⟩ |
| 299 | </text> |
| 300 | </g> |
| 301 | </g> |
| 302 | </a> |
| 303 | </g> |
| 304 | </g> |
| 305 | <text |
| 306 | font-size="14" |
| 307 | x="90" |
| 308 | y="61" |
| 309 | class="qs-maintext qs-group-label" |
| 310 | > |
| 311 | <tspan class="qs-mathtext">Main</tspan> |
| 312 | </text> |
| 313 | <g class="gate-control gate-collapse"> |
| 314 | <circle cx="82" cy="48" r="10" /> |
| 315 | <path d="M75,48 h14" /> |
| 316 | </g> |
| 317 | </g> |
| 318 | </g> |
| 319 | </svg> |
| 320 | </div> |
| 321 | <div><h2>circuit-eval-expanded</h2></div> |
| 322 | <div id="circuit-eval-expanded" class="qs-circuit"> |
| 323 | <svg |
| 324 | xmlns="http://www.w3.org/2000/svg" |
| 325 | class="qviz" |
| 326 | width="341" |
| 327 | height="276" |
| 328 | style="max-width: fit-content" |
| 329 | viewBox="0 0 341 276" |
| 330 | > |
| 331 | <g class="qubit-input-states"> |
| 332 | <a href="#" class="qs-circuit-source-link"> |
| 333 | <title>bell-pair.qs:2:21 use (q1, q2) = (Qubit(), Qubit());</title> |
| 334 | <text |
| 335 | font-size="16" |
| 336 | x="20" |
| 337 | y="118" |
| 338 | text-anchor="start" |
| 339 | dominant-baseline="middle" |
| 340 | data-wire="0" |
| 341 | class="qs-maintext qs-qubit-label" |
| 342 | > |
| 343 | | |
| 344 | <tspan class="qs-mathtext">ψ</tspan> |
| 345 | <tspan baseline-shift="sub" font-size="65%">0</tspan> |
| 346 | ⟩ |
| 347 | </text> |
| 348 | </a> |
| 349 | <a href="#" class="qs-circuit-source-link"> |
| 350 | <title>bell-pair.qs:2:30 use (q1, q2) = (Qubit(), Qubit());</title> |
| 351 | <text |
| 352 | font-size="16" |
| 353 | x="20" |
| 354 | y="190" |
| 355 | text-anchor="start" |
| 356 | dominant-baseline="middle" |
| 357 | data-wire="1" |
| 358 | class="qs-maintext qs-qubit-label" |
| 359 | > |
| 360 | | |
| 361 | <tspan class="qs-mathtext">ψ</tspan> |
| 362 | <tspan baseline-shift="sub" font-size="65%">1</tspan> |
| 363 | ⟩ |
| 364 | </text> |
| 365 | </a> |
| 366 | </g> |
| 367 | <g class="wires"> |
| 368 | <line x1="40" x2="341" y1="118" y2="118" class="qubit-wire" /> |
| 369 | <line x1="40" x2="341" y1="190" y2="190" class="qubit-wire" /> |
| 370 | <g> |
| 371 | <line |
| 372 | x1="242" |
| 373 | x2="242" |
| 374 | y1="118" |
| 375 | y2="157" |
| 376 | class="register-classical" |
| 377 | /> |
| 378 | <line |
| 379 | x1="240" |
| 380 | x2="240" |
| 381 | y1="118" |
| 382 | y2="159" |
| 383 | class="register-classical" |
| 384 | /> |
| 385 | <line |
| 386 | x1="242" |
| 387 | x2="341" |
| 388 | y1="157" |
| 389 | y2="157" |
| 390 | class="register-classical" |
| 391 | /> |
| 392 | <line |
| 393 | x1="240" |
| 394 | x2="341" |
| 395 | y1="159" |
| 396 | y2="159" |
| 397 | class="register-classical" |
| 398 | /> |
| 399 | </g> |
| 400 | <g> |
| 401 | <line |
| 402 | x1="242" |
| 403 | x2="242" |
| 404 | y1="190" |
| 405 | y2="229" |
| 406 | class="register-classical" |
| 407 | /> |
| 408 | <line |
| 409 | x1="240" |
| 410 | x2="240" |
| 411 | y1="190" |
| 412 | y2="231" |
| 413 | class="register-classical" |
| 414 | /> |
| 415 | <line |
| 416 | x1="242" |
| 417 | x2="341" |
| 418 | y1="229" |
| 419 | y2="229" |
| 420 | class="register-classical" |
| 421 | /> |
| 422 | <line |
| 423 | x1="240" |
| 424 | x2="341" |
| 425 | y1="231" |
| 426 | y2="231" |
| 427 | class="register-classical" |
| 428 | /> |
| 429 | </g> |
| 430 | </g> |
| 431 | <g> |
| 432 | <g |
| 433 | class="gate" |
| 434 | data-expanded="true" |
| 435 | data-location="0,0" |
| 436 | data-zoom-out="false" |
| 437 | data-zoom-in="true" |
| 438 | > |
| 439 | <rect |
| 440 | class="gate-unitary" |
| 441 | x="80" |
| 442 | y="46" |
| 443 | width="243" |
| 444 | height="214" |
| 445 | fill-opacity="0" |
| 446 | stroke-dasharray="8, 8" |
| 447 | /> |
| 448 | <g> |
| 449 | <g |
| 450 | class="gate" |
| 451 | data-expanded="true" |
| 452 | data-location="0,0-0,0" |
| 453 | data-zoom-out="true" |
| 454 | data-zoom-in="true" |
| 455 | > |
| 456 | <rect |
| 457 | class="gate-unitary" |
| 458 | x="90" |
| 459 | y="72" |
| 460 | width="119" |
| 461 | height="148" |
| 462 | fill-opacity="0" |
| 463 | stroke-dasharray="8, 8" |
| 464 | /> |
| 465 | <g> |
| 466 | <g |
| 467 | class="gate" |
| 468 | data-location="0,0-0,0-0,0" |
| 469 | data-zoom-out="true" |
| 470 | data-zoom-in="false" |
| 471 | > |
| 472 | <a href="#" class="qs-circuit-source-link"> |
| 473 | <title>bell-pair.qs:8:5 H(q1);</title> |
| 474 | <g> |
| 475 | <g> |
| 476 | <rect |
| 477 | class="gate-unitary" |
| 478 | x="100" |
| 479 | y="98" |
| 480 | width="40" |
| 481 | height="40" |
| 482 | data-wire-ys="[118]" |
| 483 | data-width="40" |
| 484 | /> |
| 485 | <text |
| 486 | font-size="14" |
| 487 | x="120" |
| 488 | y="118" |
| 489 | class="qs-maintext" |
| 490 | > |
| 491 | <tspan class="qs-mathtext">H</tspan> |
| 492 | </text> |
| 493 | </g> |
| 494 | </g> |
| 495 | </a> |
| 496 | </g> |
| 497 | <g |
| 498 | class="gate" |
| 499 | data-location="0,0-0,0-1,0" |
| 500 | data-zoom-out="true" |
| 501 | data-zoom-in="false" |
| 502 | > |
| 503 | <a href="#" class="qs-circuit-source-link"> |
| 504 | <title>bell-pair.qs:9:5 CNOT(q1, q2);</title> |
| 505 | <line |
| 506 | x1="172" |
| 507 | x2="172" |
| 508 | y1="118" |
| 509 | y2="190" |
| 510 | class="control-line" |
| 511 | style="pointer-events: none" |
| 512 | /> |
| 513 | <circle |
| 514 | cx="172" |
| 515 | cy="118" |
| 516 | r="5" |
| 517 | class="control-dot" |
| 518 | data-wire-ys="[118]" |
| 519 | data-width="10" |
| 520 | /> |
| 521 | <g class="oplus" data-wire-ys="[190]" data-width="30"> |
| 522 | <circle cx="172" cy="190" r="15" /> |
| 523 | <line x1="172" x2="172" y1="175" y2="205" /> |
| 524 | <line x1="157" x2="187" y1="190" y2="190" /> |
| 525 | </g> |
| 526 | </a> |
| 527 | </g> |
| 528 | </g> |
| 529 | <text |
| 530 | font-size="14" |
| 531 | x="100" |
| 532 | y="87" |
| 533 | class="qs-maintext qs-group-label" |
| 534 | > |
| 535 | <tspan class="qs-mathtext">PrepareBellPair</tspan> |
| 536 | </text> |
| 537 | <g class="gate-control gate-collapse"> |
| 538 | <circle cx="92" cy="74" r="10" /> |
| 539 | <path d="M85,74 h14" /> |
| 540 | </g> |
| 541 | </g> |
| 542 | <g |
| 543 | class="gate" |
| 544 | data-location="0,0-1,0" |
| 545 | data-zoom-out="true" |
| 546 | data-zoom-in="false" |
| 547 | > |
| 548 | <a href="#" class="qs-circuit-source-link"> |
| 549 | <title>bell-pair.qs:4:6 (MResetZ(q1), MResetZ(q2))</title> |
| 550 | <g> |
| 551 | <rect |
| 552 | class="gate-measure" |
| 553 | x="221" |
| 554 | y="98" |
| 555 | width="40" |
| 556 | height="40" |
| 557 | data-wire-ys="[118]" |
| 558 | data-width="40" |
| 559 | /> |
| 560 | <path |
| 561 | class="arc-measure" |
| 562 | d="M 256 120 A 15 12 0 0 0 226 120" |
| 563 | style="pointer-events: none" |
| 564 | /> |
| 565 | <line |
| 566 | x1="241" |
| 567 | x2="253" |
| 568 | y1="126" |
| 569 | y2="106" |
| 570 | class="qs-line-measure" |
| 571 | style="pointer-events: none" |
| 572 | /> |
| 573 | </g> |
| 574 | </a> |
| 575 | </g> |
| 576 | <g |
| 577 | class="gate" |
| 578 | data-location="0,0-1,1" |
| 579 | data-zoom-out="true" |
| 580 | data-zoom-in="false" |
| 581 | > |
| 582 | <a href="#" class="qs-circuit-source-link"> |
| 583 | <title>bell-pair.qs:4:19 (MResetZ(q1), MResetZ(q2))</title> |
| 584 | <g> |
| 585 | <rect |
| 586 | class="gate-measure" |
| 587 | x="221" |
| 588 | y="170" |
| 589 | width="40" |
| 590 | height="40" |
| 591 | data-wire-ys="[190]" |
| 592 | data-width="40" |
| 593 | /> |
| 594 | <path |
| 595 | class="arc-measure" |
| 596 | d="M 256 192 A 15 12 0 0 0 226 192" |
| 597 | style="pointer-events: none" |
| 598 | /> |
| 599 | <line |
| 600 | x1="241" |
| 601 | x2="253" |
| 602 | y1="198" |
| 603 | y2="178" |
| 604 | class="qs-line-measure" |
| 605 | style="pointer-events: none" |
| 606 | /> |
| 607 | </g> |
| 608 | </a> |
| 609 | </g> |
| 610 | <g |
| 611 | class="gate" |
| 612 | data-location="0,0-2,0" |
| 613 | data-zoom-out="true" |
| 614 | data-zoom-in="false" |
| 615 | > |
| 616 | <a href="#" class="qs-circuit-source-link"> |
| 617 | <title>bell-pair.qs:4:6 (MResetZ(q1), MResetZ(q2))</title> |
| 618 | <g> |
| 619 | <g> |
| 620 | <rect |
| 621 | class="gate-ket" |
| 622 | x="273" |
| 623 | y="98" |
| 624 | width="40" |
| 625 | height="40" |
| 626 | data-wire-ys="[118]" |
| 627 | data-width="40" |
| 628 | /> |
| 629 | <text |
| 630 | font-size="14" |
| 631 | x="293" |
| 632 | y="118" |
| 633 | class="qs-maintext ket-text" |
| 634 | > |
| 635 | |0⟩ |
| 636 | </text> |
| 637 | </g> |
| 638 | </g> |
| 639 | </a> |
| 640 | </g> |
| 641 | <g |
| 642 | class="gate" |
| 643 | data-location="0,0-2,1" |
| 644 | data-zoom-out="true" |
| 645 | data-zoom-in="false" |
| 646 | > |
| 647 | <a href="#" class="qs-circuit-source-link"> |
| 648 | <title>bell-pair.qs:4:19 (MResetZ(q1), MResetZ(q2))</title> |
| 649 | <g> |
| 650 | <g> |
| 651 | <rect |
| 652 | class="gate-ket" |
| 653 | x="273" |
| 654 | y="170" |
| 655 | width="40" |
| 656 | height="40" |
| 657 | data-wire-ys="[190]" |
| 658 | data-width="40" |
| 659 | /> |
| 660 | <text |
| 661 | font-size="14" |
| 662 | x="293" |
| 663 | y="190" |
| 664 | class="qs-maintext ket-text" |
| 665 | > |
| 666 | |0⟩ |
| 667 | </text> |
| 668 | </g> |
| 669 | </g> |
| 670 | </a> |
| 671 | </g> |
| 672 | </g> |
| 673 | <text |
| 674 | font-size="14" |
| 675 | x="90" |
| 676 | y="61" |
| 677 | class="qs-maintext qs-group-label" |
| 678 | > |
| 679 | <tspan class="qs-mathtext">Main</tspan> |
| 680 | </text> |
| 681 | <g class="gate-control gate-collapse"> |
| 682 | <circle cx="82" cy="48" r="10" /> |
| 683 | <path d="M75,48 h14" /> |
| 684 | </g> |
| 685 | </g> |
| 686 | </g> |
| 687 | </svg> |
| 688 | </div> |
| 689 | </body> |
| 690 | </html> |
| 691 | |