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(3.14, 1)
circuit.rz(3.14 / 3, 0)
circuit.rx(3.14 / 3, 0)
circuit.rzz(0, 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.

The backend can also be use in the qiskit transpilation stack:

from qiskit import QuantumCircuit, transpile
from quobly_alloy import QPU
from quobly_alloy.forge import PioneerEmulator
from spin_pulse import PulseCircuit

backend = PioneerEmulator(QPU.PIONEER_P10)
circuit = QuantumCircuit(3)
circuit.cx(0,1)
circuit.cx(0,2)
transpiled_circuit = transpile(qc, backend=emu, optimization_level=1)
result = emulator.run_simulation(circuit=transpiled_circuit)

For using the backend with the qiskit transpiler, we recommend fixing the optimization_level to 0 or 1 for a quick transpilation.

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.1.tar.gz (14.8 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.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quobly_alloy-1.1.1.tar.gz
  • Upload date:
  • Size: 14.8 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.1.tar.gz
Algorithm Hash digest
SHA256 f698e27975f61efc8fa46d07167bed130739537948eb3e3155743eaf2194dbcd
MD5 fc496fc7cad4fd53453acc19fcf81b4c
BLAKE2b-256 8928ab2f5e946e387514892eb27d0be371a0cc01c3c86016496ba9fbca819c49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quobly_alloy-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b52149ed8ed8f1c2e033d84e86f4098159bf647749526d85985e304cf95621e0
MD5 867830122562abe758dfdce6abc74973
BLAKE2b-256 663027a05fbbc917b618979da53ae51b43ebfdd2a322dc71eba44bd5e09579ad

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