{"id":34048315,"url":"https://github.com/quicophy/mdopt","last_synced_at":"2026-04-02T02:08:27.600Z","repository":{"id":60723965,"uuid":"348403022","full_name":"quicophy/mdopt","owner":"quicophy","description":"Code-agnostic tensor-network (MPS-MPO) decoder for quantum error-correcting codes.","archived":false,"fork":false,"pushed_at":"2026-03-23T17:08:27.000Z","size":12549,"stargazers_count":44,"open_issues_count":11,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-24T15:05:40.104Z","etag":null,"topics":["discrete-optimization","matrix-product-operators","matrix-product-states","tensor-networks"],"latest_commit_sha":null,"homepage":"http://mdopt.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quicophy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-16T15:41:59.000Z","updated_at":"2026-03-23T17:08:37.000Z","dependencies_parsed_at":"2024-04-15T03:49:31.196Z","dependency_job_id":"4264c978-e001-4ffd-8e81-e0443063f22c","html_url":"https://github.com/quicophy/mdopt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/quicophy/mdopt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quicophy%2Fmdopt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quicophy%2Fmdopt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quicophy%2Fmdopt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quicophy%2Fmdopt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quicophy","download_url":"https://codeload.github.com/quicophy/mdopt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quicophy%2Fmdopt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31294399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T01:43:37.129Z","status":"online","status_checked_at":"2026-04-02T02:00:08.535Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["discrete-optimization","matrix-product-operators","matrix-product-states","tensor-networks"],"created_at":"2025-12-14T00:03:46.874Z","updated_at":"2026-04-02T02:08:27.585Z","avatar_url":"https://github.com/quicophy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `mdopt` — code-agnostic tensor-network (MPS-MPO) decoder for quantum error-correcting codes.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/source/logo.png\" alt=\"logo\" width=\"1100\"\u003e\n\u003c/p\u003e\n\n[![codecov](https://codecov.io/gh/quicophy/mdopt/branch/main/graph/badge.svg?token=4G7VWYX0S2)](https://codecov.io/gh/quicophy/mdopt)\n[![tests](https://github.com/quicophy/mdopt/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/quicophy/mdopt/actions/workflows/tests.yml)\n[![DOI](https://joss.theoj.org/papers/10.21105/joss.09125/status.svg)](https://doi.org/10.21105/joss.09125)\n[![Documentation Status](https://readthedocs.org/projects/mdopt/badge/?version=latest)](https://mdopt.readthedocs.io/en/latest/?badge=latest)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/quicophy/mdopt/main.svg)](https://results.pre-commit.ci/latest/github/quicophy/mdopt/main)\n[![lint](https://github.com/quicophy/mdopt/actions/workflows/lint.yml/badge.svg)](https://github.com/quicophy/mdopt/actions/workflows/lint.yml)\n[![mypy](https://github.com/quicophy/mdopt/actions/workflows/mypy.yml/badge.svg?branch=main)](https://github.com/quicophy/mdopt/actions/workflows/mypy.yml)\n![CI](https://github.com/quicophy/mdopt/actions/workflows/ci.yml/badge.svg)\n[![Unitary Fund](https://img.shields.io/badge/Supported%20By-Unitary%20Fund-brightgreen.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACgAAAASCAYAAAApH5ymAAAAt0lEQVRIic2WUQ6AIAiGsXmC7n9Gr1Dzwcb%2BUAjN8b%2B0BNwXApbKRRcF1nGmN5y0Jon7WWO%2B6pgJLhtynzUHKTMNrNo4ZPPldikW10f7qYBEMoTmJ73z2NFHcJkAvbLUpVYmvwIigKeRsjdQEtagZ2%2F0DzsHG2h9iICrRwh2qObbGPIfMDPCMjHNQawpbc71bBZhsrpNYs3qqCFmO%2FgBjHTEqKm7eIdMg9p7PCvma%2Fz%2FwQAMfRHRDTlhQGoOLve1AAAAAElFTkSuQmCC)](http://unitary.fund)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n\n\n##### `mdopt` is a python package built on top of `numpy` for discrete optimisation (with the main application to classical and quantum decoding) in the tensor-network (specifically, Matrix Product States / Operators) language. The intended audience includes physicists, quantum information / error correction researchers, and those interested in exploring tensor-network methods beyond traditional applications.\n\n## Installation\n\nTo install the current release, use the package manager [pip](https://pip.pypa.io/en/stable/).\n\n```bash\npip install mdopt\n```\n\nOtherwise, you can clone the repository and use [poetry](https://python-poetry.org/).\n\n```bash\npoetry install\n```\n\n## Minimal example\n\n```python\nimport numpy as np\nimport qecstruct as qec\nfrom examples.decoding.decoding import decode_css\n\n# Define a small instance of the surface code\nLATTICE_SIZE = 3\nsurface_code = qec.hypergraph_product(\n    qec.repetition_code(LATTICE_SIZE),\n    qec.repetition_code(LATTICE_SIZE),\n)\n\n# Input an error and choose decoder controls\nlogicals, success = decode_css(\n    code=surface_code,\n    error=\"IIXIIIIIIIIII\",\n    bias_prob=0.01,\n    bias_type=\"Bitflip\",\n    chi_max=64,\n    renormalise=True,\n    contraction_strategy=\"Optimised\",\n    tolerance=1e-12,\n    silent=False,\n)\n```\n\n## Examples\n\nThe [examples](https://github.com/quicophy/mdopt/tree/main/examples) folder contains full workflows that demonstrate typical use cases, such as quantum / classical LDPC code decoding, ground state search for the quantum Ising model and random quantum curcuit simulation. Each example is fully documented and serves as a starting point for building your own experiments.\nThe package has been tested on macOS and Linux (Compute Canada clusters) and does not currently support Windows.\n\n## Cite\nIf you happen to find `mdopt` useful in your work, please consider supporting development by citing it.\n```\n@article{berezutskii2025mdopt,\n  title={mdopt: A code-agnostic tensor-network decoder for quantum error-correcting codes},\n  author={Berezutskii, Aleksandr},\n  journal={Journal of Open Source Software},\n  volume={10},\n  number={115},\n  pages={9125},\n  year={2025}\n}\n```\n\n## Contribution guidelines\n\nIf you want to contribute to `mdopt`, be sure to follow GitHub's contribution guidelines.\nThis project adheres to our [code of conduct](https://github.com/quicophy/mdopt/blob/main/CODE_OF_CONDUCT.md).\nBy participating, you are expected to uphold this code.\n\nWe use [GitHub issues](https://github.com/quicophy/mdopt/issues) for\ntracking requests and bugs, please direct specific questions to the maintainers.\n\nThe `mdopt` project strives to abide by generally accepted best practices in\nopen-source software development, such as:\n\n*   apply the desired changes and resolve any code\n    conflicts,\n*   run the tests and ensure they pass,\n*   build the package from source.\n\nDevelopers may find the following guidelines useful:\n\n- **Running tests.**\n  Tests are executed using [pytest](https://docs.pytest.org/):\n  ```bash\n  pytest tests\n  ```\n\n- **Building documentation.**\n  Documentation is built with [Sphinx](https://www.sphinx-doc.org/).\n  A convenience script is provided:\n\n  ```bash\n  ./generate_docs.sh\n  ```\n\n- **Coding style.**\n  The project follows the [Black](https://black.readthedocs.io/en/stable/) code style.\n  Please run Black before submitting a pull request:\n\n  ```bash\n  black .\n  ```\n\n- **Pre-commit hooks.**\n  [Pre-commit](https://pre-commit.com/) hooks are configured to enforce consistent style automatically.\n  To enable them:\n\n  ```bash\n  pre-commit install\n  ```\n\n## License\n\nThis project is licensed under the [MIT License](https://github.com/quicophy/mdopt/blob/main/LICENSE.md).\n\n## Documentation\n\nFull documentation is available at [mdopt.readthedocs.io](https://mdopt.readthedocs.io/en/latest/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquicophy%2Fmdopt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquicophy%2Fmdopt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquicophy%2Fmdopt/lists"}