-
Notifications
You must be signed in to change notification settings - Fork 117
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
refactoring: make CircuitTransformer into an abstract interface #142
Conversation
… constructing QuantumBoard with an optional custom transformer.
@@ -103,7 +103,7 @@ def place_on_device(circuit: cirq.Circuit, | |||
for n1, n2 in unit.initial_map.items()} | |||
final_map = {tk_to_cirq_qubit(n1): tk_to_cirq_qubit(n2) | |||
for n1, n2 in unit.final_map.items()} | |||
routed_circuit = pytket.cirq.tk_to_cirq(unit.circuit) | |||
routed_circuit = pytket.extensions.cirq.tk_to_cirq(unit.circuit) |
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.
Oh, I saw this on another PR, Nice job tracking this down!
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.
ah in the future can you ping me or open this as a separate fix PR. This issue also exists in the notebooks and I had to re-discover the solution xref #148
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.
my bad! Will do next time.
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.
no worries! I was trying to complain at @dstrain115 :)
…tumlib#142) * refactor out an abstract interface for circuit transformers and allow constructing QuantumBoard with an optional custom transformer. * fix pytket cirq extension import after new version of pytket
…tumlib#142) * refactor out an abstract interface for circuit transformers and allow constructing QuantumBoard with an optional custom transformer. * fix pytket cirq extension import after new version of pytket
this way as additional transformations are implemented (see #127 quantumlib/unitary#49 quantumlib/unitary#48) we can implement additional transformations and swap them out more easily (ex for evaluation).