Skip to main content

Python SDK to BlueQubit app

Project description

Quick Start

  1. Register on https://app.bluequbit.io and copy the API token.

  2. Install Python SDK from PyPI:

    pip install bluequbit
  1. An example of how to run a Qiskit circuit using the SDK:
    import qiskit

    import bluequbit

    bq_client = bluequbit.init("<token>")

    qc_qiskit = qiskit.QuantumCircuit(2)
    qc_qiskit.h(0)
    qc_qiskit.x(1)

    job_result = bq_client.run(qc_qiskit, job_name="testing_1")

    state_vector = job_result.get_statevector() 
    # returns a NumPy array of [0. +0.j 0. +0.j 0.70710677+0.j 0.70710677+0.j]
  1. An example of how to run a Pennylane circuit:
    import pennylane as qml
    from pennylane import numpy as np
    
    dev = qml.device('bluequbit.cpu', wires=1, token="<token>")
    
    @qml.qnode(dev)
    def circuit(angle):
        qml.RY(angle, wires=0)
        return qml.probs(wires=0)
    
    
    probabilities = circuit(np.pi / 4)
    # returns a NumPy array of [0.85355339 0.14644661]

To use the Pennylane plugin, you must have pennylane version 0.37 or above installed.

  1. This SDK requires Python versions 3.9 or above. But we recommend using Python 3.10 or above. The package is tested extensively on Python 3.10.

Full reference

Please find detailed reference at https://app.bluequbit.io/sdk-docs.

Questions and Issues

Please submit questions and issues to info@bluequbit.io.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

bluequbit-0.9.0b1.post6.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

bluequbit-0.9.0b1.post6-py3-none-any.whl (43.6 kB view details)

Uploaded Python 3

File details

Details for the file bluequbit-0.9.0b1.post6.tar.gz.

File metadata

  • Download URL: bluequbit-0.9.0b1.post6.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for bluequbit-0.9.0b1.post6.tar.gz
Algorithm Hash digest
SHA256 4035e72e2432768d4ceaabfa4ba98b5d267ee3c89e00ac21786a5e5a3317853c
MD5 83772d201e7d423e0d5b520360d87edb
BLAKE2b-256 6b46b4ca3261ef9147e6d54c3e6cd815c0d0724eba8bfc2cf5e9d614cdc31dc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for bluequbit-0.9.0b1.post6.tar.gz:

Publisher: release.yml on BlueQubitDev/bluequbit-python-sdk

Attestations:

File details

Details for the file bluequbit-0.9.0b1.post6-py3-none-any.whl.

File metadata

File hashes

Hashes for bluequbit-0.9.0b1.post6-py3-none-any.whl
Algorithm Hash digest
SHA256 e2418d9d2fbd008c319009331996fb57a7c45b5344ad963ee9fc93a41a3a37bd
MD5 27b18ee7287147169bdf77ca6e12dde2
BLAKE2b-256 cc02508d90b91b38000a1889c142338bf9a977eb662e3dfc0c610bbc9042c9f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for bluequbit-0.9.0b1.post6-py3-none-any.whl:

Publisher: release.yml on BlueQubitDev/bluequbit-python-sdk

Attestations:

Supported by

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