packages feed

quipper-demos-0.9.0.0: Quipper/Demos/And_gate.hs

import Quipper

and_gate :: (Qubit, Qubit) -> Circ (Qubit)
and_gate (a, b) = do
  c <- qinit False
  qnot_at c `controlled` [a, b]
  return c

main =
  print_simple Preview and_gate