Skip to main content

Quobly QPU SDK.

Project description

Quobly forge emulator

The Quobly-alloy SDK adresses Quobly QPUs such as Alloy Pioneer and their emulators using the forge module.

Installation

You can install Quobly Alloy with

pip install quobly-alloy

Use

The minimal program to call an emulator such as the Pioneer emulator is

from qiskit import QuantumCircuit
from quobly_alloy.forge import PioneerEmulator
from quobly_alloy import QPU

circuit = QuantumCircuit(2)
circuit.rx(1, 1)
circuit.rz(1, 0)
circuit.rx(1, 0)
circuit.rzz(1, 0, 1)
circuit.measure_all()

emulator = PioneerEmulator(QPU.PIONEER_P10)
result = emulator.run_simulation(circuit,shots=1000)
print(result)

This code first create a circuit of 2 qubits, then simulate it on the PIONEER_P10 machine using run simulation. The methods PioneerEmualtor.run_simulation simulate a circuit for one ten shots. This return a dictionary[str,int] composed of key being the bitstring of the machine and values being the number of time the bitstring appears.

One can also use the function run, that return a QuoblyJob object (inheriting from Qiskit.Job) with the methods QuoblyJob.result that return the same result as run_simulation. This methods exist for adherence to qiskit framework.

Furthermore, one can fix a seed using

emulator = PioneerEmulator(QPU.PIONEER_P10,seed = 100)
result = emulator.run_simulation(circuit=circuit,shots=1000)

You can also remove the injected noise using:

emulator = PioneerEmulator(QPU.PIONEER_P10)
result = emulator.run_simulation(circuit=circuit,shots=1000,noise=False)

Finally you can change the number of qubits using:

emulator = PioneerEmulator(QPU.PIONEER_P10,qubits = 5)
result = emulator.run_simulation(circuit=circuit)

[!CAUTION] The number of possible qubits is dependant of the computer memory size.

Transpilation

The transpilation is done internally by the backend.

Using qiskit-aer-gpu for cuda 12

As of no, qiskit 2.x does not support cuda 12, but conda does.

On your conda environment you can install the correct package using

conda install -c conda-forge "qiskit-aer=0.17.2=*cuda*" cuda-version=12

You can then check if the gpu is correctly found using:

python -c "from qiskit_aer import AerSimulator; print('GPU' in AerSimulator().available_devices())"

You can then use the backend as normal, the backend prioritize the GPU device if found. You can force the use of the CPU using:

emulator = PioneerEmulator(QPU.PIONEER_P10,always_use_cpu = True)

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

quobly_alloy-1.1.2.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

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

quobly_alloy-1.1.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file quobly_alloy-1.1.2.tar.gz.

File metadata

  • Download URL: quobly_alloy-1.1.2.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for quobly_alloy-1.1.2.tar.gz
Algorithm Hash digest
SHA256 dc9b2a3f8f66c495a78a1b38e91fcc59ee39f8ba19c522eebb25b8c04e4f370b
MD5 9affe51f1382629ad2dc70b2799d0c15
BLAKE2b-256 e49118c2ea474c5ded3950db8916775578bf18d2b556c8dafd0ee058ac578e19

See more details on using hashes here.

File details

Details for the file quobly_alloy-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: quobly_alloy-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for quobly_alloy-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0ab9c93ca2b7e44f75c0f27f32ff07afd0ce1dc916394d6a717738d250f427d0
MD5 72f4745039d3bca53d02e4199a30fc25
BLAKE2b-256 17b679f004cc45b2f7179a0935c0fd46f1e512246d04c09455b1d7d0dfcd2646

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