-
Notifications
You must be signed in to change notification settings - Fork 0
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
docs: Add example of magic state distillation #40
Conversation
map(X :: $, Y :: $, n :: #, f :: { X -o Y }) -> { Vec(X, n) -o Vec(Y, n) } | ||
map(_, _, _, _) = { [] => [] } | ||
map(X, Y, succ(n), f) = { cons(x,xs) => cons(f(x), map(X, Y, n, f)(xs)) } |
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.
Should we move these helper functions into a separate file in brat/examples
?
redistill_if_bad(Qubit, Bit, Vec(Money, 4)) | ||
-o Qubit, Vec(Money, 4) | ||
redistill_if_bad(q, false, ms) = q, ms | ||
redistill_if_bad(q, true, ms) = let m, _ = measure(q) in |
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.
A discard
function might be useful if we don't care about the measurement outcome
rus(Money, Qubit) -o Money, Qubit | ||
rus = { | ||
rus(timeout :: Nat) -> { Money, Qubit -o Money, Qubit } | ||
rus(0) = { .. } |
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 amazing :D
* Driveby cleanups of some misnamed `examples/` * Add monomorphic test so it compiles+validaties rather than having any type erasure issues (#18)
No description provided.