GithubHelp home page GithubHelp logo

00mjk / feynman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from meamy/feynman

0.0 0.0 0.0 1.52 MB

Quantum circuit analysis toolkit

License: BSD 3-Clause "New" or "Revised" License

Haskell 2.54% Makefile 0.01% OpenQASM 97.44% Pascal 0.02%

feynman's Introduction

Build Status

Feynman

Feynman is a toolkit for quantum circuit analysis in the path integral model of quantum mechnics. The toolkit comprises synthesis, optimization and verification methods based around representations of circuit actions as sums-over-paths.

Two ways of interfacing with the Feynman project are possible. Standalone tools built on Feynman, found in tools, provide command-line interfaces for optimizing and/or verifying quantum circuits, or the Feynman library can be imported and used directly in other Haskell projects.

Prerequisites

The Feynman project requires GHC >=8.0.2 and Cabal >=1.24.0. Older versions of GHC may work but have not been tested.

Installation

The Feynman library and binary executables for optimization (feynopt) and verification (feynver) can be installed globally with

cabal install

or via the slightly more fine-grain series of commands

cabal configure
cabal build
cabal install

Sandboxes

Dependency hell is a common problem in Haskell, so earlier versions of Cabal had the option to explicitly create a local sandbox where package dependencies would be installed without causes problems for other packages. To install Feynman's dependencies in a sandbox, before building or installing Feynman first run

# Cabal 1 & 2
cabal sandbox init
cabal install --only-dependencies

# Cabal 3
cabal v1-sandbox init
cabal install --only-dependencies

Install directory

By default, Cabal installs the binaries in ~/cabal/bin/ for unix builds. To specify another folder, install with

cabal install --installdir=DIR

Using feynopt

Feynman currently has frontends for openQASM and .qc. Examples of both can be found in the benchmarks folder.

To run the Feynman optimizer feynopt on a .qc or openQASM file, execute the command

feynopt <filename>.(qc | qasm)

feynopt automatically recognizes the extensions .qc and .qasm as .qc and openQASM files, respectively.

For a list of all available optimizations and transformations, use the command

feynopt -h

Using feynver

The feynver binary tool allows for equivalence checking of separate circuit files. Standard usage is

feynver <filename1>.qc <filename2>.qc

The input circuits must agree on the names of the primary inputs (i.e. non-initialized qubits), but they may use different ancillas.

Note: feynver currently only supports the .qc frontend

Benchmarks

The Feynman repository comes with a suite of quantum circuit benchmarks, found in the benchmarks folder. For more information on the benchmarks the user is directed to Formal Methods in Quantum Circuit Design.

The benchmark suite also includes example openQASM circuits, taken from the openQASM github repository.

Citing

Feynman is a collection of algorithms and techniques spanning a number of papers. If you wish to cite in an academic paper, the relevant papers are listed below.

Authors

Matthew Amy

feynman's People

Contributors

meamy 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.