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

Add layout score analysis pass #3321

Merged
merged 20 commits into from
Nov 1, 2019
Merged

Add layout score analysis pass #3321

merged 20 commits into from
Nov 1, 2019

Conversation

1ucian0
Copy link
Member

@1ucian0 1ucian0 commented Oct 25, 2019

In order to evaluate if a layout selection is good (this is the context ), a way to score a layout.

The scoring measures the distance of the CXs in the coupling map. And, if they are not direct neightbord, adds 1 for each extra distance that is needed.

@1ucian0 1ucian0 requested a review from ajavadia October 25, 2019 18:17
@1ucian0 1ucian0 requested review from kdk and mtreinish as code owners October 25, 2019 18:17
qiskit/transpiler/passes/mapping/layout_score.py Outdated Show resolved Hide resolved
qiskit/transpiler/passes/mapping/layout_score.py Outdated Show resolved Hide resolved
qiskit/transpiler/passes/mapping/layout_score.py Outdated Show resolved Hide resolved
qiskit/transpiler/passes/mapping/layout_score.py Outdated Show resolved Hide resolved
Copy link
Member

@kdk kdk left a comment

Choose a reason for hiding this comment

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

Looks good, can you add a release note?

@kdk kdk added the Changelog: New Feature Include in the "Added" section of the changelog label Nov 1, 2019
@1ucian0
Copy link
Member Author

1ucian0 commented Nov 1, 2019

Release note in ffd885e.

@kdk kdk changed the title Layout score analysis pass Add layout score analysis pass Nov 1, 2019
@kdk kdk added the automerge label Nov 1, 2019
@mergify mergify bot merged commit edf2c49 into Qiskit:master Nov 1, 2019
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* initial commit

* docstring

* docstring

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

Co-Authored-By: Ali Javadi-Abhari <[email protected]>

* += -> =

* docstring

* remove initial_layout param

* rename qiskit/transpiler/passes/mapping/layout_score.py qiskit/transpiler/passes/mapping/layout_2q_distance.py

* LayoutScore -> Layout2qDistance

* counter

* dyn property name

* docstring

* release note

* each two qubit gate in the circuit
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.

3 participants