lavanya-m-k / qcor

C++ compiler for heterogeneous quantum-classical computing built on Clang and XACC

Home Page:http://docs.aide-qc.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

qcor

master
pipeline status

QCOR

QCOR is a C++ language extension and associated compiler implementation for hybrid quantum-classical programming.

Documentation

Install

To install qcor run the following command from your terminal

/bin/bash -c "$(curl -fsSL https://aide-qc.github.io/deploy/install.sh)"

To use the Python API, be sure to set your PYTHONPATH. For more details, see here.

Nightly docker images are also available that serve up a Theia IDE on port 3000. To use this image, run

docker run --security-opt seccomp=unconfined --init -it -p 3000:3000 qcor/qcor

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

For any method of installation, a good way to test your install is to copy and paste the following into your terminal

printf "__qpu__ void f(qreg q) {
  H(q[0]);
  Measure(q[0]);
}
int main() {
  auto q = qalloc(1);
  f(q);
  q.print();
}  " | qcor -qpu qpp -shots 1024 -o test -x c++ -

and then run

./test

Cite QCOR

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

@ARTICLE{qcor,
       author = {{Nguyen}, Thien and {Santana}, Anthony and {Kharazi}, Tyler and
         {Claudino}, Daniel and {Finkel}, Hal and {McCaskey}, Alexander},
        title = "{Extending C++ for Heterogeneous Quantum-Classical Computing}",
      journal = {arXiv e-prints},
     keywords = {Quantum Physics, Computer Science - Mathematical Software},
         year = 2020,
        month = oct,
          eid = {arXiv:2010.03935},
        pages = {arXiv:2010.03935},
archivePrefix = {arXiv},
       eprint = {2010.03935},
 primaryClass = {quant-ph},
       adsurl = {https://ui.adsabs.harvard.edu/abs/2020arXiv201003935N},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

About

C++ compiler for heterogeneous quantum-classical computing built on Clang and XACC

http://docs.aide-qc.org

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


Languages

Language:C++ 77.5%Language:OpenQASM 12.2%Language:Python 5.4%Language:CMake 2.9%Language:ANTLR 1.4%Language:Dockerfile 0.2%Language:Q# 0.2%Language:Shell 0.1%Language:C 0.0%