|
80 | 80 | "cell_type": "markdown", |
81 | 81 | "metadata": {}, |
82 | 82 | "source": [ |
83 | | - "The following function **complete_meas_cal** returns a list **meas_calibs** of QuantumCircuit objects containing the calibration circuits, \n", |
| 83 | + "The following function **complete_meas_cal** returns a list **meas_calibs** of `QuantumCircuit` objects containing the calibration circuits, \n", |
84 | 84 | "and a list **state_labels** of the calibration state labels.\n", |
85 | 85 | "\n", |
86 | 86 | "The input to this function can be given in one of the following three forms:\n", |
|
91 | 91 | "\n", |
92 | 92 | "In addition, one can provide a string **circlabel**, which is added at the beginning of the circuit names for unique identification.\n", |
93 | 93 | "\n", |
94 | | - "For example, in our case, the input is a 5-qubit QuantumRegister containing the qubits Q2,Q3,Q4:" |
| 94 | + "For example, in our case, the input is a 5-qubit `QuantumRegister` containing the qubits Q2,Q3,Q4:" |
95 | 95 | ] |
96 | 96 | }, |
97 | 97 | { |
|
187 | 187 | "Assume that we apply some noise model from Qiskit Aer to the 5 qubits, \n", |
188 | 188 | "then the calibration matrix will have most of its mass on the main diagonal, with some additional 'noise'.\n", |
189 | 189 | "\n", |
190 | | - "Alternatively, we can execute the calibration circuits using IBMQ provider." |
| 190 | + "Alternatively, we can execute the calibration circuits using an IBMQ provider." |
191 | 191 | ] |
192 | 192 | }, |
193 | 193 | { |
|
348 | 348 | "cell_type": "markdown", |
349 | 349 | "metadata": {}, |
350 | 350 | "source": [ |
351 | | - "We now execute the calibration circuits (with the noise model above)" |
| 351 | + "We now execute the calibration circuits (with the noise model above):" |
352 | 352 | ] |
353 | 353 | }, |
354 | 354 | { |
|
367 | 367 | "source": [ |
368 | 368 | "We now compute the results without any error mitigation and with the mitigation, namely after applying the calibration matrix to the results.\n", |
369 | 369 | "\n", |
370 | | - "There are two fitting methods for applying thr calibration (if none method is defined, then 'least_squares' is used). \n", |
| 370 | + "There are two fitting methods for applying the calibration (if no method is defined, then 'least_squares' is used). \n", |
371 | 371 | "- **'pseudo_inverse'**, which is a direct inversion of the calibration matrix, \n", |
372 | | - "- **'least_squares'**, which constrained to have physical probabilities.\n", |
| 372 | + "- **'least_squares'**, which constrains to have physical probabilities.\n", |
373 | 373 | "\n", |
374 | 374 | "The raw data to be corrected can be given in a number of forms:\n", |
375 | 375 | "\n", |
|
436 | 436 | "cell_type": "markdown", |
437 | 437 | "metadata": {}, |
438 | 438 | "source": [ |
439 | | - "Consider now that we want to correct a 2Q Bell state, but we have the 3Q calibration matrix. We can reduce the matrix and build a new mitigation object" |
| 439 | + "Consider now that we want to correct a 2Q Bell state, but we have the 3Q calibration matrix. We can reduce the matrix and build a new mitigation object." |
440 | 440 | ] |
441 | 441 | }, |
442 | 442 | { |
|
595 | 595 | "cell_type": "markdown", |
596 | 596 | "metadata": {}, |
597 | 597 | "source": [ |
598 | | - "Let us elaborate on the circuit names. We see that there are only four circuits, instead of eight. The total number of required circuits is $2^m$ where m is the number of qubits in the larget subset (here m=2).\n", |
| 598 | + "Let us elaborate on the circuit names. We see that there are only four circuits, instead of eight. The total number of required circuits is $2^m$ where $m$ is the number of qubits in the larget subset (here $m=2$).\n", |
599 | 599 | "\n", |
600 | 600 | "Each basis state of qubits 3 and 4 appears exactly once. Only two basis states are required for qubit 2, so these are split equally across the four experiments. For example, state '0' of qubit 2 appears in state labels '000' and '010'.\n", |
601 | 601 | "\n", |
602 | | - "We now execute the calibration circuits on Aer simulator, using the same noise model as before. This noise is in fact local to qubits 3 and 4 separately, but assume that we don't know it, and that we only know that it is local for qubit 2." |
| 602 | + "We now execute the calibration circuits on an Aer simulator, using the same noise model as before. This noise is in fact local to qubits 3 and 4 separately, but assume that we don't know it, and that we only know that it is local for qubit 2." |
603 | 603 | ] |
604 | 604 | }, |
605 | 605 | { |
|
668 | 668 | "cell_type": "markdown", |
669 | 669 | "metadata": {}, |
670 | 670 | "source": [ |
671 | | - "We can look at the readout fidelities of the individual tensored components or qubits within a set" |
| 671 | + "We can look at the readout fidelities of the individual tensored components or qubits within a set:" |
672 | 672 | ] |
673 | 673 | }, |
674 | 674 | { |
|
703 | 703 | "cell_type": "markdown", |
704 | 704 | "metadata": {}, |
705 | 705 | "source": [ |
706 | | - "Plot the individual calibration matrices" |
| 706 | + "Plot the individual calibration matrices:" |
707 | 707 | ] |
708 | 708 | }, |
709 | 709 | { |
|
790 | 790 | "cell_type": "markdown", |
791 | 791 | "metadata": {}, |
792 | 792 | "source": [ |
793 | | - "We now execute the calibration circuits (with the noise model above)" |
| 793 | + "We now execute the calibration circuits (with the noise model above):" |
794 | 794 | ] |
795 | 795 | }, |
796 | 796 | { |
|
824 | 824 | "cell_type": "markdown", |
825 | 825 | "metadata": {}, |
826 | 826 | "source": [ |
827 | | - "Plot the raw vs corrected state" |
| 827 | + "Plot the raw vs corrected state:" |
828 | 828 | ] |
829 | 829 | }, |
830 | 830 | { |
|
855 | 855 | "cell_type": "markdown", |
856 | 856 | "metadata": {}, |
857 | 857 | "source": [ |
858 | | - "As a check we should get the same answer if we build the full correction matrix from a tensor product of the subspace calibration matrices" |
| 858 | + "As a check we should get the same answer if we build the full correction matrix from a tensor product of the subspace calibration matrices:" |
859 | 859 | ] |
860 | 860 | }, |
861 | 861 | { |
|
0 commit comments