GithubHelp home page GithubHelp logo

aaron-robertson / orquestra-quantum Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zapata-engineering/orquestra-quantum

0.0 0.0 0.0 1.5 MB

License: Apache License 2.0

Python 99.65% Makefile 0.35%

orquestra-quantum's Introduction

orquestra-quantum

What is it?

orquestra-quantum is a library with core functionalities for quantum computing developed by Zapata for our Orquestra platform.

orquestra-quantum provides:

  • core functionalities required to run experiments, such as the Circuit class.
  • interfaces for implementing other Orquestra modules, such as quantum backends.
  • basic data structures and functions for quantum computing.

Installation

Even though it's intended to be used with Orquestra, orquestra-quantum can be also used as a standalone Python module. To install it, you just need to run pip install . from the main directory.

Usage

Here's an example of how to use methods from orquestra-quantum to run a circuit locally. The program runs a circuit with a single Hadamard gate 100 times and returns the results:

from orquestra.quantum.circuits import H, Circuit
from orquestra.quantum.symbolic_simulator import SymbolicSimulator

def orquestra_quantum_example_function()
    circ = Circuit([H(0)])
    sim = SymbolicSimulator()
    nsamples = 100
    measurements = sim.run_circuit_and_measure(circ, nsamples)
    return measurements.get_counts()

Development and Contribution

To install the development version, run pip install -e '.[dev]' from the main directory. (if using MacOS, you will need single quotes around the []. If using windows, or Linux, you might not need the quotes).

We use Google-style docstring format. If you'd like to specify types please use PEP 484 type hints instead adding them to docstrings.

There are codestyle-related Github Actions running for PRs.

  • If you'd like to report a bug/issue please create a new issue in this repository.
  • If you'd like to contribute, please create a pull request to main.

Running tests

Unit tests for this project can be run using make coverage command from the main directory. Alternatively you can also run pytest ..

Style

We are using automatic tools for style and type checking. In order to make sure the code is compliant with them please run: make style from the main directory (this requires dev dependencies).

orquestra-quantum's People

Contributors

mstechly avatar shiro-raven avatar simonwa7 avatar max-radin avatar jgonthier avatar alexjuda avatar dexter2206 avatar akataba avatar laurgao avatar pediejo avatar sabeegrewal avatar aakunitsa avatar martamau avatar mbeach42 avatar msrudolph 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.