-
Notifications
You must be signed in to change notification settings - Fork 12
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 LightSABRE to default_compilation_pass #400
Conversation
@@ -988,46 +988,6 @@ def lift_perm(p: dict[int, int]) -> np.ndarray: | |||
return pm | |||
|
|||
|
|||
@pytest.mark.skipif(skip_remote_tests, reason=REASON) | |||
def test_compilation_correctness(brisbane_backend: IBMQBackend) -> None: |
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.
LightSabre Pass does not return any information regarding the implicit qubit permutation. If a circuit has Measure
operations, as we'd expect for hardware, then this is not an issue, as all post-processing is completed based on output bits from Measures
, which are still measuring the same states.
This test confirmed that the compilation, including SWAP operations, did not change the unitary, action, up to permutations, for a backend with some architecture. In practice we do not expect users to want to do unitary simulation with qubit swapping, so I think we can reasonably remove this test.
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.
Is this potentially an issues for other cases? Should this be documented somewhere?
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.
I've added this test back in, but edited it to only check the routing is correct
Small comment about docs. Maybe we should update this section given that the default compilation pass is changing? |
Good point - I've updated the source file. Please could you advice if there's anything else I need to do? |
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.
Looks good, few questions.
""" | ||
Converts a pytket Architecture object to a Qiskit CouplingMap object. | ||
|
||
:param architecture: Architecture to be converted |
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.
Could you add some more details about the return value here?
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.
done
:param architecture: Architecture LightSABRE routes circuits to match | ||
:param optimization_level: Corresponds to qiskit optmization levels | ||
:param seed: LightSABRE routing is stochastic, with this parameter setting the seed | ||
:param attempts: Number of generated random solutions to pick from. |
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.
Could you add some more details about the return value here?
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.
done
@@ -988,46 +988,6 @@ def lift_perm(p: dict[int, int]) -> np.ndarray: | |||
return pm | |||
|
|||
|
|||
@pytest.mark.skipif(skip_remote_tests, reason=REASON) | |||
def test_compilation_correctness(brisbane_backend: IBMQBackend) -> None: |
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.
Is this potentially an issues for other cases? Should this be documented somewhere?
Local build of the docs looks good, no further edits needed. |
The tests fail because of #414 I would suggest to merge this now as it is. Any objections? |
Replace
CXMappingPass
andPlacement
with aCustomPass
that calls sabre routing as defined bySabreLayoutPassManager
.Checklist