Manipulation of quantum channels in Haskell