Skip to main content

"Orquestra's library with basic quantum operations"

Project description

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

Project details


Download files

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

Source Distribution

orquestra-quantum-0.6.0.tar.gz (136.8 kB view details)

Uploaded Source

File details

Details for the file orquestra-quantum-0.6.0.tar.gz.

File metadata

  • Download URL: orquestra-quantum-0.6.0.tar.gz
  • Upload date:
  • Size: 136.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for orquestra-quantum-0.6.0.tar.gz
Algorithm Hash digest
SHA256 011b02f2cb45b401cb85b24cd377131b6964bb0c25e417db0cc0f549ed6f34f8
MD5 3e41335319ae6908557a632f6b6354dc
BLAKE2b-256 8b240e4d2efcd9989f1a3af77a92206e09b4ee9970c246d6547958e3ba3a5c01

See more details on using hashes here.

Supported by

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