GithubHelp home page GithubHelp logo

python-repository-hub / qx-simulator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qutech-delft/qx-simulator

0.0 0.0 0.0 11.75 MB

QX Simulator

License: Other

C++ 86.20% Python 4.03% C 1.02% CMake 6.64% SWIG 0.08% OpenQASM 2.00% Q# 0.04%

qx-simulator's Introduction

QX Simulator

A universal quantum computer simulator.

Dependencies

QX should work on the following platforms.

  • Linux
  • Windows
  • MacOS

For compilation, you need the following things.

  • A C++ compiler with C++11 and OpenMP support (GCC for Linux, LLVM/clang for MacOS, MSVC 2015 with update 3 or above for Windows)
  • cmake (>= 3.13)
  • flex (>= 2.6.1)
  • bison (>= 3.0)

For the QXelarator Python module, you also need the following.

  • swig (Linux/MacOS >= 3.0.12; Windows >= 4.0.0)
  • python (>= 3.5) [for python interface to QX]

Installation

To build run the following in the current directory:

mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=<desired_install_path>
cmake --build .
cmake --target install # Linux/MacOS
cmake --target INSTALL # Windows

<desired_install_path> must be an absolute path to where you want to install QX.

QXelarator: QX as a Quantum Accelerator

QXelarator (note the typo; sorry) is the python interface to QX simulator, which is perhaps the easiest way to start simulating quantum circuits.

API

qxelarator mainly provides the following API calls:

qx.set('basic.qasm')            # set the required qasm to be executed on qx
qx.execute()                    # execute
qx.get_measurement_outcome(0)   # get measurement results from qubit 'n' as bool
get_state()                     # get quantum register state as string

Installation

The easiest way to get QXelarator running on your machine is to use a pre-built wheel. These are available for 64-bit Windows, Linux and OSX, for all currently active Python versions. You can install them as follows.

python3 -m pip install qxelarator --user

Alternatively, you can build and install from source using

python3 -m pip install -v -e .

The latter might run faster on your machine, as it allows the compiler to optimize for your particular CPU. The PyPI binaries assume that only SSE3 is available.

Licensing

QX is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

qx-simulator's People

Contributors

andreasppg avatar astlaan avatar cumulonimbuscalvus avatar imranashraf avatar jvanstraten avatar kel85uk avatar maxim-masterov avatar mmoelle1 avatar nader-khammassi avatar qfer avatar quantumkoen avatar razvnane avatar soudy 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.