You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ccoffrin I have worked out the math and figured out how to do this reasonably efficiently. It looks like we will need to add the LinearAlgebra package to the dependencies though, since it will involve using the eigenvalue decomposition.
We could possibly ask users to provide a measurement basis as an argument and assume we don't need to perform an eigendecomposition, with each column of the matrix being the state onto which they want to project, but this could easily run into a multitude of problems.
Basically, it breaks down to returning the diagonal of the matrix (E' * \rho * E), where E is the matrix with columns corresponding to the state being projected onto. The probabilities will correspond as P(i) = tr(\rho * E[:,i] * E[:,i]').
In summary, do we want to do the eigendecomposition on an input measurement basis, in case for example the user provides [2 0; 0 1] as a measurement basis, or do we want to just trust the user to provide a properly normalized basis?
Add support for taking measurements on bases other than z.
The text was updated successfully, but these errors were encountered: