-
Notifications
You must be signed in to change notification settings - Fork 4
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
Automatic multizone routing #48
Conversation
pytket/extensions/aqt/multi_zone_architecture/circuit_routing/route_zones.py
Outdated
Show resolved
Hide resolved
@@ -4,7 +4,7 @@ | |||
from dataclasses import dataclass |
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.
Some of the files are missing the "# Copyright 2020-2023 Cambridge Quantum Computing" note at the beginning. Can you please add that?
pytket/extensions/aqt/multi_zone_architecture/circuit/multizone_circuit.py
Show resolved
Hide resolved
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 for the update, one more question.
@@ -366,6 +380,26 @@ def copy(self) -> "MultiZoneCircuit": | |||
new_circuit.multi_zone_operations = deepcopy(self.multi_zone_operations) | |||
return new_circuit | |||
|
|||
def get_n_shuttles(self) -> int: |
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.
Were are this two functions used?
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.
Just there for characterization of circuit after compilation. I added some test code for it.
count += 1 | ||
return count | ||
|
||
def get_n_pswaps(self) -> int: |
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.
See above
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.
Just there for characterization of circuit after compilation. I added some test code for it.
pytket/extensions/aqt/multi_zone_architecture/circuit_routing/route_zones.py
Outdated
Show resolved
Hide resolved
Also added docstrings for the |
@@ -141,3 +139,28 @@ def get_zone_max_ions(self, zone_index: int) -> int: | |||
zone = self.zones[zone_index] | |||
zone_type = self.zone_types[zone.zone_type_id] | |||
return zone_type.max_ions | |||
|
|||
def __str__(self) -> str: |
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 tested 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'm using it in a jupyter notebook. Added test that it, in fact returns a string. But not sure if it makes sense to test the exact content of the string at the moment.
* implement initial routing * allow custom initial placement * remove not implemented * add documentation * review suggestions * better documentation of move_qubit * test get_n_shuttles and get_n_pswaps * docstring for get_n_shuttles and get_n_pswaps * Allow generate AQT syntax directly from pytket circuit * refactor architecture class, add print function and another named architecture * add docstring * add test for architecture string, add copyright notices in test files * update changelog * use equivalent definition of diamond pattern arch
Add simple automatic circuit routing for the aqt_multi_zone backend