A Pennylane-compatible package to run pennylane circuits on Scaleway Quantum as a Service
Project description
Pennylane's integration with Scaleway Quantum-as-a-Service
Scaleway provider implementation for Pennylane SDK (Quantum Machine Learning Framework).
Pennylane-Scaleway is a Python package to run pennylane's QML circuits on Scaleway infrastructure, providing access to:
- Aer state vector and tensor network multi-GPU emulators
- AQT ion-trapped quantum computers
- Coming Soon! IQM superconducting quantum computers
More info on the Quantum service web page.
Installation
We encourage installing Scaleway provider via the pip tool (a Python package manager):
pip install pennylane-scaleway
Getting started
To run your pennylane's circuits on Scaleway's quantum backends, simply change your device's name and add your project_id and secret_key:
import pennylane as qml
device = qml.device("scaleway.aer",
wires=2,
project_id=<your-project-id>,
secret_key=<your-secret-key>,
backend="EMU-AER-16C-128M"
)
@qml.set_shots(512)
@qml.qnode(device)
def my_circuit():
qml.Hadamard(wires=0)
qml.CNOT(wires=[0, 1])
return qml.counts()
print(my_circuit())
device.stop() # Don't forget to close the session when you're done!
You can also use the device as a context manager so your session is automatically closed when exiting the context:
import pennylane as qml
with qml.device("scaleway.aer",
wires=2,
project_id=<your-project-id>,
secret_key=<your-secret-key>,
backend="EMU-AER-16C-128M"
) as dev:
@qml.set_shots(512)
@qml.qnode(dev)
def circuit():
qml.Hadamard(wires=0)
qml.CNOT(wires=[0, 1])
return qml.counts()
print(circuit())
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()
## Development
This repository is in a very early stage and is still in active development. If you are looking for a way to contribute please read [CONTRIBUTING.md](CONTRIBUTING.md).
## Reach us
We love feedback. Feel free to reach us on [Scaleway Slack community](https://slack.scaleway.com/), we are waiting for you on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource)..
## License
[License Apache 2.0](LICENSE)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pennylane_scaleway-0.2.0.tar.gz.
File metadata
- Download URL: pennylane_scaleway-0.2.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66480ae57dd0d6e3ff750e034d44c395f9a7731a7a6d7d9f768c7d138409cf1f
|
|
| MD5 |
8bfb9679823f118a6a35c32da6f707ea
|
|
| BLAKE2b-256 |
244b57419314faea8c4c2edd251c058eaad59402a8fb624b37e302dd3081062f
|
File details
Details for the file pennylane_scaleway-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pennylane_scaleway-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26792e107319564d596be1639c8d4332b9f5593efc142a603e0be8edd898c15d
|
|
| MD5 |
2637f7a609591559a6ff57171d68ee2a
|
|
| BLAKE2b-256 |
29c899fc5ccabc98ffb2558521b04c3274a010ee11aaefeb6f596b06605ad33c
|