Skip to main content

('A Qiskit package to simulate and connect to Scaleway Quantum as a Service',)

Project description

Scaleway provider for Qiskit

Qiskit Scaleway is a Python package to run quantum circuits on Scaleway infrastructure, providing access to Aer and Qsim simulators on powerful hardware (CPU and GPU).

To run circuits over Quandela backends provided by Scaleway, you must use Perceval SDK through the Scaleway provider.

More info on the Quantum service web page.

Installation

We encourage installing Scaleway provider via the pip tool (a Python package manager):

pip install qiskit-scaleway

Getting started

To instantiate the ScalewayProvider, you need to have an access token and a project_id

from qiskit import QuantumCircuit
from qiskit_scaleway import ScalewayProvider

provider = ScalewayProvider(
    project_id="<your-scaleway-project-id>",
    secret_key="<your-scaleway-secret-key>",
)

Alternatively, the Scaleway Provider can discover your access token from environment variables or from your .env file

export QISKIT_SCALEWAY_PROJECT_ID="project_id"
export QISKIT_SCALEWAY_API_TOKEN="token"

Then you can instantiate the provider without any arguments:

from qiskit import QuantumCircuit
from qiskit_scaleway import ScalewayProvider

provider = ScalewayProvider()

Now you can have acces to the supported backends:

# List all operational backends
backends = provider.backends(operational=True)
print(backends)

# List all backends with a minimum number of qbits
backends = provider.backends(min_num_qubits=35)
print(backends)

# Retrieve a backend by providing search criteria. The search must have a single match
backend = provider.get_backend("aer_simulation_h100")

Define a quantum circuit and run it

# Define a quantum circuit that produces a 4-qubit GHZ state.
qc = QuantumCircuit(4)
qc.h(0)
qc.cx(0, 1)
qc.cx(0, 2)
qc.cx(0, 3)
qc.measure_all()

# Create and send a job to a new QPU's session (or on an existing one)
result = backend.run(qc, method="statevector", shots=1000).result()

if result.success:
    print(result.get_counts())
else:
    print(result.to_dict()["error"])

Development

This repository is at its early stage and is still in active development. If you are looking for a way to contribute please read CONTRIBUTING.md.

Reach us

We love feedback. Feel free to reach us on Scaleway Slack community, we are waiting for you on #opensource..

License

License Apache 2.0

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

qiskit_scaleway-0.1.17.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

qiskit_scaleway-0.1.17-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file qiskit_scaleway-0.1.17.tar.gz.

File metadata

  • Download URL: qiskit_scaleway-0.1.17.tar.gz
  • Upload date:
  • Size: 16.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for qiskit_scaleway-0.1.17.tar.gz
Algorithm Hash digest
SHA256 4db9dd9ad0acf11a83bcd38b24cf2ae69911ae9b3dc1c417a2d44d25f4006fb4
MD5 8b2d1185ff8d9bd0316c325e234327ae
BLAKE2b-256 0f57c8a15fda084a2ae9dbd0290020db4adf373e3db199241e39efc0b0621510

See more details on using hashes here.

File details

Details for the file qiskit_scaleway-0.1.17-py3-none-any.whl.

File metadata

File hashes

Hashes for qiskit_scaleway-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 bcaa3ef4198b78f4c4ed5768642944def2ed8ed32f4fbc13b5bbcbb289a7b5ad
MD5 98cac503002fd2cb6f1bf3f83abc4cf0
BLAKE2b-256 0356ab1abd98040ba1c32cf9820f002c25e297b8e706ce7cd02a0324ec0a2df7

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