Skip to main content

Python SDK to BlueQubit app

Project description

BlueQubit Python SDK

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 using the SDK:

To use the Pennylane plugin, you must have pennylane>=0.35 version installed. It requires Python 3.9, but we recommend using Python 3.10 . Make sure your Python version is not older

    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]

The packages 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.8.1b1.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

bluequbit-0.8.1b1-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file bluequbit-0.8.1b1.tar.gz.

File metadata

  • Download URL: bluequbit-0.8.1b1.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for bluequbit-0.8.1b1.tar.gz
Algorithm Hash digest
SHA256 832f9c5b3f50c594659e470af5fda3fd33b0ebd5a3c5af40922db94eba314b86
MD5 a10ff697c0f6d4a5e5dbe309a8c1f176
BLAKE2b-256 d2e01b391b4a79deff4d92623adb119610022198c077942a3bc55f55b46d6ce4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bluequbit-0.8.1b1-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for bluequbit-0.8.1b1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c6bd231f46db2a336fe1de0498f9faeafe2a3d13e8efda5e9568615c127e2a7
MD5 5865af1ca9eafac2ab67ae8f8b29013a
BLAKE2b-256 ed6785f840b1485637f3f2a13ec40ce9282e52f81c9cc7072265b988977807eb

See more details on using hashes here.

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