|
99 | 99 | "To benchmark the difference in performance, we consider a circuit that prepares a Bell state across a linear chain of varying length. The fidelity of the Bell state at the ends of the chain is measured."
|
100 | 100 | ]
|
101 | 101 | },
|
| 102 | + { |
| 103 | + "cell_type": "code", |
| 104 | + "execution_count": null, |
| 105 | + "id": "64c25da9-a728-4ae4-a377-3078a1dc618d", |
| 106 | + "metadata": {}, |
| 107 | + "outputs": [ |
| 108 | + { |
| 109 | + "data": { |
| 110 | + "text/plain": [ |
| 111 | + "<Image src=\"/docs/images/tutorials/real-time-benchmarking-for-qubit-selection/extracted-outputs/95571eca-02ba-4452-816a-c04822675be8-0.avif\" alt=\"Output of the previous code cell\" />" |
| 112 | + ] |
| 113 | + }, |
| 114 | + "metadata": {}, |
| 115 | + "output_type": "display_data" |
| 116 | + } |
| 117 | + ], |
| 118 | + "source": [ |
| 119 | + "from qiskit import QuantumCircuit\n", |
| 120 | + "\n", |
| 121 | + "ideal_dist = {\"00\": 0.5, \"11\": 0.5}\n", |
| 122 | + "\n", |
| 123 | + "num_qubits_list = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 127]\n", |
| 124 | + "circuits = []\n", |
| 125 | + "for num_qubits in num_qubits_list:\n", |
| 126 | + " circuit = QuantumCircuit(num_qubits, 2)\n", |
| 127 | + " circuit.h(0)\n", |
| 128 | + " for i in range(num_qubits - 1):\n", |
| 129 | + " circuit.cx(i, i + 1)\n", |
| 130 | + " circuit.barrier()\n", |
| 131 | + " circuit.measure(0, 0)\n", |
| 132 | + " circuit.measure(num_qubits - 1, 1)\n", |
| 133 | + " circuits.append(circuit)\n", |
| 134 | + "\n", |
| 135 | + "circuits[-1].draw(output=\"mpl\", style=\"clifford\", fold=-1)" |
| 136 | + ] |
| 137 | + }, |
102 | 138 | {
|
103 | 139 | "cell_type": "markdown",
|
104 | 140 | "id": "16948f21-a39b-4444-bf02-5f81331825c4",
|
|
401 | 437 | "You can see that over several days some of the qubit properties can change considerably. This highlights the importance of having fresh information of the QPU status, to be able to select the best performing qubits for an experiment."
|
402 | 438 | ]
|
403 | 439 | },
|
404 |
| - { |
405 |
| - "cell_type": "code", |
406 |
| - "execution_count": 5, |
407 |
| - "id": "95571eca-02ba-4452-816a-c04822675be8", |
408 |
| - "metadata": {}, |
409 |
| - "outputs": [ |
410 |
| - { |
411 |
| - "data": { |
412 |
| - "text/plain": [ |
413 |
| - "<Image src=\"/docs/images/tutorials/real-time-benchmarking-for-qubit-selection/extracted-outputs/95571eca-02ba-4452-816a-c04822675be8-0.avif\" alt=\"Output of the previous code cell\" />" |
414 |
| - ] |
415 |
| - }, |
416 |
| - "execution_count": 5, |
417 |
| - "metadata": {}, |
418 |
| - "output_type": "execute_result" |
419 |
| - } |
420 |
| - ], |
421 |
| - "source": [ |
422 |
| - "from qiskit import QuantumCircuit\n", |
423 |
| - "\n", |
424 |
| - "ideal_dist = {\"00\": 0.5, \"11\": 0.5}\n", |
425 |
| - "\n", |
426 |
| - "num_qubits_list = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 127]\n", |
427 |
| - "circuits = []\n", |
428 |
| - "for num_qubits in num_qubits_list:\n", |
429 |
| - " circuit = QuantumCircuit(num_qubits, 2)\n", |
430 |
| - " circuit.h(0)\n", |
431 |
| - " for i in range(num_qubits - 1):\n", |
432 |
| - " circuit.cx(i, i + 1)\n", |
433 |
| - " circuit.barrier()\n", |
434 |
| - " circuit.measure(0, 0)\n", |
435 |
| - " circuit.measure(num_qubits - 1, 1)\n", |
436 |
| - " circuits.append(circuit)\n", |
437 |
| - "\n", |
438 |
| - "circuits[-1].draw(output=\"mpl\", style=\"clifford\", fold=-1)" |
439 |
| - ] |
440 |
| - }, |
441 | 440 | {
|
442 | 441 | "cell_type": "markdown",
|
443 | 442 | "id": "0e53f0a5-7713-4915-ae47-c1aa0a4f17cd",
|
|
0 commit comments