Coder Social home page Coder Social logo

aaelsharkawy / xacc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from eclipse/xacc

0.0 0.0 0.0 49.68 MB

XACC - eXtreme-scale Accelerator programming framework

Home Page: https://xacc.readthedocs.io

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

Shell 0.02% C++ 96.58% Python 1.01% C 0.70% Verilog 0.01% ANTLR 0.09% Makefile 0.05% CMake 1.31% Dockerfile 0.11% Vim Script 0.01% OpenQASM 0.13%

xacc's Introduction

XACC

Branch Status
master Linux CI Mac CI
devel Linux CI Mac CI

Language and Hardware Independent Quantum Programming Framework

XACC is an extensible compilation framework for hybrid quantum-classical computing architectures. It provides extensible language frontend and hardware backend compilation components glued together via a novel quantum intermediate representation. XACC currently supports quantum-classical programming and enables the execution of quantum kernels on IBM, Rigetti, and D-Wave QPUs, as well as a number of quantum computer simulators.

Documentation

Quick Start

Click Gitpod Ready-to-Code to open up a pre-configured Eclipse Theia IDE. You should immediately be able to run any of the C++ or Python examples from the included terminal:

[example C++ executables are in build/quantum/examples/*]
$ build/quantum/examples/qasm/deuteron_from_qasm

[example Python scripts are in python/examples/*]
$ python3 python/examples/deuteronH2.py

[run some XACC benchmarks]
$ python3 -m xacc --benchmark python/benchmark/chemistry/benchmarks/nah_ucc1.ini 

All code is here and you can quickly start developing. We recommend turning on file auto-save by clicking File > Auto Save . Note the Gitpod free account provides 100 hours of use for the month, so if you foresee needing more time, we recommend our nightly docker images.

The XACC nightly docker images also serve an Eclipse Theia IDE on port 3000. To get started, run

$ docker run --security-opt seccomp=unconfined --init -it -p 3000:3000 ghcr.io/eclipse/xacc/xacc:latest

Navigate to https://localhost:3000 in your browser to open the IDE and get started with XACC.

Build from Source

Full installation details can be followed here.

Ensure that you have installed CMake 3.12+, a C++17 compliant compiler (GCC 8+, Clang 5+), and CURL development headers and libraries with OpenSSL support (see prerequisites).

It is also recommended (though optional) that you install BLAS and LAPACK development libraries (for various simulators), Python 3 development headers (for the Python API), and Libunwind (for stack trace printing).

To enable XACC Python support, ensure that python3 is set to your desired version of Python 3. CMake will find the corresponding development headers. Ensure that when you try to run XACC-enabled Python scripts you are using the same python3 executable that was set during your build.

Clone the repository recursively, configure with cmake and build with make

$ git clone https://github.com/eclipse/xacc
$ cd xacc && mkdir build && cd build
[default cmake call]
$ cmake ..
[with tests and examples]
$ cmake .. -DXACC_BUILD_EXAMPLES=TRUE -DXACC_BUILD_TESTS=TRUE
[now build xacc]
$ make install
[for a speedier build on linux]
$ make -j$(nproc --all) install
[and on mac os x]
$ make -j$(sysctl -n hw.physicalcpu) install
[if built with tests, run them]
$ ctest --output-on-failure

CMake options:

  • XACC_DEPS_EXTERNAL: [Optional, default = OFF] XACC to search externally for its third-party dependencies. When turning on, XACC will try to use find_package to locate its required dependencies before falling back to using the builtin submodules in tpls.

    Note: when turning on this flag, it is your responsibility to manage the compatibility of those tpls. For example, XACC compilation may fail if the externally-installed library version is incompatible with the builtin one.

See full documentation for all CMake optional arguments.

Your installation will be in $HOME/.xacc. If you built with the Python API, be sure to update your PYTHONPATH environment variable to point to the installation:

$ export PYTHONPATH=$PYTHONPATH:$HOME/.xacc

You will probably want the XACC default simulator, TNQVM. To install, run the following:

$ git clone https://github.com/ornl-qci/tnqvm
$ cd tnqvm && mkdir build && cd build
$ cmake .. -DXACC_DIR=~/.xacc
$ make install

Questions, Bug Reporting, and Issue Tracking

Questions, bug reporting and issue tracking are provided by GitHub. Please report all bugs by creating a new issue with the bug tag. You can ask questions by creating a new issue with the question tag.

License

XACC is dual licensed - Eclipse Public License and Eclipse Distribution License.

Cite XACC

If you use XACC in your research, please use the following citation

@article{xacc_2020,
	doi = {10.1088/2058-9565/ab6bf6},
	url = {https://doi.org/10.1088%2F2058-9565%2Fab6bf6},
	year = 2020,
	month = {feb},
	publisher = {{IOP} Publishing},
	volume = {5},
	number = {2},
	pages = {024002},
	author = {Alexander J McCaskey and Dmitry I Lyakh and Eugene F Dumitrescu and Sarah S Powers and Travis S Humble},
	title = {{XACC}: a system-level software infrastructure for heterogeneous quantum{\textendash}classical computing},
	journal = {Quantum Science and Technology}
}

xacc's People

Contributors

1tnguyen avatar danclaudino avatar zpparks314 avatar wrathfulspatula avatar ausbin avatar flatslm avatar joehellmers avatar kharazity avatar travishumble avatar mileschen360 avatar jeriimiah avatar spowers avatar amccaskey avatar amrutn avatar angusmingare avatar dmitrylyakh avatar czhao39 avatar nmoran avatar rsoftone avatar rsand17 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.