ReadoutError
QuICT.core.noise.ReadoutError ¶
The Readout error class
Example
p(n|m) describe the probability of getting the noise outcome n with the truly measured result m. \n The ReadoutError for 1 qubit: \n
\[
P = \begin{bmatrix}
p(0|0) & p(1|0) \\
p(0|1) & p(1|1) \\
\end{bmatrix} = \begin{bmatrix}
0.8 & 0.2 \\
0.3 & 0.7 \\
\end{bmatrix}
\]
The ReadoutError for 2 qubit:
\[
P = \begin{bmatrix}
p(00|00) & p(01|00) & p(10|00) & p(11|00) \\
p(00|01) & p(01|01) & p(10|01) & p(11|01) \\
p(00|10) & p(01|10) & p(10|10) & p(11|10) \\
p(00|11) & p(01|11) & p(10|11) & p(11|11) \\
\end{bmatrix}
\]
Important
The sum of each rows in the prob should equal to 1.
Parameters:
-
prob((List, ndarray)) –The probability of outcome assignment
Source code in QuICT/core/noise/readout_error.py
apply_to_qubits ¶
Apply current Readout Noise to this measured result.
Parameters:
-
measured_result(int) –The given measured result.
Returns:
-
int(int) –the noise result
Source code in QuICT/core/noise/readout_error.py
compose ¶
Compose the Readout Noise with other Readout Noise.
\[
P_{comp} = P \cdot P_{o}
\]
Source code in QuICT/core/noise/readout_error.py
expand ¶
Expand noise with size of extend_qubits.
\[
P_{exp} = P \otimes I_n
\]
where n is the extend qubit number.
Source code in QuICT/core/noise/readout_error.py
is_identity ¶
Whether self.prob is identity matrix.
power ¶
Power the Readout Noise with n.
\[
P_{pow} = P^n
\]
Source code in QuICT/core/noise/readout_error.py
tensor ¶
Tensor the Readout Noise with other Readout Noise.
\[
P_{ten} = P \otimes P_{o}
\]