A Cirq package to simulate and connect to Scaleway Quantum as a Service
Project description
Cirq is a Python library for writing, manipulating, and optimizing quantum circuits and running them against quantum computers and simulators.
This module is cirq-scaleway, which provides everything you’ll need to run Cirq quantum algorithms on Scaleway Quantum as a Service (QaaS).
Documentation
To get started with Scaleway Quantum as a Service (QaaS), checkout the following guide and tutorial:
You must be have an account and be logged into the Scaleway console
You have create an API key with enough permission to use QaaS
Installation
To install the stable version of only cirq-scaleway:
>>> pip install cirq-scaleway
Note, that this will install both cirq-scaleway and cirq-core.
To get all the optional modules installed, you’ll have to use pip install cirq or pip install cirq~=1.0.dev for the pre-release version.
Getting started
In the most simple way, here the code to use cirq-scaleway:
>>> import cirq >>> from cirq_scaleway import ScalewayQuantumService
>>> service = ScalewayQuantumService( project_id="<your-scaleway-project-id>", secret_key="<your-scaleway-secret-key>" )
>>> # Get and display all provided (real or simulated) devices compatible with Cirq >>> devices = service.devices(min_num_qubits=34) >>> print(devices)
>>> # Get a specific device by its name >>> qsim_simulator = service.device(name="qsim_simulation_c64m512")
>>> # Create a device session and run a circuit against it >>> with qsim_simulator.create_session() as session: >>> qubit = cirq.GridQubit(0, 0) >>> circuit = cirq.Circuit(cirq.X(qubit) ** 0.5, cirq.measure(qubit, key='m'))
>>> # Run the circuit on the device >>> result = session.run(circuit) >>> print(result)
Reach us
We love feedback. Feel free to reach us on Scaleway Slack community, we are waiting for you on #opensource.
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
File details
Details for the file cirq-scaleway-0.1.3.tar.gz
.
File metadata
- Download URL: cirq-scaleway-0.1.3.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb7f0bb3a768ccba3aa4a0188f1e9155556a22820a2e341bb859be02c864da66 |
|
MD5 | 8f0192ef5b2d9c42f37acfc1553384a6 |
|
BLAKE2b-256 | 97777ff3536c08b5d251b2c327570092e7d7c2861f72e80c71a4cdbdc004631c |
File details
Details for the file cirq_scaleway-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: cirq_scaleway-0.1.3-py3-none-any.whl
- Upload date:
- Size: 16.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da1ff1ddf1bc5c307e934ff147a820cf0fa370f0d6fd9c8f402f1275208daddc |
|
MD5 | a7c5f512aa11f7d8912da55f1000a032 |
|
BLAKE2b-256 | 50eb3a7b3b8d56194a3b625e05a638cc955da67052d315bee03086f502d4a82b |