Quantum Computing - Quickstart
Scaleway Quantum Computing platform allows you to access and program Quantum Processing Units (QPUs).
This service has a simple ambition: to unify access to quantum computing.
No more juggling between different accounts, proprietary SDKs, or complex queues. From a single interface and with a single API key, you get access to:
- Real QPUs: Execute your code on physical machines from our European partners (AQT, IQM, Quandela, Pasqal).
- High-Performance emulators: Accelerate your quantum circuit prototyping using our Scaleway infrastructure, faster and bigger than your local laptop.
This guide shows you how to execute your first "Hello World" circuit (a Bell State) on any backend available via Qiskit.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account with a valid Project ID.
- A Scaleway API Key (Secret Key).
- Python and
qiskitinstalled on your local machine
-
Install the
qiskit-scalewayprovider. Refer to the Qiskit Scaleway GitHub repository for more information.pip install qiskit-scaleway -
Create a file with the following computation script. Replace
$SCW_PROJECT_IDand$SCW_SECRET_KEYwith your Scaleway Project ID and secret key. Change theBACKEND_NAMEvariable to switch from one technology to another
from qiskit import QuantumCircuit
from qiskit_scaleway import ScalewayProvider
# 1. Initialize the Provider
# Ensure you have your credentials ready
provider = ScalewayProvider(
project_id="$SCW_PROJECT_ID",
secret_key="$SCW_SECRET_KEY"
)
# 2. Choose your plaform:
# Emulators (Low cost, fast, ideal for testing)
# backend_name = "EMU-AER-H100" # Qiskit Aer emulator on GPU H100
# backend_name = "EMU-QSIM-H100" # Google Qsim emulator on GPU H100
# Real QPUs (For science, billed per shot)
# backend_name = "QPU-IBEX-12PQ" # AQT (Trapped-ions qubits)
backend_name = "QPU-GARNET-20PQ" # IQM (Transmons qubits)
# 3. Retrieve the platform
# Example platform ID: 'EMU-AER-2L40S' (Aer emulator using an Nvidia H100 GPU)
backend = provider.get_backend(backend_name)
# 3. Create a Quantum Circuit
# Let's create a Bell state with measurement
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.measure_all()
# 4. Execute on remote emulator
# The job is sent to Scaleway, executed on the GPU, and results are returned compressed.
job = backend.run(qc, shots=1000)
# 5. Get Results
result = job.result()
print("Results:", result)-
Save the script. In this example we save it as
computation.py. -
Run the script.
python ~/computation.py