mqt.qubomaker


Namemqt.qubomaker JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA tool for the automatic generation and combination of QUBO formulations for specific problem classes.
upload_time2024-06-18 16:09:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Damian Rovara, Nils Quetschlich, Lukas Burgholzer, and Robert Wille Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords mqt quantum-computing qubo shortest-path design-automation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI](https://img.shields.io/pypi/v/mqt.qubomaker?logo=pypi&style=flat-square)](https://pypi.org/project/mqt.qubomaker/)
![OS](https://img.shields.io/badge/os-linux%20%7C%20macos%20%7C%20windows-blue?style=flat-square)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)
[![CI](https://img.shields.io/github/actions/workflow/status/cda-tum/mqt-qubomaker/ci.yml?branch=main&style=flat-square&logo=github&label=ci)](https://github.com/cda-tum/mqt-qubomaker/actions/workflows/ci.yml)
[![CD](https://img.shields.io/github/actions/workflow/status/cda-tum/mqt-qubomaker/cd.yml?style=flat-square&logo=github&label=cd)](https://github.com/cda-tum/mqt-qubomaker/actions/workflows/cd.yml)
[![Documentation](https://img.shields.io/readthedocs/mqt-qubomaker?logo=readthedocs&style=flat-square)](https://mqt.readthedocs.io/projects/qubomaker)
[![codecov](https://img.shields.io/codecov/c/github/cda-tum/mqt-qubomaker?style=flat-square&logo=codecov)](https://codecov.io/gh/cda-tum/mqt-qubomaker)

<p align="center">
<a href="https://mqt.readthedocs.io">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/mqt_light.png" width="60%">
  <img src="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/mqt_dark.png" width="60%">
</picture>
</a>
</p>

# MQT QUBOMaker: Automatic Generation of QUBO Formulations from Optimization Problem Specifications

MQT QUBOMaker is a framework that can be used to automatically generate QUBO formulations for various optimization problems based on a selection of constraints that define the problem.
It is developed by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/) as part of the _[Munich Quantum Toolkit](https://mqt.readthedocs.io/) (MQT)_.

The tool allows users to create QUBO formulations, and, thus, interact with quantum algorithms, without requiring any background knowledge in the field of quantum computing. End-users can stay entirely within their domain of expertise while being shielded from the complex and error-prone mathematical tasks of QUBO reformulation.

Furthermore, MQT QUBOMaker supports a variety of different encodings. End users can easily switch between the encodings for evaluation purposes without any additional effort, a task that would otherwise require a large amount of tedious mathematical reformulation.

Currently, MQT QUBOMaker provides the following submodule:

- [_Pathfinder_](./src/mqt/qubomaker/pathfinder/README.md): This submodule provides a specialization of the QUBOMaker class for the solution of optimization problems involving the search for paths in a directed graph. It provides a large set of pathfinding-related constraints that are used to define individual problem instances.

The _Pathfinder_ submodule also has a supporting [GUI](https://cda-tum.github.io/mqt-qubomaker/) to further facilitate its use.

For more details, please refer to:

<p align="center">
  <a href="https://mqt-qubomaker.readthedocs.io/en/latest/">
  <img width=30% src="https://img.shields.io/badge/documentation-blue?style=for-the-badge&logo=read%20the%20docs" alt="Documentation" />
  </a>
</p>

If you have any questions, feel free to create a [discussion](https://github.com/cda-tum/mqt-qubomaker/discussions) or an [issue](https://github.com/cda-tum/mqt-qubomaker/issues) on [GitHub](https://github.com/cda-tum/mqt-qubomaker).

## Getting Started

`mqt-qubomaker` is available via [PyPI](https://pypi.org/project/mqt.qubomaker/).

```console
(venv) $ pip install mqt.qubomaker
```

The following code gives an example of the usage with the `pathfinder` submodule:

```python3
import mqt.qubomaker as qm
import mqt.qubomaker.pathfinder as pf

# define an example graph to investigate.
graph = qm.Graph.from_adjacency_matrix(
    [
        [0, 1, 3, 4],
        [2, 0, 4, 2],
        [1, 5, 0, 3],
        [3, 8, 1, 0],
    ]
)

# select the settings for the QUBO formulation.
settings = pf.PathFindingQUBOGeneratorSettings(
    encoding_type=pf.EncodingType.ONE_HOT, n_paths=1, max_path_length=4, loops=True
)

# define the generator to be used for the QUBO formulation.
generator = pf.PathFindingQUBOGenerator(
    objective_function=pf.MinimizePathLength(path_ids=[1]),
    graph=graph,
    settings=settings,
)

# add the constraints that define the problem instance.
generator.add_constraint(pf.PathIsValid(path_ids=[1]))
generator.add_constraint(
    pf.PathContainsVerticesExactlyOnce(vertex_ids=graph.all_vertices, path_ids=[1])
)

# generate and view the QUBO formulation as a QUBO matrix.
print(generator.construct_qubo_matrix())
```

**Detailed documentation and examples are available at [ReadTheDocs](https://mqt-qubomaker.readthedocs.io/en/latest/).**

## References

MQT QUBOMaker has been developed based on methods proposed in the following paper:

- D. Rovara, N. Quetschlich, and R. Wille "[A Framework to Formulate
  Pathfinding Problems for Quantum Computing](https://arxiv.org/abs/2404.10820)", arXiv, 2024

## Acknowledgements

The Munich Quantum Toolkit has been supported by the European
Research Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement
No. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the
Munich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.

<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/tum_dark.svg" width="28%">
<img src="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/tum_light.svg" width="28%" alt="TUM Logo">
</picture>
<picture>
<img src="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/logo-bavaria.svg" width="16%" alt="Coat of Arms of Bavaria">
</picture>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/erc_dark.svg" width="24%">
<img src="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/erc_light.svg" width="24%" alt="ERC Logo">
<picture>
<img src="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/logo-mqv.svg" width="28%" alt="MQV Logo">
</picture>
</p>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mqt.qubomaker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "MQT, quantum-computing, qubo, shortest-path, design-automation",
    "author": null,
    "author_email": "Damian Rovara <damian.rovara@tum.de>, Nils Quetschlich <nils.quetschlich@tum.de>, Lukas Burgholzer <lukas.burgholzer@tum.de>",
    "download_url": "https://files.pythonhosted.org/packages/3d/54/87054b9dd2b5097795dbc385bb1e8fb51aaf094058b35b1f33ccab71c0e0/mqt_qubomaker-1.0.0.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://img.shields.io/pypi/v/mqt.qubomaker?logo=pypi&style=flat-square)](https://pypi.org/project/mqt.qubomaker/)\n![OS](https://img.shields.io/badge/os-linux%20%7C%20macos%20%7C%20windows-blue?style=flat-square)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n[![CI](https://img.shields.io/github/actions/workflow/status/cda-tum/mqt-qubomaker/ci.yml?branch=main&style=flat-square&logo=github&label=ci)](https://github.com/cda-tum/mqt-qubomaker/actions/workflows/ci.yml)\n[![CD](https://img.shields.io/github/actions/workflow/status/cda-tum/mqt-qubomaker/cd.yml?style=flat-square&logo=github&label=cd)](https://github.com/cda-tum/mqt-qubomaker/actions/workflows/cd.yml)\n[![Documentation](https://img.shields.io/readthedocs/mqt-qubomaker?logo=readthedocs&style=flat-square)](https://mqt.readthedocs.io/projects/qubomaker)\n[![codecov](https://img.shields.io/codecov/c/github/cda-tum/mqt-qubomaker?style=flat-square&logo=codecov)](https://codecov.io/gh/cda-tum/mqt-qubomaker)\n\n<p align=\"center\">\n<a href=\"https://mqt.readthedocs.io\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/mqt_light.png\" width=\"60%\">\n  <img src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/mqt_dark.png\" width=\"60%\">\n</picture>\n</a>\n</p>\n\n# MQT QUBOMaker: Automatic Generation of QUBO Formulations from Optimization Problem Specifications\n\nMQT QUBOMaker is a framework that can be used to automatically generate QUBO formulations for various optimization problems based on a selection of constraints that define the problem.\nIt is developed by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/) as part of the _[Munich Quantum Toolkit](https://mqt.readthedocs.io/) (MQT)_.\n\nThe tool allows users to create QUBO formulations, and, thus, interact with quantum algorithms, without requiring any background knowledge in the field of quantum computing. End-users can stay entirely within their domain of expertise while being shielded from the complex and error-prone mathematical tasks of QUBO reformulation.\n\nFurthermore, MQT QUBOMaker supports a variety of different encodings. End users can easily switch between the encodings for evaluation purposes without any additional effort, a task that would otherwise require a large amount of tedious mathematical reformulation.\n\nCurrently, MQT QUBOMaker provides the following submodule:\n\n- [_Pathfinder_](./src/mqt/qubomaker/pathfinder/README.md): This submodule provides a specialization of the QUBOMaker class for the solution of optimization problems involving the search for paths in a directed graph. It provides a large set of pathfinding-related constraints that are used to define individual problem instances.\n\nThe _Pathfinder_ submodule also has a supporting [GUI](https://cda-tum.github.io/mqt-qubomaker/) to further facilitate its use.\n\nFor more details, please refer to:\n\n<p align=\"center\">\n  <a href=\"https://mqt-qubomaker.readthedocs.io/en/latest/\">\n  <img width=30% src=\"https://img.shields.io/badge/documentation-blue?style=for-the-badge&logo=read%20the%20docs\" alt=\"Documentation\" />\n  </a>\n</p>\n\nIf you have any questions, feel free to create a [discussion](https://github.com/cda-tum/mqt-qubomaker/discussions) or an [issue](https://github.com/cda-tum/mqt-qubomaker/issues) on [GitHub](https://github.com/cda-tum/mqt-qubomaker).\n\n## Getting Started\n\n`mqt-qubomaker` is available via [PyPI](https://pypi.org/project/mqt.qubomaker/).\n\n```console\n(venv) $ pip install mqt.qubomaker\n```\n\nThe following code gives an example of the usage with the `pathfinder` submodule:\n\n```python3\nimport mqt.qubomaker as qm\nimport mqt.qubomaker.pathfinder as pf\n\n# define an example graph to investigate.\ngraph = qm.Graph.from_adjacency_matrix(\n    [\n        [0, 1, 3, 4],\n        [2, 0, 4, 2],\n        [1, 5, 0, 3],\n        [3, 8, 1, 0],\n    ]\n)\n\n# select the settings for the QUBO formulation.\nsettings = pf.PathFindingQUBOGeneratorSettings(\n    encoding_type=pf.EncodingType.ONE_HOT, n_paths=1, max_path_length=4, loops=True\n)\n\n# define the generator to be used for the QUBO formulation.\ngenerator = pf.PathFindingQUBOGenerator(\n    objective_function=pf.MinimizePathLength(path_ids=[1]),\n    graph=graph,\n    settings=settings,\n)\n\n# add the constraints that define the problem instance.\ngenerator.add_constraint(pf.PathIsValid(path_ids=[1]))\ngenerator.add_constraint(\n    pf.PathContainsVerticesExactlyOnce(vertex_ids=graph.all_vertices, path_ids=[1])\n)\n\n# generate and view the QUBO formulation as a QUBO matrix.\nprint(generator.construct_qubo_matrix())\n```\n\n**Detailed documentation and examples are available at [ReadTheDocs](https://mqt-qubomaker.readthedocs.io/en/latest/).**\n\n## References\n\nMQT QUBOMaker has been developed based on methods proposed in the following paper:\n\n- D. Rovara, N. Quetschlich, and R. Wille \"[A Framework to Formulate\n  Pathfinding Problems for Quantum Computing](https://arxiv.org/abs/2404.10820)\", arXiv, 2024\n\n## Acknowledgements\n\nThe Munich Quantum Toolkit has been supported by the European\nResearch Council (ERC) under the European Union's Horizon 2020 research and innovation program (grant agreement\nNo. 101001318), the Bavarian State Ministry for Science and Arts through the Distinguished Professorship Program, as well as the\nMunich Quantum Valley, which is supported by the Bavarian state government with funds from the Hightech Agenda Bayern Plus.\n\n<p align=\"center\">\n<picture>\n<source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/tum_dark.svg\" width=\"28%\">\n<img src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/tum_light.svg\" width=\"28%\" alt=\"TUM Logo\">\n</picture>\n<picture>\n<img src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/logo-bavaria.svg\" width=\"16%\" alt=\"Coat of Arms of Bavaria\">\n</picture>\n<picture>\n<source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/erc_dark.svg\" width=\"24%\">\n<img src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/erc_light.svg\" width=\"24%\" alt=\"ERC Logo\">\n<picture>\n<img src=\"https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/logo-mqv.svg\" width=\"28%\" alt=\"MQV Logo\">\n</picture>\n</p>\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Damian Rovara, Nils Quetschlich, Lukas Burgholzer, and Robert Wille  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A tool for the automatic generation and combination of QUBO formulations for specific problem classes.",
    "version": "1.0.0",
    "project_urls": {
        "Discussions": "https://github.com/cda-tum/mqt-qubomaker/discussions",
        "Documentation": "https://mqt.readthedocs.io/projects/qubomaker",
        "Homepage": "https://github.com/cda-tum/mqt-qubomaker",
        "Issues": "https://github.com/cda-tum/mqt-qubomaker/issues"
    },
    "split_keywords": [
        "mqt",
        " quantum-computing",
        " qubo",
        " shortest-path",
        " design-automation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33fa047a0316706e19278a4be8077b69cc03f0e8de58f921fdbe427021a31bce",
                "md5": "01a59d63b3a0a5145eb314864e589ff6",
                "sha256": "61c44c380e18acc823b7b117dcfe9e9ff3df65fdc7832747b7e3b6f75fb78c9b"
            },
            "downloads": -1,
            "filename": "mqt.qubomaker-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "01a59d63b3a0a5145eb314864e589ff6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 38078,
            "upload_time": "2024-06-18T16:09:22",
            "upload_time_iso_8601": "2024-06-18T16:09:22.851635Z",
            "url": "https://files.pythonhosted.org/packages/33/fa/047a0316706e19278a4be8077b69cc03f0e8de58f921fdbe427021a31bce/mqt.qubomaker-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d5487054b9dd2b5097795dbc385bb1e8fb51aaf094058b35b1f33ccab71c0e0",
                "md5": "2c5f784edb9b1590ae1f9fedf360168d",
                "sha256": "f6bc39b9d02dd34dbd5c448c4fdc5df29e04b03ce163219c0f101010a167198a"
            },
            "downloads": -1,
            "filename": "mqt_qubomaker-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2c5f784edb9b1590ae1f9fedf360168d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 201017,
            "upload_time": "2024-06-18T16:09:24",
            "upload_time_iso_8601": "2024-06-18T16:09:24.908005Z",
            "url": "https://files.pythonhosted.org/packages/3d/54/87054b9dd2b5097795dbc385bb1e8fb51aaf094058b35b1f33ccab71c0e0/mqt_qubomaker-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-18 16:09:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cda-tum",
    "github_project": "mqt-qubomaker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mqt.qubomaker"
}
        
Elapsed time: 0.33182s