This folder contains the supporting code for the paper R. Eisenberg, B. Valiron and S. Zdancewic. "Typechecking Linear Data: Quantum Computation in Haskell". Draft, 2012. http://www.monoidal.net/research.html#qhaskell CONTENT ======= * README.txt : This file. * SimpTypLC.hs : Simply typed lambda-calculus of Section 3. * FullQLC.hs : Quantum lambda-calculus of Section 6. * FullQLCMonad.hs : Operational interpretation of the quantum lambda-calculus, Section 8. * QRAM.hs : Auxiliary file describing three monads for the operational interpretation of QLC; imported by FullQLCMonad.hs. USAGE ===== The code was designed with GHC version 7.4.1. To test the modules: launch ghci, load a file and try out the commented examples. For example: $ ghci GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Prelude> :l FullQLCMonad.hs Ok, modules loaded: FullQLCMonad, QRAM. Prelude FullQLCMonad> printPQM True Loading package array-0.4.0.0 ... linking ... done. Loading package deepseq-1.3.0.0 ... linking ... done. Loading package containers-0.4.2.1 ... linking ... done. [([0.0 :+ 0.0,0.0 :+ 0.0,0.4999999999999999 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,(-0.0) :+ 0.0,0.0 :+ 0.0],Qbit 2),([0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.4999999999999999 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0],Qbit 2),([0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.4999999999999999 :+ 0.0,0.0 :+ 0.0],Qbit 2),([0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.0 :+ 0.0,0.4999999999999999 :+ 0.0],Qbit 2)] Prelude FullQLCMonad>