{"id":37066953,"url":"https://github.com/tqec/tqec","last_synced_at":"2026-01-14T07:51:34.304Z","repository":{"id":201250915,"uuid":"707313729","full_name":"tqec/tqec","owner":"tqec","description":"Design automation software tools for Topological Quantum Error Correction","archived":false,"fork":false,"pushed_at":"2026-01-10T00:49:47.000Z","size":118963,"stargazers_count":316,"open_issues_count":55,"forks_count":87,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-01-10T22:46:46.105Z","etag":null,"topics":["quantum-computing","quantum-error-correction","surface-code"],"latest_commit_sha":null,"homepage":"https://tqec.github.io/tqec/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tqec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["smburdick"]}},"created_at":"2023-10-19T16:33:34.000Z","updated_at":"2026-01-08T13:36:37.000Z","dependencies_parsed_at":"2023-12-19T02:24:37.106Z","dependency_job_id":"2676e401-e904-4dd4-94be-d53198d3e95a","html_url":"https://github.com/tqec/tqec","commit_stats":null,"previous_names":["qchackers/tqec","tqec/tqec"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tqec/tqec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqec%2Ftqec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqec%2Ftqec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqec%2Ftqec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqec%2Ftqec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tqec","download_url":"https://codeload.github.com/tqec/tqec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqec%2Ftqec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["quantum-computing","quantum-error-correction","surface-code"],"created_at":"2026-01-14T07:51:33.654Z","updated_at":"2026-01-14T07:51:34.291Z","avatar_url":"https://github.com/tqec.png","language":"Python","funding_links":["https://github.com/sponsors/smburdick"],"categories":[],"sub_categories":[],"readme":"*This is a rapidly evolving project - documentation and materials from previous recordings may become outdated quickly. If you encounter any inconsistencies or have questions, please [open an issue](https://github.com/tqec/tqec/issues/new/choose).*\n\n---\n\n# TQEC\n\n![Python](https://img.shields.io/badge/python-3.10%20|%203.11%20|%203.12%20|%203.13-blue)\n[![build](https://github.com/tqec/tqec/actions/workflows/ci.yml/badge.svg)](https://github.com/tqec/tqec/actions/workflows/ci.yml)\n[![docs](https://github.com/tqec/tqec/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/tqec/tqec/actions/workflows/gh-pages.yml)\n[![Stars](https://img.shields.io/github/stars/tqec/tqec.svg)](https://github.com/tqec/tqec/stargazers)\n[![Star History Chart](https://img.shields.io/badge/📈-Star%20History-blue?style=flat-square)](https://www.star-history.com/#tqec/tqec\u0026Date)\n[![Ethical Notice](https://img.shields.io/badge/docs-ethical%20notice-blue)](https://tqec.github.io/tqec/ethical_notice.html)\n[![Licensed under the Apache 2.0 open-source license](https://img.shields.io/badge/License-Apache%202.0-blue.svg?logo=opensourceinitiative)](https://github.com/tqec/tqec/blob/main/LICENSE)\n\nTQEC (Topological Quantum Error Correction) is a design automation software for representing,\nconstructing and compiling large-scale fault-tolerant quantum computations based on surface code and lattice surgery.\n\nIn the past decade, there have been significant advancements in surface code quantum computation based on lattice surgery.\nHowever, the circuits required to implement these protocols are highly complex. To combine these protocols for constructing larger-scale computation,\na substantial amount of effort is needed to manually encode the circuits, and it is extremely challenging to ensure their correctness.\nAs a result, many complex logical computations have not been practically simulated.\n\n`tqec` provides numerous building blocks based on state-of-the-art protocols, with verified correct circuits implementation for each block.\nThese blocks can then be combined to construct large-scale logical computations, enabling the automatic compilation of large-scale computational circuits.\n\n\u003e **_NOTE:_** This project is under active development and provide no backwards compatibility at current stage.\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://tqec.github.io/tqec/\"\u003e\n  \u003cimg width=30% src=\"https://img.shields.io/badge/documentation-blue?style=for-the-badge\u0026logo=read%20the%20docs\" alt=\"Documentation\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nDocumentation is available at \u003chttps://tqec.github.io/tqec/index.html\u003e\n\n## Installation\n\nCurrently, you need to install `tqec` from source with `pip` or [`uv`](https://docs.astral.sh/uv/):\n\n**With pip:**\n```bash\npython -m pip install git+https://github.com/tqec/tqec.git\n```\n\n**With uv:**\n```bash\nuv pip install git+https://github.com/tqec/tqec.git\n```\n\nFor a more detailed installation guide and common troubleshooting tips, see the [installation page](https://tqec.github.io/tqec/user_guide/installation.html) in the documentation.\n\n## Basic Usage\n\nHere we generate the circuits for a logical CNOT between two logical qubits to demonstrate how to use the tool.\nRefer to [quick start](https://tqec.github.io/tqec/user_guide/quick_start.html) in the documentation for more detailed explanation.\n\n```py\nfrom pathlib import Path\n\nfrom tqec import BlockGraph, compile_block_graph, NoiseModel\n\n# 0. Path to the logical_cnot.dae file\ncnot_dae_filepath = Path.cwd() / \"assets\" / \"logical_cnot.dae\"\nif not cnot_dae_filepath.exists():\n    print(f\"The file '{cnot_dae_filepath}' does not exist.\")\n\n# 1. Construct the logical computation\nblock_graph = BlockGraph.from_dae_file(cnot_dae_filepath)\n\n# 2. Get the correlation surfaces of interest and compile the computation\ncorrelation_surfaces = block_graph.find_correlation_surfaces()\ncompiled_computation = compile_block_graph(block_graph, observables=[correlation_surfaces[1]])\n\n# 3. Generate the `stim.Circuit` of target code distance\ncircuit = compiled_computation.generate_stim_circuit(\n    # k = (d-1)/2 is the scale factor\n    # Large values will take a lot of time.\n    k=2,\n    # The noise applied and noise levels can be changed.\n    noise_model=NoiseModel.uniform_depolarizing(0.001),\n)\n```\n\nSee the [user guide](https://tqec.github.io/tqec/user_guide/index.html) for more tutorials.\n\n## Contributing\n\nPull requests and issues are more than welcomed!\n\nSee the [contributing page](https://tqec.github.io/tqec/contributor_guide.html) for for specific instructions to start contributing.\n\n## Community\n\nEvery Wednesday at 8:30am PST, we hold [meetings](https://meet.jit.si/TQEC-design-automation) to discuss project progress and conduct educational talks related to TQEC.\n\nHere are some helpful links to learn more about the community:\n\n- Overview of state of the art 2D QEC: [Slides](https://docs.google.com/presentation/d/1xYBfkVMpA1YEVhpgTZpKvY8zeOO1VyHmRWvx_kDJEU8/edit?usp=sharing)/[Video](https://www.youtube.com/watch?v=aUtH7wdwBAM\u0026t=2s)\n- Community questions and answers: [Docs](https://docs.google.com/document/d/1VRBPU5eMGVEcxzgHccd98Ooa7geHGRWJoN_fdB1VClM/edit?usp=sharing)\n- Introduction to surface code quantum computation: [Slides](https://docs.google.com/presentation/d/1GxGD9kzDYJA6X47BXGII2qjDVVoub5BsSVrGHRZINO4/edit?usp=sharing)\n- Programming a quantum computer using SketchUp: [Slides](https://docs.google.com/presentation/d/1MjFuODipnmF-jDstEnQrqbsOtbSKZyPsuTOMo8wpSJc/edit?usp=sharing)/[Video](https://drive.google.com/file/d/1o1LMiidtYDcVoEFZXsJPb7XdTkZ83VFX/view?usp=drive_link)\n\nAll the resources and group meeting recordings are available at [this link](https://docs.google.com/spreadsheets/d/11DSA2wzKLOrfTGNHunFvzsMYeO7jZ8Ny8kpzoC_wKQg/edit?usp=sharing\u0026resourcekey=0-PdGFkp5s-4XWihMSxk0UIg).\n\nPlease join the [Google group](https://groups.google.com/g/tqec-design-automation) to receive more updates and information!\n\n---\n\u003e ### **Ethical notice**\n\u003e\n\u003e This library is intended for **academic, educational, and civilian research only**, in the field of **fault-tolerant quantum computing**, particularly in **surface code compilation** and **topological error correction**.\n\u003e\n\u003e It is made freely and publicly available without access restrictions, in the interest of advancing **open scientific and academic collaboration**.\n\u003e\n\u003e The maintainers request that users and contributors **refrain from engaging in, supporting, or facilitating military, surveillance, or dual-use applications**.\n\u003e\n\u003e Please, review the full [`ETHICAL_NOTICE.md`](https://github.com/tqec/tqec/blob/main/ETHICAL_NOTICE.md) for important terms regarding **export control**, **ethical use**, and **contributor responsibilities**.\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftqec%2Ftqec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftqec%2Ftqec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftqec%2Ftqec/lists"}