Giter VIP home page Giter VIP logo

docquipper's Introduction

This is a Docker image for Quipper, a quantum programming language embedded in Haskell.

Getting Started

To use this:

$ git submodule update --
$ docker build -t ausbin/docquipper .
$ docker run --rm -v $(pwd):/quipper ausbin/docquipper quipper bv.hs
$ ./bv

To convert bv.hs to bv.qasm (credits to onestruggler) use:

$ docker run -it --rm -v $(pwd):/quipper ausbin/docquipper qasm bv.hs

Link to onestruggler's og repo: https://github.com/onestruggler/quipper-qasm.git

(If you're not on amd64 Linux, that last command should probably be in the Docker container instead.)

Examples

The example programs in examples/ are reconstructed from "Five Quantum Algorithms Using Quipper" by Siddiqui, Islam, and Shehab (2014).

Hacks

Quipper appears to be dependent on an older version of Haskell and Debian, so the image pulls in an older (compatible) version of the haskell image. This image is based on an unsupported version of Debian, so the Dockerfile updates /etc/apt/sources.list to use archive.debian.org.

There is a bug of some kind with quipper-pp.hs (the Quipper preprocessor) in which Haskell is SIGTERMing awk, causing awk to fail. I have not investigated the issue beyond an strace session revealing the SIGTERM along with many single-byte write()s (functional programming elegance?), but I did find that quipper-pp.hs seems to replace convert_template.sh, a shell script in the "legacy" (tarball) distribution of Quipper. So the Dockerfile substitutes the Haskell quipper binary shipped with the cabal package with the original quipper shell script (also in the "legacy" distribution), which calls convert_template.sh.

docquipper's People

Contributors

ausbin avatar sbarara3 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.