-
Notifications
You must be signed in to change notification settings - Fork 49
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
Mutual Information I(𝒶, 𝒷) and improving doctests/documentation in entanglement.jl
#338
base: master
Are you sure you want to change the base?
Conversation
entanglement.jl
entanglement.jl
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #338 +/- ##
==========================================
+ Coverage 82.48% 82.55% +0.06%
==========================================
Files 62 62
Lines 4186 4202 +16
==========================================
+ Hits 3453 3469 +16
Misses 733 733 ☔ 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.
thanks, this is an interesting addition. I left a few comments in.
86d5c0a
to
f88334b
Compare
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.
This looks pretty good.
Apologies for not prioritizing this style of PRs -- you have a lot and I have tried to address the higher value ones first, whenever I have time.
I left a few comments in, mainly motivated by the needs of some other parts of the ecosystem that we try to coordinate with.
@@ -77,7 +77,7 @@ export | |||
# Group theory tools | |||
groupify, minimal_generating_set, pauligroup, normalizer, centralizer, contractor, delete_columns, | |||
# Clipped Gauge | |||
canonicalize_clip!, bigram, entanglement_entropy, |
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.
let's not export it as this is something we would want to synchronize with QuantumInterface
Could you post an issue at https://github.com/qojulia/QuantumInterface.jl/ describing the need for a new generic function and referencing this PR. The goal would be to pick a name that can be reused by other packages.
In the meantime, keeping this unexported will let us merge this PR without waiting for that coordination.
`B(𝒢) ≡ {(𝓁(g₁),𝓇(g₁)),…,(𝓁(gₙ),𝓇(gₙ))}` | ||
|
||
The clipped gauge `𝒢` is a specific choice of stabilizer state where exactly two stabilizer endpoints exist at each site, | ||
ensuring `ρₗ(x) + ρᵣ(x) = 2` for all sites `x` where `ρ` represents the reduced density matrix for the subsystem under |
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.
That sentence is unclear to me. How can two density matrices sum up to be the scalar 2
?
``` | ||
|
||
See Eq. E6 of [li2019measurement](@cite). See also: [`entanglement_entropy`](@ref) | ||
""" |
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.
this should probably be a docstring for a function declaration function mutual_information end
, and not be attached to a specific method. Or probably even better if there is a method with some default choice of algorithm (that way it will not cause issues when this gets declared in QuantumInterface).
@@ -50,4 +50,24 @@ | |||
@test entanglement_entropy(copy(s), subsystem, Val(:graph))==2 | |||
@test entanglement_entropy(copy(s), subsystem, Val(:rref))==2 | |||
end | |||
|
|||
@testset "Mutual information for Clifford circuits" begin |
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.
additional tests that use QuantumOptics to double check the results independently would be very valuable
This PR aims to introduce Mutual Information
I(A,B)
along with improving the doctests and documentation in theentanglement.jl
.In the future, if you like, it would be better to have a entanglement introduced in the manual of either "algebra" or upcoming "circuit simulation" manual.
In the papers, there were many graphs, I think based on entanglement entropy that could be reproduced in a tutorial fashion. Hopefully, this sounds interesting.
....
If you want to submit an unfinished piece of work in order to get comments and discuss, please mark the pull request as a draft and ping the repository maintainer.
Please address only one topic or issue per pull request! Many small PRs are much easier to review and merge than one large PR.
Before merging, all changes and new functionality should be marked in the CHANGELOG file, but feel free to just leave your CHANGELOG notes in the PR description, to avoid merge conflicts with other requests modifying that file. The maintainer will add these CHANGELOG notes for you if you do so.
Before considering your pull request ready for review and merging make sure that all of the following are completed (please keep the clecklist as part of your PR):
If possible, keep your git history not too wild (rebase and squash commits, keep commits small and semantically separated) so that review is easier.