Giter Site home page Giter Site logo

ck-projectq's Introduction

ck-projectq

Travis Build Status

ProjectQ official documentation.

Installation (on Ubuntu)

Install global prerequisites, Python and its pip (Python2 is also supported)

$ sudo apt-get install build-essential python3 python3-pip

Install Collective Knowledge

$ sudo pip3 install ck

Installation (on MacOSX)

Install global prerequisites, Python and its pip (Python2 is also supported)

$ brew install wget python pip

Install Collective Knowledge

$ pip install ck

Common part of the installation

Install this CK repository with all its dependencies (other CK repos to reuse artifacts)

$ ck pull repo:ck-projectq

List all the packages available

$ ck list ck-projectq:package:*

Install CK package for ProjectQ

$ ck install package:lib-projectq

By default CK tries to compile ProjectQ and C++-Simulator. In order to use the (slow) Python simulator:

$ ck install package:lib-projectq --env.USE_PYTHON_SIM=1

Run Programs

List all programs available

$ ck list ck-projectq:program:*

ProjectQ Demo/example client

$ ck run program:projectq-demo

How to specify a specific bechmark

$ ck run program:projectq-demo --cmd_key=teleport

How to set-up a CK variable for a given command

$ ck run program:projectq-demo --cmd_key=shor --env.CK_SHOR_INPUT=15

Other options

Simulator is a compiler engine which simulates a quantum computer using C++-based kernels. OpenMP is enabled and the number of threads can be controlled using the OMP_NUM_THREADS environment variable.

$ ck run program:projectq-demo --cmd_key=shor --env.CK_SHOR_INPUT=101 --env.OMP_NUM_THREADS=16
$ ck run program:projectq-shor --cmd_key=shor --env.CK_SHOR_INPUT=101 --env.CK_PROJECTQ_IBM_DEVICE=ibmqx4

FAQ

Where does CK store my program and its output?

A program can be located on disk by its name as follows:

$ ck find program:projectq-shor
/home/flavio/CK-REPOS/ck-quantum-private/program/projectq-shor
$ ls `ck find program:projectq-shor`
quantum_random_numbers.py  shor.py

Temporary files (including the executable, stderr and stdout) are in the tmp directory:

$ cd `ck find program:projectq-shor`/tmp

Troubleshooting

ck-projectq's People

Contributors

ens-lg4 avatar psyhtest avatar

Watchers

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