-
Notifications
You must be signed in to change notification settings - Fork 25
DEJMPS Purification circuit #238
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #238 +/- ##
==========================================
- Coverage 72.58% 64.38% -8.20%
==========================================
Files 52 52
Lines 2006 2016 +10
==========================================
- Hits 1456 1298 -158
- Misses 550 718 +168 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Krastanov
left a comment
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.
when quantumsavory is released, bump compat bounds
tests should be added
really neat addition, thank you!
src/CircuitZoo/CircuitZoo.jl
Outdated
| See also: [`Purify2to1`](@ref), [PhysRevLett.77.2818](@cite) | ||
| """ | ||
| struct DEJMPSProtocol <: AbstractCircuit |
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 remove the name "Protocol" to avoid confusion with ProtocolZoo
let's introduce the "per-node" parts of the circuits so that they are easy to use from a network simulation
Krastanov
left a comment
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.
add tests of the form
good_bell_pair
noisy_state = f * good_bell_pair + (...) * the_others + ...
slots = Register(4)
res = circuit(slots[1], ...)
if success
f_out = observable(slots, projector(good_bell_pair))
@test approx(f_out, theoretical_expression_based_on_f)
end
| apply!(purifiedL, RotXGate(π/2)) | ||
| apply!(sacrificedL, RotXGate(π/2)) | ||
| apply!(purifiedR, RotXGate(-π/2)) | ||
| apply!(sacrificedR, RotXGate(-π/2)) | ||
|
|
||
| apply!((purifiedL, sacrificedL), CNOT) | ||
| apply!((purifiedR, sacrificedR), CNOT) | ||
|
|
||
| measa = project_traceout!(sacrificedL, σᶻ) | ||
| measb = project_traceout!(sacrificedR, σᶻ) | ||
| success = measa == measb | ||
| if !success | ||
| traceout!(purifiedL) | ||
| traceout!(purifiedR) | ||
| end | ||
| success |
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.
implement this in terms of calling the half-circuits you have already defined below
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.
Closes #237