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

refactoring: make CircuitTransformer into an abstract interface #142

Merged
merged 3 commits into from
Feb 10, 2021

Conversation

weinstein
Copy link
Contributor

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).

… constructing QuantumBoard with an optional custom transformer.
recirq/quantum_chess/circuit_transformer.py Outdated Show resolved Hide resolved
recirq/quantum_chess/circuit_transformer.py Outdated Show resolved Hide resolved
recirq/quantum_chess/circuit_transformer.py Show resolved Hide resolved
@weinstein weinstein requested a review from dstrain115 February 9, 2021 23:31
@@ -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)
Copy link
Collaborator

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!

Copy link
Collaborator

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

Copy link
Contributor Author

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.

Copy link
Collaborator

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 :)

@weinstein weinstein merged commit bc3b157 into quantumlib:master Feb 10, 2021
weinstein added a commit to weinstein/ReCirq that referenced this pull request Feb 16, 2021
…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
weinstein added a commit to weinstein/ReCirq that referenced this pull request Feb 16, 2021
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants