Skip to content

Conversation

prakashmurali
Copy link
Contributor

@prakashmurali prakashmurali commented Dec 2, 2019

This PR implements crosstalk adaptive gate scheduling.
This method aims to reducing crosstalk by serializing gate pairs which are prone to high crosstalk noise. However, naive serialization is bad because it incurs decoherence errors. So we use an optimization approach which takes an input circuit, backend crosstalk characterization data and backend properties to find an optimal instruction schedule that maximizes fidelity by considering both crosstalk and decoherence.

This is work done in collaboration with David McKay and Ali Javadi Abhari at IBM and Margaret Martonosi at Princeton. The paper is accepted for publication at ASPLOS 2020. arXiv link: https://arxiv.org/abs/2001.02826

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

@prakashmurali
Copy link
Contributor Author

One of the builds fails because it doesn't find Z3.
I've added Z3 to requirements.txt. Are there more places where I should add it?

@kdk
Copy link
Member

kdk commented Dec 3, 2019

One of the builds fails because it doesn't find Z3.
I've added Z3 to requirements.txt. Are there more places where I should add it?

I think its also needed in the REQUIREMENTS list in setup.py.

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 Prakash. This looks pretty good and almost mergeable I think.

I made a few comments inline.

Can you add some release notes too? Instructions here.

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

Right now if we're dependent on using z3-solver for this pass we'll need to make it optional. Adding z3-solver to requirements list would require osx users to have a C++ compiler installed because there are no precompiled wheels published for osx to pypi: Z3Prover/z3#2800 which is something we don't currently impose on any linux, windows, or osx users. Before we can move forward with this we should make z3 an optional dependency and not require it always be installed.

@mtreinish mtreinish dismissed their stale review December 11, 2019 21:42

Review comments addressed

@mtreinish
Copy link
Member

Thanks for making the change so quickly, the update lgtm.

@lcapelluto lcapelluto self-assigned this Dec 12, 2019
ajavadia
ajavadia previously approved these changes Dec 13, 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.

Ok this looks good to me now.
@kdk @lcapelluto can you check whether your comments are addressed?

raise ImportError('z3-solver is required to use CrosstalkAdaptiveSchedule')
self.backend_prop = backend_prop
self.crosstalk_prop = crosstalk_prop
self.gate_id = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Through inspection, and because I also know the backend methods you used return time in s, it looks like you're using nanoseconds as the units for dur and time. Furthermore, the values are truncated at nanoseconds. If another developer looks at this code (or you, months/years from now), would that be apparent? Can you think of a way to make it obvious?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a comment.

@prakashmurali
Copy link
Contributor Author

Thank you all for the comments and for merging the PR!

@mtreinish mtreinish added the Changelog: New Feature Include in the "Added" section of the changelog label Feb 4, 2020
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* Implementation of crosstalk adaptive scheduling

* Updated constructor params

* fixed lint issues

* fix test case bugs

* fixed lint issues

* updated setup.py requirements list with z3

* address review comments

* address review comments

* fixed parse_backend_properties

* Update qiskit/transpiler/passes/crosstalk_adaptive_schedule.py

Co-Authored-By: Kevin Krsulich <kevin@krsulich.net>

* computing descendants and ancestors once per gate

* fixed comments

Co-authored-by: Kevin Krsulich <kevin@krsulich.net>
Co-authored-by: Ali Javadi-Abhari <ajavadia@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants