Skip to main content

Qonscious is a runtime framework designed to support conditional execution of quantum circuits based on resource introspection. It helps you build quantum applications that are aware of backend conditions — such as entanglement, coherence, or fidelity — before execution.

Project description

CI

Qonscious is a runtime framework designed to support conditional execution of quantum circuits based on resource introspection. It helps you build quantum applications that are aware of backend conditions — such as entanglement, coherence, or fidelity — before execution.

Why Qonscious?

In the NISQ era, quantum hardware is noisy, resource-limited, and variable over time. Static resource assumptions lead to unreliable results. Qonscious makes quantum programs introspective and adaptive.

For a deeper discusion on the motivation behind Qonscious, read our article

Key Features

  • Figures of Merit evaluation (e.g., get CHSH score)
  • Conditional execution on compliance with figures of merit checks
  • Inversion of control: pass a callback, not a circuit
  • Built-in logging, extensibility, and fallback logic

Use cases

These are some scenarios where you may use Qonscious:

  • Run a circuit conditional on your target computer (or simulator) checking some figures of merit (e.g., number of qubits, CHSH score, etc.)
  • Benchmark a computer (or simulator) in terms of a collection of figures of merit.
  • Explore correlations between experiment results and figures of merit of a gicen computer (or simulator)
  • ...

Setting up dependencies

This project is organized with a pyproject.toml file, so there is no longer a need for a requirements.txt file.

Python version is set in .python-version

We recommend working in a Python virtual environment. The following snippet of code provides examples of most of the tasks you'll need to complete.

python -m venv .venv 
source .venv/bin/activate
pip install -U pip wheel
pip install -e ".[dev,notebooks,viz,docs]" # you can leave notebooks and viz out of you are only working on the framework.

The -e flag in pip install tells pip to install Qonscious as a dependency so you can import from any Jupyter notebook working on the same venv while lettig you edit the framework.

Documentation

Up to date documentation is available on github pages

Examples

The notebooks folder contains several examples of using Qonscious in different use cases.

We suggest you start with chsh_test_demo.ipynb

Development notes

VisualStudio Code

There is a _vscode_example_settings.json file that you can rename to .vscode/settings.json . It provides most default settings that help VSC find tests, work with notebooks, etc.

ruff

pyproject.toml includes default configurations for ruff (linting, etc.). Ruff is part of the [dev] dependencies.

To use ruff from the command line (and let ruff format, and tidy up code), do as follows:

ruff check . --fix
ruff format .

pyright

This project uses pyright as a typechecker (In VSCode it will work via PyLance).

Settings are defined in pyrightconfig.json

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

qonscious-0.1.1.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qonscious-0.1.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file qonscious-0.1.1.tar.gz.

File metadata

  • Download URL: qonscious-0.1.1.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for qonscious-0.1.1.tar.gz
Algorithm Hash digest
SHA256 da9d5869a8254ddd6a7ff8493982b3fd698253e0dfe1ffbf528a91b80382a1ec
MD5 a67d1a054ba516b3370a446a1d9943a6
BLAKE2b-256 0693473296669f4bc3f0c8d89b0712ef1594fa9ed989e68ff14f207596eba19e

See more details on using hashes here.

File details

Details for the file qonscious-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: qonscious-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for qonscious-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 637085f25a20f3cc2b80ce03aad2ee6815956396b9e22e2546a991ecc242bb2f
MD5 b4dff6181821872340849d72beb35387
BLAKE2b-256 eb0e7cd883c85926c324f88a4e22944a664f7fd9755ffe972c3446fe641ba3ce

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