Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qiskit-community/qiskit-bip-mapper
Qiskit transpiler plugin for BIP Mapping routing pass
https://github.com/qiskit-community/qiskit-bip-mapper
Last synced: 17 days ago
JSON representation
Qiskit transpiler plugin for BIP Mapping routing pass
- Host: GitHub
- URL: https://github.com/qiskit-community/qiskit-bip-mapper
- Owner: qiskit-community
- License: apache-2.0
- Created: 2023-04-06T18:30:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-11T16:25:23.000Z (6 months ago)
- Last Synced: 2024-05-18T00:41:00.143Z (about 1 month ago)
- Language: Python
- Size: 114 KB
- Stars: 5
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Citation: CITATION.bib
Lists
- awesome-qiskit - Qiskit BIP Mapper - This plugin solves the routing and layout problems as a binary integer programming (bip) problem. this is an implementation of g. nannicini et al. "optimal qubit assignment and routing via integer programming." (arxiv:2106.06446). (Community)
README
# 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 FakePragueqc = 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:- 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.pyIf you use `qiskit-bip-mapper` in your research, please cite our paper as per the included [BibTeX file](CITATION.bib) file.