Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/src/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -261,3 +261,18 @@ @article{promponas2024maximizing
year={2024},
publisher={IEEE}
}

@article{PhysRevLett.77.2818,
title = {Quantum Privacy Amplification and the Security of Quantum Cryptography over Noisy Channels},
author = {Deutsch, David and Ekert, Artur and Jozsa, Richard and Macchiavello, Chiara and Popescu, Sandu and Sanpera, Anna},
journal = {Phys. Rev. Lett.},
volume = {77},
issue = {13},
pages = {2818--2821},
numpages = {0},
year = {1996},
month = {Sep},
publisher = {American Physical Society},
doi = {10.1103/PhysRevLett.77.2818},
url = {https://link.aps.org/doi/10.1103/PhysRevLett.77.2818}
}
50 changes: 50 additions & 0 deletions src/CircuitZoo/CircuitZoo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,56 @@
"""
$TYPEDEF
A purification protocol implementing the DEJMPS scheme, which sacrifices an
entangled Bell pair to purify another one. This circuit is capable of detecting
and correcting all Pauli errors on the purified pair.
This circuit applies Rx rotations, bilateral CNOTs, and projective measurements
in the Z basis on the sacrificial pair.
The sacrificial qubits are removed from the register.
If both measurement outcomes agree, the protocol succeeds and the purified pair
is retained. Otherwise, all qubits are discarded.
```jldoctest
julia> a = Register(2)
b = Register(2)
bell = (Z₁⊗Z₁+Z₂⊗Z₂)/√2
initialize!((a[1], b[1]), bell)
initialize!((a[2], b[2]), bell);
julia> DEJMPSProtocol()(a[1], b[1], a[2], b[2])
```
See also: [`Purify2to1`](@ref), [PhysRevLett.77.2818](@cite)
"""
struct DEJMPSProtocol <: AbstractCircuit
Copy link
Member

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

end

inputqubits(circuit::DEJMPSProtocol) = 4

Check warning on line 897 in src/CircuitZoo/CircuitZoo.jl

View check run for this annotation

Codecov / codecov/patch

src/CircuitZoo/CircuitZoo.jl#L897

Added line #L897 was not covered by tests

function (circuit::DEJMPSProtocol)(purifiedL, purifiedR, sacrificedL, sacrificedR)
apply!(purifiedL, Rx/2))
apply!(sacrificedL, Rx/2))
apply!(purifiedR, Rx(-π/2))
apply!(sacrificedR, Rx(-π/2))

Check warning on line 903 in src/CircuitZoo/CircuitZoo.jl

View check run for this annotation

Codecov / codecov/patch

src/CircuitZoo/CircuitZoo.jl#L899-L903

Added lines #L899 - L903 were not covered by tests

apply!((purifiedL, sacrificedL), CNOT)
apply!((purifiedR, sacrificedR), CNOT)

Check warning on line 906 in src/CircuitZoo/CircuitZoo.jl

View check run for this annotation

Codecov / codecov/patch

src/CircuitZoo/CircuitZoo.jl#L905-L906

Added lines #L905 - L906 were not covered by tests

measa = project_traceout!(sacrificedL, σᶻ)
measb = project_traceout!(sacrificedR, σᶻ)
success = measa == measb
if !success
traceout!(purifiedL)
traceout!(purifiedR)

Check warning on line 913 in src/CircuitZoo/CircuitZoo.jl

View check run for this annotation

Codecov / codecov/patch

src/CircuitZoo/CircuitZoo.jl#L908-L913

Added lines #L908 - L913 were not covered by tests
end
success

Check warning on line 915 in src/CircuitZoo/CircuitZoo.jl

View check run for this annotation

Codecov / codecov/patch

src/CircuitZoo/CircuitZoo.jl#L915

Added line #L915 was not covered by tests
end

"""
$TYPEDEF
Fields:
$FIELDS
Expand Down
Loading