qiskit-bip-mapper


Nameqiskit-bip-mapper JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/qiskit-community/qiskit-bip-mapper
SummaryA Qiskit transpiler plugin for BIPMapping
upload_time2023-04-12 12:47:24
maintainer
docs_urlNone
authorToshinari Itoko, Giacomo Nannicini
requires_python>=3.8
licenseApache-2
keywords
VCS
bugtrack_url
requirements pbr qiskit-terra cplex docplex
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Qiskit BIPMapping Plugin

This repository contains a standalone routing stage to use the ``BIPMapping``
routing pass. The BIP mapping pass solves the
[routing](https://qiskit.org/documentation/apidoc/transpiler.html#routing-stage)
and [layout](https://qiskit.org/documentation/apidoc/transpiler.html#layout-stage)
problems as a binary integer programming (BIP) problem. The algorithm used
in this pass is described in:

G. Nannicini et al. "Optimal qubit assignment and routing via integer programming."
[arXiv:2106.06446](https://arxiv.org/abs/2106.06446)

This plugin depends on [CPLEX](https://www.ibm.com/products/ilog-cplex-optimization-studio)
to solve the BIP problem. While a no-cost version of CPLEX is available (and published on
[PyPI](https://pypi.org/project/cplex/)) this has limits set on the size of the problems
it can solve which prevents it from being used except for very small quantum circuits. If
you would like to use this transpiler pass for larger circuits a CPLEX license will be
required.


## Install and Use plugin

To use the unitary synthesis plugin first install qiskit terra with the pull
request:

```bash
pip install qiskit-bip-mapper
```
To install the plugin package. As part of the install process `pip` will install
the no-cost version of CPLEX from PyPI automatically. However, if you're going to
use the qiskit-bip-mapper plugin for running `transpile()` on circuits more than
a couple qubits or with more than handful of 2 qubit gates you will likely need
to install the commercial version of CPLEX.

## Using BIPMapping pass

Once you have the plugin package installed you can use the plugin via the
`routing_method="bip"` argument on Qiskit's `transpile()` function. For example,
if you wanted to use the `BIPMapping` method to compile a 15 qubit quantum
volume circuit for a backend you would do something like:

```python

from qiskit import transpile
from qiskit.circuit.library import QuantumVolume
from qiskit.providers.fake_provider import FakePrague

qc = QuantumVolume(15)
qc.measure_all()
backend = FakePrague()

transpile(qc, backend, routing_method="bip")
```

# Authors and Citation

The qiskit-bip-mapper is the work of [many people](https://github.com/qiskit-community/qiskit-bip-mapper/graphs/contributors)
who contribute to the project at different levels. Additionally, the plugin was
originally developed as part of the Qiskit project itself and you can see the
development history for it here:
<!-- update links to 0.24.0 release once available -->

- https://github.com/Qiskit/qiskit-terra/commits/0.23.3/qiskit/transpiler/passes/routing/bip_mapping.py
- https://github.com/Qiskit/qiskit-terra/commits/0.23.3/qiskit/transpiler/passes/routing/algorithms/bip_model.py

If you use `qiskit-bip-mapper` in your research, please cite our paper as per the included [BibTeX file](CITATION.bib) file.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/qiskit-community/qiskit-bip-mapper",
    "name": "qiskit-bip-mapper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Toshinari Itoko, Giacomo Nannicini",
    "author_email": "itoko@jp.ibm.com, nannicini@us.ibm.com",
    "download_url": "https://files.pythonhosted.org/packages/b1/d0/ae35e945c6f203c73d4775f811037acdcfd167b9850523cf86cd9d3d29cd/qiskit-bip-mapper-0.1.0.tar.gz",
    "platform": null,
    "description": "# Qiskit BIPMapping Plugin\n\nThis repository contains a standalone routing stage to use the ``BIPMapping``\nrouting pass. The BIP mapping pass solves the\n[routing](https://qiskit.org/documentation/apidoc/transpiler.html#routing-stage)\nand [layout](https://qiskit.org/documentation/apidoc/transpiler.html#layout-stage)\nproblems as a binary integer programming (BIP) problem. The algorithm used\nin this pass is described in:\n\nG. Nannicini et al. \"Optimal qubit assignment and routing via integer programming.\"\n[arXiv:2106.06446](https://arxiv.org/abs/2106.06446)\n\nThis plugin depends on [CPLEX](https://www.ibm.com/products/ilog-cplex-optimization-studio)\nto solve the BIP problem. While a no-cost version of CPLEX is available (and published on\n[PyPI](https://pypi.org/project/cplex/)) this has limits set on the size of the problems\nit can solve which prevents it from being used except for very small quantum circuits. If\nyou would like to use this transpiler pass for larger circuits a CPLEX license will be\nrequired.\n\n\n## Install and Use plugin\n\nTo use the unitary synthesis plugin first install qiskit terra with the pull\nrequest:\n\n```bash\npip install qiskit-bip-mapper\n```\nTo install the plugin package. As part of the install process `pip` will install\nthe no-cost version of CPLEX from PyPI automatically. However, if you're going to\nuse the qiskit-bip-mapper plugin for running `transpile()` on circuits more than\na couple qubits or with more than handful of 2 qubit gates you will likely need\nto install the commercial version of CPLEX.\n\n## Using BIPMapping pass\n\nOnce you have the plugin package installed you can use the plugin via the\n`routing_method=\"bip\"` argument on Qiskit's `transpile()` function. For example,\nif you wanted to use the `BIPMapping` method to compile a 15 qubit quantum\nvolume circuit for a backend you would do something like:\n\n```python\n\nfrom qiskit import transpile\nfrom qiskit.circuit.library import QuantumVolume\nfrom qiskit.providers.fake_provider import FakePrague\n\nqc = QuantumVolume(15)\nqc.measure_all()\nbackend = FakePrague()\n\ntranspile(qc, backend, routing_method=\"bip\")\n```\n\n# Authors and Citation\n\nThe qiskit-bip-mapper is the work of [many people](https://github.com/qiskit-community/qiskit-bip-mapper/graphs/contributors)\nwho contribute to the project at different levels. Additionally, the plugin was\noriginally developed as part of the Qiskit project itself and you can see the\ndevelopment history for it here:\n<!-- update links to 0.24.0 release once available -->\n\n- https://github.com/Qiskit/qiskit-terra/commits/0.23.3/qiskit/transpiler/passes/routing/bip_mapping.py\n- https://github.com/Qiskit/qiskit-terra/commits/0.23.3/qiskit/transpiler/passes/routing/algorithms/bip_model.py\n\nIf you use `qiskit-bip-mapper` in your research, please cite our paper as per the included [BibTeX file](CITATION.bib) file.\n\n",
    "bugtrack_url": null,
    "license": "Apache-2",
    "summary": "A Qiskit transpiler plugin for BIPMapping",
    "version": "0.1.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92fba123555215c6d176e2149b7b2d898457e7352ef019835fe6eb8674765de5",
                "md5": "a730ffc52bce41908237a496a2141ecd",
                "sha256": "b41eef25c087896c9914910de965b418cb13f63a607727a82f2d23650fbe3d82"
            },
            "downloads": -1,
            "filename": "qiskit_bip_mapper-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a730ffc52bce41908237a496a2141ecd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 23012,
            "upload_time": "2023-04-12T12:47:22",
            "upload_time_iso_8601": "2023-04-12T12:47:22.950225Z",
            "url": "https://files.pythonhosted.org/packages/92/fb/a123555215c6d176e2149b7b2d898457e7352ef019835fe6eb8674765de5/qiskit_bip_mapper-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b1d0ae35e945c6f203c73d4775f811037acdcfd167b9850523cf86cd9d3d29cd",
                "md5": "9ae4946eee378e63f643e37bfba4738b",
                "sha256": "fb98a7162ddefbba53d1e318c2b327a0ef93954daae882cbbe9192416ef1ba56"
            },
            "downloads": -1,
            "filename": "qiskit-bip-mapper-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9ae4946eee378e63f643e37bfba4738b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 22142,
            "upload_time": "2023-04-12T12:47:24",
            "upload_time_iso_8601": "2023-04-12T12:47:24.698336Z",
            "url": "https://files.pythonhosted.org/packages/b1/d0/ae35e945c6f203c73d4775f811037acdcfd167b9850523cf86cd9d3d29cd/qiskit-bip-mapper-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-12 12:47:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "qiskit-community",
    "github_project": "qiskit-bip-mapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pbr",
            "specs": [
                [
                    ">=",
                    "5.7.0"
                ]
            ]
        },
        {
            "name": "qiskit-terra",
            "specs": [
                [
                    ">=",
                    "0.22.0"
                ]
            ]
        },
        {
            "name": "cplex",
            "specs": []
        },
        {
            "name": "docplex",
            "specs": []
        }
    ],
    "tox": true,
    "lcname": "qiskit-bip-mapper"
}
        
Elapsed time: 0.05549s