# QECX The Quantum Error Correction eXchange format (QECX) is a portable, self-contained and toolkit-agnostic file format for quantum-error-correction (QEC) codes and the operations, error-correction cycles and decoders needed to run them. One QECX file holds everything a compiler and a simulator or device runtime need to know: the code's algebraic definition, its register template, the circuits for every logical operation and error-correction cycle and, optionally, the configuration of supported decoders, the qubit layout (topology and geometry) and [more](format_specification.md#top-level-structure). The goal of QECX as an abstraction is to help formalize QEC research and to simplify the sharing of codes, regardless of their implementation details, which are often tied to a specific software toolkit or hardware vendor. The aim is to get as much adoption and integration with other QEC tools as possible. QECX files for a range of codes are available in Haiqu's public [QEC code library](https://dashboard.haiqu.ai/qec) and on the QECX [Examples](examples.md#example-files) page. ## Format ::::{grid} 1 1 3 3 :gutter: 3 :::{grid-item-card} Specification :link: format_specification :link-type: doc The definition of the QECX format: every section, field and rule a QECX file follows. ::: :::{grid-item-card} JSON schema :link: json_schema :link-type: doc The formal structure of a QECX file, as defined by the schema. ::: :::{grid-item-card} Examples :link: examples :link-type: doc Multiple examples of codes defined as QECX files, and a detailed walkthrough of a Steane code QECX file, field by field. ::: :::: What changed in each format version is in the specification's [revision history](format_specification.md#revision-history). ## Python package The `python-qecx` package is the reference implementation for working with QECX files in Python. It can be used to parse, validate, edit and create QECX files. It also provides a [command-line tool](command_line.md) `qecx` that offers similar functionality. ::::{grid} 1 1 3 3 :gutter: 3 :::{grid-item-card} Installation :link: installation :link-type: doc The complete installation guide. ::: :::{grid-item-card} Quickstart :link: quickstart :link-type: doc Learn how to use the `python-qecx` package. Load, validate, edit and save a QECX file in a few lines of Python. ::: :::{grid-item-card} Tutorials :link: tutorials :link-type: doc Tutorials as Jupyter notebooks, with their outputs kept after execution. Covers the basics and advanced use cases. ::: :::{grid-item-card} API reference :link: api/index :link-type: doc Every public class and function, grouped by topic, each on its own page. ::: :::{grid-item-card} Command line :link: command_line :link-type: doc The `qecx` command and every option it takes, to inspect and validate a file from the terminal. ::: :::{grid-item-card} Package changelog :link: changelog :link-type: doc What changed in each release of the package, newest first. ::: :::: ## How to cite To cite the format specification and the package in your research, use their [BibTeX entries](citing.md). ```{toctree} :hidden: Home ``` ```{toctree} :caption: Format :hidden: Specification JSON schema Examples ``` ```{toctree} :caption: Python package :hidden: Installation Quickstart Tutorials API reference Command line Package changelog ``` ```{toctree} :hidden: How to cite ```