Skip to main content

A Cirq package to connect to Scaleway Quantum as a Service

Project description

cirq-scaleway

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).

Official QaaS web page

Documentation

To get started with Scaleway Quantum as a Service (QaaS), checkout the following guide and tutorial:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cirq_scaleway-0.1.11.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cirq_scaleway-0.1.11-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file cirq_scaleway-0.1.11.tar.gz.

File metadata

  • Download URL: cirq_scaleway-0.1.11.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for cirq_scaleway-0.1.11.tar.gz
Algorithm Hash digest
SHA256 70d808b981ed4ca3238e51d802bf1760ceff616d918b36ace638ba557c9e5478
MD5 f6181245fd0c29c8fd10efe3f64a1ffa
BLAKE2b-256 e8a72b7f1945ca7b58b302fd366e5d1808d8442bcf1f1336f61415c28c73357f

See more details on using hashes here.

File details

Details for the file cirq_scaleway-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: cirq_scaleway-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for cirq_scaleway-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 e1bcfee44e40c2d121a90b24b7b90f4b13c3463ef49d6b5baa4cf5373246ff6a
MD5 2647a30a75acdb67bfab844ae89fafe3
BLAKE2b-256 00f12f199e4e29d96d23e016c66b9b70f38509d26fa9f3457a3e71173fa9eb04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page