Skip to content
Snippets Groups Projects
Commit 427e6d5b authored by Martin Sandfuchs's avatar Martin Sandfuchs
Browse files

Add some comments

parent f9f0a32b
No related branches found
No related tags found
No related merge requests found
......@@ -317,11 +317,21 @@ function HAgB(alpha, q; eta)
end
"""
key_rate(α, q; eta)
The key rate for a given alpha, qber `q` and transmittance `eta`.
"""
function key_rate(α, q; eta)
return compute_entropy(α, q; eta) - HAgB(α, q; eta)
end
"""
key_rate(q; eta)
The key rate for a given qber `q` and transmittance `eta`, optimized over alpha.
"""
function key_rate(q; eta)
res = Optim.optimize(alpha -> -key_rate(alpha, q; eta), 0.0, 0.8)
@show res
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment