Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize State Measurements #7

Open
ccoffrin opened this issue Feb 10, 2022 · 1 comment
Open

Generalize State Measurements #7

ccoffrin opened this issue Feb 10, 2022 · 1 comment
Assignees

Comments

@ccoffrin
Copy link
Member

Add support for taking measurements on bases other than z.

@zmorrell zmorrell self-assigned this Feb 10, 2022
@zmorrell
Copy link
Collaborator

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants