A simple, interpreted Quantum Programming Language.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Deutsch's algorithm can be used to tell in a single pass whether a function is constant or balanced.
// A function is sequence of parallel gates
funq blackbox =
I I // These are both identity gates - they do nothing
CNOT // This gate is a CNOT - it is two qubits wide
// A let definition is starting state, which can
// be followed by a sequence of parallel gates.
let deutsch =
0 1 // These are the initial starting states
H H
log "before" // You can debug intermediate states in a 'let' expression
blackbox
log "after"
H H
let main =
deutsch