{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LINE 1 "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