Skip to main content

qxelarator Python Package

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

qxelarator-0.4.2-cp39-cp39-win_amd64.whl (2.7 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

qxelarator-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

qxelarator-0.4.2-cp39-cp39-macosx_10_14_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

qxelarator-0.4.2-cp38-cp38-win_amd64.whl (2.7 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

qxelarator-0.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

qxelarator-0.4.2-cp38-cp38-macosx_10_14_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

qxelarator-0.4.2-cp37-cp37m-win_amd64.whl (2.7 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

qxelarator-0.4.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

qxelarator-0.4.2-cp37-cp37m-macosx_10_14_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 3.7m macOS 10.14+ x86-64

qxelarator-0.4.2-cp36-cp36m-win_amd64.whl (2.7 MB view hashes)

Uploaded CPython 3.6m Windows x86-64

qxelarator-0.4.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

qxelarator-0.4.2-cp36-cp36m-macosx_10_14_x86_64.whl (2.5 MB view hashes)

Uploaded CPython 3.6m macOS 10.14+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page