Skip to content

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

Merged
jaeyoo merged 3 commits into
masterfrom
line_ser
Oct 21, 2021
Merged

Add support for cirq.LineQubit to op_serializer.py#632
jaeyoo merged 3 commits into
masterfrom
line_ser

Conversation

@MichaelBroughton
Copy link
Copy Markdown
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
Copy Markdown
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

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
Copy Markdown
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
Copy Markdown
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.

2 participants