Introduction

QuaEC is a library for working with quantum error correction and fault-tolerance. In particular, QuaEC provides support for maniuplating Pauli and Clifford operators, as well as binary symplectic representations of each.

QuaEC is intended to provide easy, automated analysis of error-correcting protocols based on stabilizer codes. for example, one can define a stabilizer code from a pre-existing library, and produce an object representing a circuit to encode data into that code:

>>> import qecc as q
>>> perfect_code=q.StabilizerCode.perfect_5q_code()
>>> print perfect_code.encoding_cliffords().next().circuit_decomposition()
    CNOT    1 0
    CNOT    3 0
    CNOT    4 0
    CNOT    2 1
    CNOT    3 2
    CNOT    4 2
    CNOT    4 3
    H       0
    H       1
    H       2
    H       3
    H       4
    CZ      0 1
    CZ      0 2
    CZ      1 2
    CZ      0 3
    CZ      1 4
    CZ      3 4
    H       0
    H       1
    H       2
    H       3
    H       4
    H       4
    SWAP    3 4
    H       4
    CNOT    0 4
    CNOT    0 3
    CNOT    0 2
    CNOT    0 1
    X       1
    X       2
    Z       3
    Y       4

Getting Started with QuaEC

Obtaining QuaEC

Currently, QuaEC is hosted on GitHub. The latest unstable version of QuaEC is available for download as a ZIP there. Stable releases can be found on the downloads page, including installation packages for Windows and common Linux distributions.

QuaEC is available via PyPI as well. To obtain it, run easy_install quaec at the terminal or in the Windows command line.

Installation

Once you have obtained QuaEC, installation is straightforward using the included setup.py script or the installation packages.

To use setup.py on Unix-like systems, run the following commands from the command line:

$ cd /path/to/quaec/
$ sudo python setup.py install

To use setup.py on Windows, run cmd.exe, then enter the following commands:

C:\> cd C:\path\to\quaec\
C:\path\to\quaec\> python setup.py install

You may be prompted for permission by User Access Control, as the installer attempts to install QuaEC into the system-wide packages directory.

Once QuaEC has been installed, it is made available as the qecc package:

>>> import qecc as q
>>> print q.Pauli('XYZ', phase=2)
i^2 XYZ

Indices and tables