Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 flexible-layer mapper (FlexlayerSwap) pass #1803
Add flexible-layer mapper (FlexlayerSwap) pass #1803
Changes from all commits
42db44d
cd13703
566cb30
2d04837
3f65ed6
b702400
7c03055
4450eb0
f432021
6560757
18f08d2
7c7274b
c04d7d0
eb4252a
16a3c32
87e9c1f
5b0a716
e119d1d
37c1817
4470ebe
cf85e93
ccb0a3d
7c4e089
f02cc96
6e783cb
46081ea
2d1a577
ac4ec1d
001d725
504c8a6
8e79ae5
6d8d04a
31a9890
32cef83
c42a381
ccc65ea
4fd0103
44cf705
e341920
2ebb56b
6867a21
7effabd
a762392
a8e0162
b04dd0c
9ec90d1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain the API to me? If I am using this data structure, and I want the qubit args from a gate in my graph, how do I know what index to use? As a user, I probably shouldn't be relying on
_gates
since it is marked private.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this API, DependencyGraph depends on QuantumCircuit (say
qc
) and all of the gates are considered as integers, which are the indices ofqc.data
. Since DependencyGraph is constructed from a QuantumCircuit, user knows all_gates
asqc.data
. All public functions (except forgates
) accept and return integers. I might set gate objects directly as nodes of graph instead of integers, but I didn't do so, just because object id can be changed even though it would be a very very rare case (Am I misunderstanding Python spec?).BTW. Excuse me for my confusing variable names
gate
/gates
, in this case I should use instruction instead of gate, or more preciselyinstruction_context
, because they include non-gate instructions like measure and their acting (qu)bits. I had followed naming convention in old-version qiskit, but whatgate
means was changed at some point. Should I refactor all names aroundgate
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Could you put just a little of the essence of that description into the docstrings, so that other people with the same question might understand when they come across this? At least enough so they could know how to use it.
If you think there is a better name, I am all for updating it! :D Don't be afraid to use a better name when you think of it! And it's easier to change the sooner you do so :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update docstrings at 4fd0103