Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noise-adaptive initial qubit layout pass #2089

Merged
merged 6 commits into from
Apr 6, 2019
Merged

Noise-adaptive initial qubit layout pass #2089

merged 6 commits into from
Apr 6, 2019

Conversation

prakashmurali
Copy link
Contributor

This pass uses backend calibration data to find a good initial qubit layout which will improve program success rate. The pass is based on the greedy heuristic from
Prakash Murali, Jonathan M. Baker, Ali Javadi-Abhari, Frederic T. Chong, Margaret R. Martonosi. Noise-Adaptive Compiler Mappings for Noisy Intermediate-Scale Quantum Computers, ASPLOS 2019
(https://arxiv.org/abs/1901.11054)

Summary

The pass uses backend calibration data to determine a good set of physical qubits for the program dag. It selects physical qubits based on CNOT and readout errors. The pass improves the program's success rate (fraction of runs that produce the correct answer) on real hardware evaluations as demonstrated in arXiv:1901.11054.

Details and comments

This pass implements the noise-adaptive initial layout technique, it does not perform noise-adaptive swapping.

✅ I have added the tests to cover my changes.
✅ I have updated the documentation accordingly.
✅ I have read the CONTRIBUTING document.

… backend calibration data to maximize program success rate
@CLAassistant
Copy link

CLAassistant commented Apr 6, 2019

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ajavadia ajavadia self-assigned this Apr 6, 2019
Copy link
Member

@ajavadia ajavadia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @prakashmurali! The code is nicely written and very easy to follow.
I left a few minor comments inline, but I think we can merge this soon.

I think one thing to perhaps remember/document here is that this pass considers all 2-qubit gates in a given circuit, but at the hardware level it currently only considers CX gates (i.e. a virtual CZ is mapped to the best physical CX). In the future we should update this to consider other physical gates (let's say for a hardware that has iSWAP or whatever).

@prakashmurali
Copy link
Contributor Author

The Travis build failed for test.python.basicaer.test_qasm_simulator.TestBasicAerQasmSimulator.test_qasm_simulator
It is unrelated to the changes in this PR.

@ajavadia
Copy link
Member

ajavadia commented Apr 6, 2019

Ok great, I'll merge this!

We'll run some benchmarks and my guess is this is going to perform better than the current layout, in which case we'll make this the default for devices.

@ajavadia ajavadia merged commit 92f482d into Qiskit:master Apr 6, 2019
@prakashmurali
Copy link
Contributor Author

Thank you very much for the quick review and responses!

lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
* Added a noise-adaptive initial layout pass. Maps virtual qubits using backend calibration data to maximize program success rate

* CHANGELOG update (2089)

* Fixed __init__.py in transpiler passes

* Update qiskit/transpiler/passes/mapping/noise_adaptive_layout.py

Co-Authored-By: prakashmurali <[email protected]>

* Update qiskit/transpiler/passes/mapping/noise_adaptive_layout.py

Co-Authored-By: prakashmurali <[email protected]>

* Updated qreg to qarg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants