Metadata-Version: 2.1
Name: mqt.qao
Version: 0.3.0
Summary: MQT Quantum Auto Optimizer: Automatic Framework for Solving Optimization Problems with Quantum Computers
Author-email: Deborah Volpe <deborah.volpe@polito.it>, Nils Quetschlich <nils.quetschlich@tum.de>
License: MIT License
        
        Copyright (c) 2024 Deborah Volpe, Nils Quetschlich, Mariagrazia Graziano, Giovanna Turvani 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.
        
Project-URL: Homepage, https://github.com/cda-tum/mqt-qao
Project-URL: Issues, https://github.com/cda-tum/mqt-qao/issues
Project-URL: Discussions, https://github.com/cda-tum/mqt-qao/discussions
Project-URL: Research, https://www.cda.cit.tum.de/research/quantum/
Keywords: MQT,quantum-computing,optimization,QUBO
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: qiskit>=1.0
Requires-Dist: qiskit_optimization>=0.6
Requires-Dist: qiskit_aer>=0.15
Requires-Dist: pandas>=2.1.2
Requires-Dist: numpy>=1.26
Requires-Dist: qubovert>=1.2.5
Requires-Dist: matplotlib>=3.8
Requires-Dist: docplex>=2.21.207
Requires-Dist: dwave-system>=1.25.0
Requires-Dist: dwave-samplers>=1.3.0
Requires-Dist: scikit-learn>=1.4.2
Requires-Dist: networkx
Provides-Extra: test
Requires-Dist: pytest>=7.2; extra == "test"
Provides-Extra: coverage
Requires-Dist: mqt.qao[test]; extra == "coverage"
Requires-Dist: pytest-cov>=4; extra == "coverage"
Provides-Extra: docs
Requires-Dist: furo>=2023.9.10; extra == "docs"
Requires-Dist: setuptools-scm>=8.1; extra == "docs"
Requires-Dist: sphinxcontrib-bibtex>=2.4.2; extra == "docs"
Requires-Dist: sphinx-copybutton>=0.5; extra == "docs"
Requires-Dist: ipython; extra == "docs"
Requires-Dist: ipykernel; extra == "docs"
Requires-Dist: nbsphinx; extra == "docs"
Requires-Dist: sphinxext-opengraph>=0.9; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
Requires-Dist: qiskit[visualization]; extra == "docs"
Provides-Extra: dev
Requires-Dist: mqt.qao[coverage,docs]; extra == "dev"

[![PyPI](https://img.shields.io/pypi/v/mqt.qao?logo=pypi&style=flat-square)](https://pypi.org/project/mqt.qao/)
![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-qao/ci.yml?branch=main&style=flat-square&logo=github&label=ci)](https://github.com/cda-tum/mqt-qao/actions/workflows/ci.yml)
[![CD](https://img.shields.io/github/actions/workflow/status/cda-tum/mqt-qao/cd.yml?style=flat-square&logo=github&label=cd)](https://github.com/cda-tum/mqt-qao/actions/workflows/cd.yml)
[![Documentation](https://img.shields.io/readthedocs/mqt-qao?logo=readthedocs&style=flat-square)](https://mqt.readthedocs.io/projects/qao)
[![codecov](https://img.shields.io/codecov/c/github/cda-tum/mqt-qao?style=flat-square&logo=codecov)](https://codecov.io/gh/cda-tum/mqt-qao)

<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 Quantum Auto Optimizer: Automatic Framework for Solving Optimization Problems with Quantum Computers

MQT Quantum Auto Optimizer is a framework that allows one to automatically translate an optimization problem into a quantum-compliant formulation and to solve it with one of the main quantum solvers (Quantum Annealer, Quantum Approximate Optimization Algorithm, Variational Quantum Eigensolver and Grover Adaptive Search)

MQT Quantum Auto Optimizer is part of the [Munich Quantum Toolkit (MQT)](https://mqt.readthedocs.io/) developed by the [Chair for Design Automation](https://www.cda.cit.tum.de/) at the [Technical University of Munich](https://www.tum.de/). This framework has been developed in collaboration with the [VLSI Lab](https://www.vlsilab.polito.it/) of [Politecnico di Torino](https://www.polito.it).

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

## Getting Started

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

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

The following code gives an example on the usage:

```python3
from mqt.qao import Constraints, ObjectiveFunction, Problem, Solver, Variables

# Declaration of the problem variables
var = Variables()
a = var.add_binary_variable("a")
b = var.add_discrete_variable("b", [-1, 1, 3])
c = var.add_continuous_variable("c", -2, 2, 0.25)

# declaration of the objective functions involved in the problem
obj_func = ObjectiveFunction()
obj_func.add_objective_function(a + b * c + c**2)

# Declaration of the constraints
cst = Constraints()
cst.add_constraint("b + c >= 2", variable_precision=True)

# Creation of the problem
prb = Problem()
prb.create_problem(var, cst, obj_func)

# Solve the problem with the Dwave Quantum Annealer
solution = Solver().solve_Dwave_quantum_annealer(prb, token=token)
```

**Detailed documentation and examples are available at [ReadTheDocs](https://mqt.readthedocs.io/projects/qao).**

## References

In case you are using the MQT Quantum Auto Optimizer in your work, we would be thankful if you referred to it by citing the following publications:

```bibtex
@INPROCEEDINGS{volpe2024towards,
	AUTHOR        = {D. Volpe and N. Quetschlich and M. Graziano and G. Turvani and R. Wille},
	TITLE         = {{Towards an Automatic Framework for Solving Optimization Problems with Quantum Computers}},
	YEAR          = {2024},
	BOOKTITLE     = {IEEE International Conference on Quantum Software (QSW)},
	EPRINT        = {2406.12840},
	PRIMARYCLASS  = {quant-ph},
	ARCHIVEPREXIX = {arxiv},
}

@INPROCEEDINGS{volpe2024predictive,
	AUTHOR        = {D. Volpe and N. Quetschlich and M. Graziano and G. Turvani and R. Wille},
	TITLE         = {{A Predictive Approach for Selecting the Best Quantum Solver for an Optimization Problem}},
	YEAR          = {2024},
	BOOKTITLE     = {IEEE International Conference on Quantum Computing and Engineering (QCE)},
	EPRINT        = {2408.03613},
	PRIMARYCLASS  = {quant-ph},
	ARCHIVEPREXIX = {arxiv},
}
```

## 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>
<picture>
<img src="https://raw.githubusercontent.com/cda-tum/mqt/main/docs/_static/logo-mqv.svg" width="28%" alt="MQV Logo">
</picture>
</p>
