Quobly Logical Emulator Online
Project description
QLEO (Quobly Logical Emulator Online): Python Interface for Quantum Circuits
Welcome to QLEO, a Python library designed for building, simulating, and analyzing quantum circuits powerd by MIMIQ emulator of QPerfect.
If you encounter any errors or bugs while using QLEO, please report them by opening an issue in the QLEO repository here.
Note: This package uses a proprietary C++ backend that is not part of the public repository.
Installation
Install the library directly from the Quobly GitHub repository:
pip install qleo
Optional Dependencies
To enable visualization feature, ensure you install:
pip install qleo[visualization]
Getting Started
Start by importing the qleo library. This library provides tools for creating, manipulating, and simulating quantum circuits.
-
Import the Library
By using
from qleo import *, you gain access to all classes and methods required for quantum circuit operations.from qleo import *
-
Create and Manipulate Circuits In this step, you create a quantum circuit with
Circuit()and add gates to it.Hadamard Gate (GateH): Places each qubit in a superposition state.Controlled-Z Gate (GateCZ): Introduces entanglement between qubits by applying a phase shift if both qubits are in the |1⟩ state.n = 10 c = Circuit() c.push(GateH(), range(n)) c.push(GateCZ(), range(n-1), range(1,n)) c.push(GateCZ(), 0, n-1)
-
Execute & Get Result Here, you execute the circuit on QuoblySimulator (
Simulates the quantum circuit using a state vector approach) and retrieve the result.processor = Qleo() result = processor.execute(c, nsamples=1000) print(result)
The result contains detailed information about the circuit execution:
QCSResults: ├── simulator: Quantanium StateVector 1.0 ├── timings: │ ├── apply time: 0.000318101s │ └── sample time: 0.000277592s ├── fidelity estimate: 1 ├── average multi-qubit gate error estimate: 0 ├── most sampled: │ ├── bs"0100001000" => 5 │ ├── bs"0000000000" => 5 │ ├── bs"1001010001" => 5 │ ├── bs"0111011110" => 5 │ └── bs"0010001010" => 4 ├── 1 executions ├── 0 amplitudes └── 1000 samplesThe output provides a summary of your simulation results, including key information about the backend used, execution details, and measurement outcomes. You'll find details such as the simulator type, timings for circuit execution and measurement, fidelity estimates, and the most frequently observed quantum states. Additionally, it includes the total number of samples and any specific execution metrics for analyzing the performance and accuracy of your quantum circuit.
-
Get Histogram of the samples The
result.histogram()method generates a counts distribution of the sampled measurement outcomes.result.histogram()
-
Visualizing the results To visualize the results of your quantum circuits, you can use the
plothistogramfunction provided by theqleo.visualizationmodule.Example
from qleo.visualization import plothistogram plothistogram(result)
Documentation
The Quobly Framework is based on MIMIQ by QPerfect. Comprehensive documentation, tutorials, and examples on how to build circuits with the Quobly Framework and MIMIQ are available at docs.qperfect.io. Please remember to substitute any occurrences of mimiqcircuits in the documentation with quoblyframwork. For example, in place of from mimiqcircuits import *, use from qleo import *.
GPU support
Qleo supports GPU-accelerated simulation through NVIDIA’s cuStateVec library. This feature is currently available only on Linux systems equipped with an NVIDIA GPU.
To run a simulation on the GPU, use the following command:
sim = Qleo(use_gpu=True)
sim.execute(circuit)
Contact
For issues, suggestions, or inquiries, reach out via:
- Suggestions: contact (Quobly) or contact (QPerfect)
- Email: support (QPerfect)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 qleo-0.22.6-py3-none-win_amd64.whl.
File metadata
- Download URL: qleo-0.22.6-py3-none-win_amd64.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
507119e91e2ac54ccd4d5bbaa3100560f292dfc21f74bec2e78cac607198a24e
|
|
| MD5 |
eae754ccdc9519f7bc1fae8c9d3e3207
|
|
| BLAKE2b-256 |
1793cdeb1cc12b35116c8e159c89ed9ac5f1b58c7abb82319bb09be0db7a3edf
|
File details
Details for the file qleo-0.22.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: qleo-0.22.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e8176941a45f0cd7decf34f7669e14ab71a97c82765a462f302d3906299583b
|
|
| MD5 |
f8105af054d08ed3298ed78b7f54a057
|
|
| BLAKE2b-256 |
6b07a5cb22685eee805ce59f3da497930b1119b274541abadd2e656be6e2d107
|
File details
Details for the file qleo-0.22.6-py3-none-macosx_14_0_arm64.whl.
File metadata
- Download URL: qleo-0.22.6-py3-none-macosx_14_0_arm64.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3e96251b1ce377fba9cb73e1c19ee59c61d55e7b6e2edb897b73043414a3de2
|
|
| MD5 |
de0c92303d5e5da77e2916a0655bb5d8
|
|
| BLAKE2b-256 |
ac6c187b84530e4a894c82f3c8aebf47a5720fd461238f716f614e7a9470ca44
|