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. 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 and on the QECX Examples page.

Format

Specification

The definition of the QECX format: every section, field and rule a QECX file follows.

Quantum Error Correction eXchange format (QECX) Specification
JSON schema

The formal structure of a QECX file, as defined by the schema.

JSON schema
Examples

Multiple examples of codes defined as QECX files, and a detailed walkthrough of a Steane code QECX file, field by field.

Examples

What changed in each format version is in the specification’s 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 qecx that offers similar functionality.

Installation

The complete installation guide.

Installation
Quickstart

Learn how to use the python-qecx package. Load, validate, edit and save a QECX file in a few lines of Python.

Quickstart
Tutorials

Tutorials as Jupyter notebooks, with their outputs kept after execution. Covers the basics and advanced use cases.

Tutorials
API reference

Every public class and function, grouped by topic, each on its own page.

API reference
Command line

The qecx command and every option it takes, to inspect and validate a file from the terminal.

Command line
Package changelog

What changed in each release of the package, newest first.

Package changelog

How to cite

To cite the format specification and the package in your research, use their BibTeX entries.