-
Notifications
You must be signed in to change notification settings - Fork 15
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
Introduce rand_ket
and generate rand_dm
using Ginibre ensemble method
#185
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #185 +/- ##
==========================================
+ Coverage 93.33% 93.36% +0.03%
==========================================
Files 28 28
Lines 2101 2111 +10
==========================================
+ Hits 1961 1971 +10
Misses 140 140 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this method equal to the current one in the case rank =N
?
Not equal, as I mentioned in above. I think the current method is not random enough. |
In the case |
This PR introduces
rand_ket
, and also modify the method for generating random density matrixrand_dm
.I think the current method for generating random density matrix is not random enough. Because the real value of off-diagonal elements are always positive.
Here, I implement the method to generate random density matrix from Ginibre ensemble, which is also the default method in
qutip
. I think this method is the more standard one in the literature.Furthermore, with this method, we can specify the
rank
of the density matrix, i.e., the number of eigenvalues which are positive. The other eigenvalues will be very close to zero (< 1e-15
).