Skip to main content

No project description provided

Project description

Quobly forge emulator

Forge-emulator is an emulator of the Quobly machine.

Installation

You can install Quobly Alloy with

pip install quobly-alloy

Use

The minimal program to call the simulator is

from qiskit import QuantumCircuit
from quobly_alloy import PioneerEmulator, 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,10)
print(result)

This code first create a circuit of 2 qubits, then simulate it on the PIONEER_P10 machine using run simulation. The methods QuoblyQpuEmulator.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=100)

You can also remove the injected noise using:

emulator = PioneerEmulator(QPU.PIONEER_P10)
result = emulator.run_simulation(circuit=circuit,shots=100,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.

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.0.2.tar.gz (14.2 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.0.2-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quobly_alloy-1.0.2.tar.gz
  • Upload date:
  • Size: 14.2 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.0.2.tar.gz
Algorithm Hash digest
SHA256 19861e96fb2e875ac3522d2fb1ac7c9173d01f9cfa8608cfb21b05891c99ece5
MD5 97fab9de98f7ac0c2d9a29494ce36e82
BLAKE2b-256 83ca0ca37262c796a8423d77cfee001d3d3da45e3ae952d4fabce108e4d83532

See more details on using hashes here.

File details

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

File metadata

  • Download URL: quobly_alloy-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.3 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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7bedd7d26a374b1d4215a80a6f49df4a51d352ed4e600e676da466a53d56265
MD5 5487b8a77dc3df03dc0d34b750268e86
BLAKE2b-256 f62740ca86af922df28394ed7906d60c0a71b8fd1052cb01c485248bc2ff82c4

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