tqec#

Unitary Fund

Design automation software tools for Topological Quantum Error Correction

Installation#

python -m pip install git+https://github.com/tqec/tqec.git

For a more in-depth explanation, see the installation procedure.

Quick start#

Download the example file logical_cnot.dae.

You can generate stim.Circuit instances representing that computation using

from tqec import (
    BlockGraph, compile_block_graph, annotate_detectors_automatically,
)
from tqec.noise_models import NoiseModel

block_graph = BlockGraph.from_dae_file("logical_cnot.dae")
observables, _ = block_graph.get_abstract_observables()
compiled_computation = compile_block_graph(block_graph, observables=[observables[1]])

circuit = compiled_computation.generate_stim_circuit(
    # Can be changed to whatever value you want. Large values will
    # take a lot of time.
    k=2,
    # The noise applied and noise levels can be changed.
    noise_model=NoiseModel.uniform_depolarizing(0.001),
)
circuit_with_detectors = annotate_detectors_automatically(circuit)
print(circuit_with_detectors)

See the quick start tutorial for a more in-depth explanation.

Contributing#

Pull requests and issues are more than welcomed!

See the contributing page for specific instructions to start contributing.