No project description provided
Project description
Quobly forge emulator
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 QB_SiSpin_1 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quobly_alloy-1.0.0.tar.gz.
File metadata
- Download URL: quobly_alloy-1.0.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
545a4f96d1f87f7d9dbe3d9b895ce8858bcb1e4580fd39e95ea38ef96cab2fe7
|
|
| MD5 |
0d7bbaba25b003258222d752e9b329c4
|
|
| BLAKE2b-256 |
7dd35a7e79472199e5a753dd59906f3dba97810f1eb6060809be40cd348701a7
|
File details
Details for the file quobly_alloy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: quobly_alloy-1.0.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b4de6fd67f76c6e4180affcc6e98b455fe6688ac9a8269322277afe26b943c
|
|
| MD5 |
a09f87df4bc9f58a1b3be654fd761e10
|
|
| BLAKE2b-256 |
84fba5403ab891c654879cf292729579804c494df747e01b797bb80b7085f235
|