In the paper Maximum Likelihood, Minimum Effort, given an orthonormal Hermitian operator basis $\{\sigma_i\}_{i=1}^{d^2}$ of $d \times d$ matrices and a set of measured values $m_{ij}$ corresponding to the $j$th measurement of the expectation value $\sigma_i$ applied to the true state $\rho_0$, the authors give the definition of a matrix $\mu$ as $$ \mu = \frac{1}{d}\sum_i m_i\sigma_i, $$ where $m_i = \sum_{j=1}^n \frac{m_{ij}}{n}$ and $n$ is the number of measurements. After defining this matrix, further optimization is done to approximate the density matrix of the true state.
I'm trying to implement this procedure for a single qubit as follows.
- To get $m_i$, I am first measuring the true state in the $X$, $Y$, $Z$ bases. With the counts for each circuit, I'm running the following code:
m = 0
try:
m += count['0'] # measurement of |0> has eigenvalue of +1
except:
pass
try:
m -= count['1'] # measurement of |1> has eigenvalue of -1
except:
pass
m /= shots
- Using the respective $m_i$, I'm calculating the matrix $\mu$ according to the formula as (where
ms
is a list with the three values calculated in step 1):
mu = (ms[0] * Z + ms[1] * X + ms[2] * Y) / 3.
However, after inputing the resulting matrix through the Fast algorithm for Subproblem 1 described later on in the paper, I'm not getting the expected results as I always get all the eigenvalues $\lambda_i$ set to $0$. I don't think there is any problem in my implementation of the Fast algorithm for Subproblem 1 as I tested it with the values given in Figure 1 of the same paper and I got the expected results.
Therefore, I suspect there is something wrong in my calculation of the matrix $\mu$. Is there something I'm missing or interpreted incorrectly?