{"id":28933028,"url":"https://github.com/cda-tum/mqt-problemsolver","last_synced_at":"2025-07-24T06:35:43.344Z","repository":{"id":62091314,"uuid":"504775700","full_name":"cda-tum/mqt-problemsolver","owner":"cda-tum","description":"MQT ProblemSolver - A MQT Tool for Solving Problems Using Quantum Computing","archived":false,"fork":false,"pushed_at":"2025-06-09T17:15:50.000Z","size":37884,"stargazers_count":45,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-12T08:07:07.152Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cda-tum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-06-18T07:30:00.000Z","updated_at":"2025-06-03T11:03:19.000Z","dependencies_parsed_at":"2024-03-21T09:56:46.480Z","dependency_job_id":"2986569f-dad3-44d9-b52a-dbe256e0811e","html_url":"https://github.com/cda-tum/mqt-problemsolver","commit_stats":null,"previous_names":["cda-tum/mqtproblemsolver"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/cda-tum/mqt-problemsolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cda-tum%2Fmqt-problemsolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cda-tum%2Fmqt-problemsolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cda-tum%2Fmqt-problemsolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cda-tum%2Fmqt-problemsolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cda-tum","download_url":"https://codeload.github.com/cda-tum/mqt-problemsolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cda-tum%2Fmqt-problemsolver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261330134,"owners_count":23142484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2025-06-22T17:10:52.642Z","updated_at":"2025-07-24T06:35:43.333Z","avatar_url":"https://github.com/cda-tum.png","language":"Python","funding_links":[],"categories":["Quantum tools"],"sub_categories":[],"readme":"[![CodeCov](https://github.com/cda-tum/MQTProblemSolver/actions/workflows/coverage.yml/badge.svg)](https://github.com/cda-tum/MQTProblemSolver/actions/workflows/coverage.yml)\n[![Deploy to PyPI](https://github.com/cda-tum/MQTProblemSolver/actions/workflows/deploy.yml/badge.svg)](https://github.com/cda-tum/MQTProblemSolver/actions/workflows/deploy.yml)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mqt.readthedocs.io\"\u003e\n   \u003cpicture\u003e\n     \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/mqt_light.png\" width=\"60%\"\u003e\n     \u003cimg src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/mqt_dark.png\" width=\"60%\"\u003e\n   \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# MQT ProblemSolver\n\nThis repository covers the implementations of multiple research papers in the domain of quantum computing:\n\n1. [Towards an Automated Framework for Realizing Quantum Computing Solutions](#towards-an-automated-framework-for-realizing-quantum-computing-solutions)\n2. [A Hybrid Classical Quantum Computing Approach to the Satellite Mission Planning Problem](#a-hybrid-classical-quantum-computing-approach-to-the-satellite-mission-planning-problem)\n3. [Reducing the Compilation Time of Quantum Circuits Using Pre-Compilation on the Gate Level](#reducing-the-compilation-time-of-quantum-circuits-using-pre-compilation-on-the-gate-level)\n4. [Utilizing Resource Estimation for the Development of Quantum Computing Applications](#utilizing-resource-estimation-for-the-development-of-quantum-computing-applications)\n5. [Towards Equivalence Checking of Classical Circuits Using Quantum Computing](#towards-equivalence-checking-of-classical-circuits-using-quantum-computing)\n\nIn the following, each implementation is briefly introduced.\n\n# Towards an Automated Framework for Realizing Quantum Computing Solutions\n\nMQT ProblemSolver provides a framework to utilize quantum computing as a technology for users with little to no\nquantum computing knowledge that is part of the Munich Quantum Toolkit (MQT) developed by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/).\nAll necessary quantum parts are embedded by domain experts while the interfaces provided are similar to the ones\nclassical solver provide:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/framework.png\" height=300px\u003e\n\u003c/p\u003e\n\nWhen provided with a problem description, MQT ProblemSolver offers a selection of implemented quantum algorithms.\nThe user just has to chose one and all further (quantum) calculation steps are encapsulated within MQT ProblemSolver.\nAfter the calculation finished, the respective solution is returned - again in the same format as classical\nsolvers use.\n\nIn the current implementation, two case studies are conducted:\n\n1. A SAT Problem: Constraint Satisfaction Problem\n2. A Graph-based Optimization Problem: Travelling Salesman Problem\n\n## A SAT Problem: Constraint Satisfaction Problem\n\nThis exemplary implementation can be found in the [CSP_example.ipynb](notebooks/csp_example.ipynb) Jupyter notebook.\nHere, the solution to a Kakuro riddle with a 2x2 grid can be solved for arbitrary sums `s0` to `s3`:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/kakuro.png\" height=100px\u003e\n\u003c/p\u003e\n\nMQT ProblemSolver will return valid values to `a`, `b`, `c`, and `d` if a solution exists.\n\n## A Graph-based Optimization Problem: Travelling Salesman Problem\n\nThis exemplary implementation can be found in the [TSP_example.ipynb](notebooks/tsp_example.ipynb) Jupyter notebook.\nHere, the solution to a Travelling Salesman Problem with 4 cities can be solved for arbitrary distances `dist_1_2` to `dist_3_4`between the cities.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/tsp.png\" height=200px\u003e\n\u003c/p\u003e\n\nMQT ProblemSolver will return the shortest path visiting all cities as a list.\n\n# A Hybrid Classical Quantum Computing Approach to the Satellite Mission Planning Problem\n\nAdditional to the two case studies, we provide a more complex example for the satellite mission planning problem.\nThe goal is to maximize the accumulated values of all images taken by the satellite while it is often not possible\nto take all images since the satellite must rotate and adjust its optics.\n\nIn the following example, there are five to-be-captured locations which their assigned value.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/satellite_mission_planning_problem.png\" height=200px\u003e\n\u003c/p\u003e\n\n# Reducing the Compilation Time of Quantum Circuits Using Pre-Compilation on the Gate Level\n\nEvery quantum computing application must be encoded into a quantum circuit and then compiled for a specific device.\nThis lengthy compilation process is a key bottleneck and intensifies for recurring problems---each of which requires\na new compilation run thus far.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/workflow_old.png\"\u003e\n\u003c/p\u003e\n\nPre-compilation is a promising approach to overcome this bottleneck.\nBeginning with a problem class and suitable quantum algorithm, a **predictive encoding** scheme is applied to encode a\nrepresentative problem instance into a general-purpose quantum circuit for that problem class.\nOnce the real problem instance is known, the previously constructed circuit only needs to be\n**adjusted**—with (nearly) no compilation necessary:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/workflow_new.png\"\u003e\n\u003c/p\u003e\nFollowing this approach, we provide a pre-compilation module that can be used to precompile QAOA circuits\nfor the MaxCut problem.\n\n# Utilizing Resource Estimation for the Development of Quantum Computing Applications\n\nResource estimation is a promising alternative to actually execute quantum circuits on real quantum hardware which is\ncurrently restricted by the number of qubits and the error rates. By estimating the resources needed for a quantum circuit,\nthe development of quantum computing applications can be accelerated without the need to wait for the availability of\nlarge-enough quantum hardware.\n\nIn `resource_estimation/RE_experiments.py`, we evaluate the resources to calculate the ground state energy of a\nHamiltonian to chemical accuracy of 1 mHartree using the qubitization quantum simulation algorithm. The Hamiltonian\ndescribes the 64 electron and 56 orbital active space of one of the stable intermediates in the ruthenium-catalyzed\ncarbon fixation cycle\n\nIn this evaluation, we investigate\n\n- different qubit technologies,\n- the impact of the maximal number of T factories,\n- different design trade-offs, and\n- hypothesis on how quantum hardware might improve and how it affects the required resources.\n\n# Towards Equivalence Checking of Classical Circuits Using Quantum Computing\n\nEquivalence checking, i.e., verifying whether two circuits realize the same functionality or not, is a typical task in the semiconductor industry. Due to the fact, that the designs grow faster than the ability to efficiently verify them, all alternative directions to close the resulting verification gap should be considered. In this work, we consider the problem through the miter structure. Here, two circuits to be checked are applied with the same primary inputs. Then, for each pair of to-be-equal output bits, an exclusive-OR (XOR) gate is applied-evaluating to 1 if the two outputs generate different values (which only happens in the case of non-equivalence). By OR-ing the outputs of all these XOR gates, eventually an indicator results that shows whether both circuits are equivalent. Then, the goal is to determine an input assignment so that this indicator evaluates to 1 (providing a counter example that shows non-equivalence) or to prove that no such assignment exists (proving equivalence).\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"img/miter_structure.png\" height=250px\u003e\n\u003c/p\u003e\n\nIn the `equivalence_checking` module, our approach to this problem by utilizing quantum computing is implemented. There are two different ways to run this code.\n\n- One to test, how well certain parameter combinations work. The parameters consist of the number of bits of the circuits to be verified, the threshold parameter delta (which is explained in detail in the paper), the fraction of input combinations that induce non-equivalence of the circuits (further called \"counter examples\"), the number of shots to run the quantum circuit for and the number of individual runs of the experiment. Multiple parameter combinations can be tested and exported as a .csv-file at a provided location.\n- A second one to actually input a miter expression (in form of a string) together with some parameters independent from the miter (shots and delta) and use our approach to find the counter examples (if the circuits are non-equivalent).\n\nThese two implementations are provided by the functions `try_parameter_combinations()` and `find_counter_examples()`, respectively. Examples for their usages are shown in `notebooks/equivalence_checking/example.ipynb`.\n\n# Usage\n\nMQT ProblemSolver is available via [PyPI](https://pypi.org/project/mqt.problemsolver/):\n\n```console\n(venv) $ pip install mqt.problemsolver\n```\n\n# References\n\nIn case you are using MQT ProblemSolver in your work, we would be thankful if you referred to it by citing the following publication:\n\n```bibtex\n@INPROCEEDINGS{quetschlich2023mqtproblemsolver,\n    title           = {{Towards an Automated Framework for Realizing Quantum Computing Solutions}},\n    author          = {N. Quetschlich and L. Burgholzer and R. Wille},\n    eprint          = {2210.14928},\n    archivePrefix   = {arXiv},\n    year            = {2023},\n    booktitle       = {International Symposium on Multiple-Valued Logic (ISMVL)},\n}\n```\n\nwhich is also available on arXiv:\n[![a](https://img.shields.io/static/v1?label=arXiv\u0026message=2210.14928\u0026color=inactive\u0026style=flat-square)](https://arxiv.org/abs/2210.14928)\n\nIn case you are using our Satellite Mission Planning Problem approach, we would be thankful if you referred to it by citing the following publication:\n\n```bibtex\n@INPROCEEDINGS{quetschlich2023satellite,\n    title           = {{A Hybrid Classical Quantum Computing Approach to the Satellite Mission Planning Problem}},\n    author          = {N. Quetschlich and V. Koch and L. Burgholzer and R. Wille},\n    eprint          = {2308.00029},\n    archivePrefix   = {arXiv},\n    year            = {2023},\n    booktitle       = {IEEE International Conference on Quantum Computing and Engineering (QCE)},\n}\n```\n\nwhich is also available on arXiv:\n[![a](https://img.shields.io/static/v1?label=arXiv\u0026message=2308.00029\u0026color=inactive\u0026style=flat-square)](https://arxiv.org/abs/2308.00029)\n\nIn case you are using our Pre-Compilation approach, we would be thankful if you referred to it by citing the following publication:\n\n```bibtex\n@INPROCEEDINGS{quetschlich2023precompilation,\n    title           = {{Reducing the Compilation Time of Quantum Circuits Using Pre-Compilation on the Gate Level}},\n    author          = {N. Quetschlich and L. Burgholzer and R. Wille},\n    eprint          = {2305.04941},\n    archivePrefix   = {arXiv},\n    year            = {2023},\n    booktitle       = {IEEE International Conference on Quantum Computing and Engineering (QCE)},\n}\n```\n\nwhich is also available on arXiv:\n[![a](https://img.shields.io/static/v1?label=arXiv\u0026message=2305.04941\u0026color=inactive\u0026style=flat-square)](https://arxiv.org/abs/2305.04941)\n\nIn case you are using our Resources Estimation approach, we would be thankful if you referred to it by citing the following publication:\n\n```bibtex\n@misc{quetschlich2024resource_estimation,\n    title           = {{Utilizing Resource Estimation for the Development of Quantum Computing Applications}},\n    author          = {N. Quetschlich and M. Soeken and P. Murali and R. Wille},\n    eprint          = {2402.12434},\n    archivePrefix   = {arXiv},\n    year            = {2024},\n    booktitle       = {IEEE International Conference on Quantum Computing and Engineering (QCE)},\n}\n```\n\nwhich is also available on arXiv:\n[![a](https://img.shields.io/static/v1?label=arXiv\u0026message=2402.12434\u0026color=inactive\u0026style=flat-square)](https://arxiv.org/abs/2402.12434)\n\nIn case you are using our Equivalence-Checking approach, we would be thankful if you referred to it by citing the following publication:\n\n```bibtex\n@INPROCEEDINGS{quetschlich2024equivalence_checking,\n    title           = {{Towards Equivalence Checking of Classical Circuits Using Quantum Computing}},\n    author          = {N. Quetschlich and T. Forster and A. Osterwind and D. Helms and R. Wille},\n    eprint          = {2408.14539},\n    archivePrefix   = {arXiv},\n    year            = {2024},\n    booktitle       = {IEEE International Conference on Quantum Computing and Engineering (QCE)},\n}\n```\n\nwhich is also available on arXiv:\n[![a](https://img.shields.io/static/v1?label=arXiv\u0026message=2408.14539\u0026color=inactive\u0026style=flat-square)](https://arxiv.org/abs/2408.14539)\n\n## Acknowledgements\n\nThis project received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research\nand innovation program (DA QC, grant agreement No. 101001318 and MILLENION, grant agreement No. 101114305), was part\nof the Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda\nBayern Plus, and has been supported by the BMWK on the basis of a decision by the German Bundestag through project\nQuaST, as well as by the BMK, BMDW, the State of Upper Austria in the frame of the COMET program, and the QuantumReady\nproject within Quantum Austria (managed by the FFG).\n\n\u003cp align=\"center\"\u003e\n\u003cpicture\u003e\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/tum_dark.svg\" width=\"28%\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/tum_light.svg\" width=\"28%\" alt=\"TUM Logo\"\u003e\n\u003c/picture\u003e\n\u003cpicture\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/logo-bavaria.svg\" width=\"16%\" alt=\"Coat of Arms of Bavaria\"\u003e\n\u003c/picture\u003e\n\u003cpicture\u003e\n\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/erc_dark.svg\" width=\"24%\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/erc_light.svg\" width=\"24%\" alt=\"ERC Logo\"\u003e\n\u003c/picture\u003e\n\u003cpicture\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/logo-mqv.svg\" width=\"28%\" alt=\"MQV Logo\"\u003e\n\u003c/picture\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcda-tum%2Fmqt-problemsolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcda-tum%2Fmqt-problemsolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcda-tum%2Fmqt-problemsolver/lists"}