|
465 | 465 | }, |
466 | 466 | { |
467 | 467 | "cell_type": "code", |
468 | | - "execution_count": 42, |
| 468 | + "execution_count": 45, |
469 | 469 | "id": "20025ca7-71ed-4215-a8a4-a6d1ab5173a3", |
470 | 470 | "metadata": { |
471 | 471 | "tags": [] |
|
497 | 497 | " counts = result[0].data.c.get_counts()\n", |
498 | 498 | " max_index = max(counts)\n", |
499 | 499 | " max_count = counts[max_index]\n", |
500 | | - " print(type(max_count))\n", |
501 | | - " print(max_count)\n", |
502 | 500 | " print(\"Register Reading: \" + str(max_count))\n", |
503 | 501 | " phase = max_count/(2**N_COUNT)\n", |
504 | 502 | " print(f\"Corresponding Phase: {phase}\")\n", |
|
535 | 533 | }, |
536 | 534 | { |
537 | 535 | "cell_type": "code", |
538 | | - "execution_count": 48, |
| 536 | + "execution_count": 46, |
539 | 537 | "id": "fd95996d-c25b-4f38-9653-127b9893d87d", |
540 | 538 | "metadata": { |
541 | 539 | "tags": [] |
|
547 | 545 | "text": [ |
548 | 546 | "\n", |
549 | 547 | "ATTEMPT 1:\n", |
550 | | - "Register Reading: 10000000\n", |
551 | | - "Corresponding Phase: 0.5\n", |
552 | | - "Result: r = 2\n", |
| 548 | + "Register Reading: 257\n", |
| 549 | + "Corresponding Phase: 1.00390625\n", |
| 550 | + "Result: r = 1\n", |
| 551 | + "Guessed Factors: 15 and 1\n", |
| 552 | + "\n", |
| 553 | + "ATTEMPT 2:\n", |
| 554 | + "Register Reading: 256\n", |
| 555 | + "Corresponding Phase: 1.0\n", |
| 556 | + "Result: r = 1\n", |
| 557 | + "Guessed Factors: 15 and 1\n", |
| 558 | + "\n", |
| 559 | + "ATTEMPT 3:\n", |
| 560 | + "Register Reading: 262\n", |
| 561 | + "Corresponding Phase: 1.0234375\n", |
| 562 | + "Result: r = 1\n", |
| 563 | + "Guessed Factors: 15 and 1\n", |
| 564 | + "\n", |
| 565 | + "ATTEMPT 4:\n", |
| 566 | + "Register Reading: 252\n", |
| 567 | + "Corresponding Phase: 0.984375\n", |
| 568 | + "Result: r = 1\n", |
| 569 | + "Guessed Factors: 15 and 1\n", |
| 570 | + "\n", |
| 571 | + "ATTEMPT 5:\n", |
| 572 | + "Register Reading: 260\n", |
| 573 | + "Corresponding Phase: 1.015625\n", |
| 574 | + "Result: r = 1\n", |
| 575 | + "Guessed Factors: 15 and 1\n", |
| 576 | + "\n", |
| 577 | + "ATTEMPT 6:\n", |
| 578 | + "Register Reading: 257\n", |
| 579 | + "Corresponding Phase: 1.00390625\n", |
| 580 | + "Result: r = 1\n", |
| 581 | + "Guessed Factors: 15 and 1\n", |
| 582 | + "\n", |
| 583 | + "ATTEMPT 7:\n", |
| 584 | + "Register Reading: 260\n", |
| 585 | + "Corresponding Phase: 1.015625\n", |
| 586 | + "Result: r = 1\n", |
| 587 | + "Guessed Factors: 15 and 1\n", |
| 588 | + "\n", |
| 589 | + "ATTEMPT 8:\n", |
| 590 | + "Register Reading: 273\n", |
| 591 | + "Corresponding Phase: 1.06640625\n", |
| 592 | + "Result: r = 15\n", |
553 | 593 | "Guessed Factors: 3 and 1\n", |
554 | 594 | "*** Non-trivial factor found: {guess} ***\n" |
555 | 595 | ] |
|
0 commit comments