An integrated software platform designed to handle the complexities of quantum error correction, seamlessly transforming applications into fault-tolerant, hardware-ready versions.
Project description
๐ฆ Loom
Loom is a Python library to create and run quantum error correction (QEC) experiments. It provides API that allows users to easily define custom stabilizer codes and corresponding lattice surgery operations. It also provides all tools required to convert any experiments to executables compatible with the most used backend (Stim, QASM, etc...).
Disclaimer: major breaking changes to be expected in the first month from release v0.1.0.
- Website: https://entropicalabs.com/
- API reference: https://loom-api-docs.entropicalabs.com/
- Documentation: https://loom-docs.entropicalabs.com/
- Bug reports: https://github.com/entropicalabs/el-loom/issues
- Support: loom-design-support@entropicalabs.com
Loom is licensed under Apache 2.0.
โจ Features
- โ Build QEC experiments with lattice surgery, surface codes and more.
- โก Simulate circuits on multiple backends (Stim, QASM3, etc...)
- ๐ง Analyze stabilizers, syndromes, and logical error rates
- ๐งฐ Extensible API for custom experiments and backends
๐ฆ Installation
Install the latest release from PyPI:
pip install el-loom
Install the development version directly from GitHub:
pip install git+https://github.com/entropicalabs/el-loom.git
๐ Quick Start
Here's a simple example of a experiment designed with Eka. Have a look to the documentation for more information on the available features.
from loom.eka import Eka, Lattice
from loom.eka.operations import (
ResetAllDataQubits,
Merge,
MeasureBlockSyndromes,
MeasureLogicalZ
)
from loom.interpreter import interpret_eka
from loom.executor import EkaCircuitToStimConverter
from loom_rotated_surface_code.code_factory import RotatedSurfaceCode
lattice = Lattice.square_2d((15, 15))
# Create rotated surface blocks on a lattice
rsc_block_1 = RotatedSurfaceCode.create(5, 5, lattice, unique_label="rsc_block_1")
rsc_block_2 = RotatedSurfaceCode.create(
5, 5, lattice, unique_label="rsc_block_2", position=(6, 0)
)
# Define lattice surgery operations to process
operations = [
ResetAllDataQubits(rsc_block_1.unique_label),
Merge([rsc_block_1.unique_label, rsc_block_2.unique_label], "rsc_block_3"),
MeasureBlockSyndromes("rsc_block_3", n_cycles=1),
MeasureLogicalZ("rsc_block_3"),
]
# Interpret the operations on the rotated surface code blocks
eka_experiment = Eka(
lattice, blocks=[rsc_block_1, rsc_block_2], operations=operations
)
# This will contain the circuit, syndromes and detectors of the system resulting from the operations.
final_state = interpret_eka(eka_experiment)
# Get the Stim code ready for simulation
stim_circuit = EkaCircuitToStimConverter().convert(final_state)
๐งโ๐ป Development Setup
To contribute to Loom, set up a development environment using Poetry:
# Clone the repository
git clone https://github.com/entropicalabs/el-loom.git
cd el-loom
# Install Poetry if needed
curl -sSL https://install.python-poetry.org | python3 -
# Install dependencies including dev dependencies
poetry install --with dev
# Get the command to activate the virtual environment
poetry env activate # or run all command with "poetry run" prefix
# Run tests
pytest
# Run linting/formatting
poetry run black src tests
๐งฑ Project Structure
el-loom/
โโโ .github/workflows/ # CI/CD workflows
โโโ docs/ # Documentation
โโโ src/
โ โโโ checkers/ # Pylint checkers
โ โโโ loom/
โ โ โโโ __init__.py
โ โ โโโ eka/ # Error correction algorithms
โ โ โโโ executor/ # Circuit execution and conversion
โ โ โโโ interpreter/ # Syndrome interpretation
โ โ โโโ visualizer/ # Plotting and visualization
โ โโโ loom_five_qubit_perfect_code/
โ โ โโโ __init__.py
โ โ โโโ selectors.py
โ โ โโโ applicator/ # Code-specific interpretation instructions
โ โ โโโ code_factory/ # Code-specific algorithmic instructions
โ โโโ loom_repetition_code/
โ โ โโโ ...
โ โโโ loom_rotated_surface_code/
โ โ โโโ ...
โ โโโ loom_shor_code/
โ โ โโโ ...
โ โโโ loom_steane_code/
โ โโโ ...
โโโ tests
โโโ poetry.lock
โโโ pyproject.toml
โโโ README.md
๐ชช License
Loom is licensed under Apache 2.0.
๐ฌ Contact
Created by Entropica Labs. Feel free to open issues, request features, or contribute via pull requests.
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 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 el_loom-0.1.3.tar.gz.
File metadata
- Download URL: el_loom-0.1.3.tar.gz
- Upload date:
- Size: 282.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
318d62abd70dd19deaa86d52a6d1fb1580f9e9bab6f14c77bc3af9462acb8c28
|
|
| MD5 |
97e30c915e6d39efd4d06cb21c369dc3
|
|
| BLAKE2b-256 |
c83d0f644dfbc345d7f46e771c01c24891843e2114eae66d945a6a52f58390e5
|
File details
Details for the file el_loom-0.1.3-py3-none-any.whl.
File metadata
- Download URL: el_loom-0.1.3-py3-none-any.whl
- Upload date:
- Size: 402.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0de0509da00a8280581681dcc5eb53184db7666a896f3b2dba1c0bbe0d0262dc
|
|
| MD5 |
55229c93918d550fb860bf7863210fc3
|
|
| BLAKE2b-256 |
f10f4f196cdd0dc3e956a226c45f75ffdd8c1c9ac96864574fc4e1908daef648
|