Replies: 1 comment
-
If you want to apply gates on the state psi, using a sparse vector won't help much - it will eventually grow to a dense vector anyway. if you just want to calculate the expectation of a known sparse state, you should directly construct the known state in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
for some case we want to evaluate <\psi| H |\psi>.
it seems the mat(H) can get the sparse matrix, while the statevec(\psi) is a dense vector.
How can we make them both sparse to accelerate the numerical calculations?
Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions