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

Add support for cirq.LineQubit to op_serializer.py #632

Merged
merged 3 commits into from Oct 21, 2021
Merged

Add support for cirq.LineQubit to op_serializer.py #632

merged 3 commits into from Oct 21, 2021

Conversation

MichaelBroughton
Copy link
Collaborator

@MichaelBroughton MichaelBroughton commented Oct 17, 2021

Tests are paramterized over qubit types and doesn't appear to boost the runtime by an appreciable amount of my machine.

First step in resolving #611 .

Copy link
Member

@jaeyoo jaeyoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -193,7 +198,7 @@ def to_proto(

msg.gate.id = self.serialized_gate_id
for qubit in op.qubits:
msg.qubits.add().id = '{}_{}'.format(qubit.row, qubit.col)
msg.qubits.add().id = qubit_to_proto(qubit)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

Comment on lines +347 to +350
**x,
**{
'q': q
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool solution.

@jaeyoo jaeyoo merged commit 3344433 into master Oct 21, 2021
@jaeyoo jaeyoo deleted the line_ser branch October 21, 2021 22:40
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.

None yet

2 participants