Skip to main content

Bosonic Qiskit

NQI C2QA project to simulate hybrid boson-qubit systems within QisKit.

Install

Use a Python virtual environment to install compatible version of QisKit.

git clone https://github.com/C2QA/bosonic-qiskit.git
cd bosonic-qiskit
./install-dependencies.sh

Dependency Version Compatibility

The Bosonic Qiskit software has not been extensively tested with different versions of its dependencies; however, some success has been achieved with both newer and older versions of Qiskit. Do note that some features require newer versions. For example, the noise modelling requires Qiskit v0.34.2+. Using older versions will cause ModuleNotFoudError at runtime.

Activate Virtual Environment

Before using Bosonic Qiskit, first install the depencies (as above) and then activate the Python virtual environment.

cd <path/to/bosonic-qiskit>
source venv/bin/activate

Tutorials

Jupyter Notebook tutorials can be found in the tutorials folder. JupyterLab is a dependency found in requirements.txt, so after installing and activating the virtual environment, to run the tutorials simply start Jupyter with jupyter lab and then navigate to the desired tutorial.

See our paper presented at IEEE HPEC 2022 on arXiv for more information on using bosonic-qiskit.

How to add gates

The code is structured to separate generation of the operator matrices from creating instances of QisKit Gate.

The first step in adding a new gate is to develop software to build a unitary operator matrix. These matrices must be unitary in order for QisKit to simulate them. Non unitary matrices will fail during simulation. Existing operator matrices are built in the CVOperators class found in operators.py. Included in CVOperators are functions to build the bosonic creation and annihilation operators based on a provided cutoff. The order of the data in your operators must match the order of the qumodes (QisKit qubits) sent in as QisKit gate parameters found in circuit.py, as described next.

Once you've written software to build the operator matrix, a new function is added to the CVCircuit class found in circuit.py. This class extends the QisKit QuantumCircuit class to add the bosonic gates available in this library. The previusly defined operators are parameterized by user input, as needed, and appended to the QuantumCircuit as unitary gates. The CVCircuit class includes functions to easily make your new gates conditional based on a control qubit.

See examples of software building new gates in the previously mentioned operators.py and circuit.py. Examples using the library's gates can be found in both the PyTest test cases and Jupyter Notebook tutorials folders

Available Gates

Current gates available for simulation are documented at https://c2qa.github.io/bosonic-qiskit/c2qa.circuit.CVCircuit.html

Metadata

Release files for bosonic-qiskit 13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bosonic-qiskit 13
File Size Uploaded Provenance Actions
bosonic_qiskit-13.tar.gz 46.8 kB Without provenance Details for bosonic_qiskit-13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bosonic-qiskit 13
File Interpreter ABI Platform Actions
bosonic_qiskit-13-py3-none-any.whl Python 3 none any Details for bosonic_qiskit-13-py3-none-any.whl

Total release size: 84.4 kB

Release files / bosonic_qiskit-13.tar.gz

Download URL bosonic_qiskit-13.tar.gz
Size 46.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e47014ebcd5f88b9e6323ada9e9a3c0f8409426e61f112964ce4214342822d0d
BLAKE2b-256 checksum
How to use checksums
fc29b70fef36e06a2fa0c0a6a0515e191090cd1542227216b7ed8e1f91df78d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / bosonic_qiskit-13-py3-none-any.whl

Download URL bosonic_qiskit-13-py3-none-any.whl
Size 37.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
870c80e89e414452ca5ea746f120e471e66241a7a5fa87c65d57f54fde737fcc
BLAKE2b-256 checksum
How to use checksums
56cb6176a4d039ae80c164a8d2ae1e2158ec2e93f603bb84a2a0e070ac026f91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Security for bosonic-qiskit 13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

13 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page