-
Notifications
You must be signed in to change notification settings - Fork 1k
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 JSON serialization support for QasmUGate #4750
Conversation
@@ -156,6 +156,7 @@ def _parallel_gate_op(gate, qubits): | |||
'VarianceStoppingCriteria': cirq.work.VarianceStoppingCriteria, | |||
'VirtualTag': cirq.VirtualTag, | |||
'WaitGate': cirq.WaitGate, | |||
'QasmUGate': cirq.circuits.qasm_output.QasmUGate, |
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.
Should have alphabetical ordering (before 'QuantumFourierTransformGate': cirq.QuantumFourierTransformGate,
. While we are at it, let's fix the ordering of 'RandomGateChannel': cirq.RandomGateChannel,
as well.
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.
It is more than that! Many items are placed in the wrong order. Since you mentioned it, I reordered them in the new commit.
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.
Nice! Thanks for going the extra mile! I've left a few minor comments then this should be good to merge.
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.
Please make the suggested changes manually. Clicking on the "commit suggestions" tends to screw up the CLA bot.
Sorry, I did not see this until I click... |
@vtomole You are right, the CLA bot is screwed up. I tried to trigger the CI process like last time, but it did not work. It is interesting that the bot is not complaining about me actually, it complained about you: Finally, I have to reset hard to the commit before clicking "commit suggestions" and forced push it. It seems that the PR goes back to the right track. 🙏 |
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.
LGTM!
This PR provides the serialization support for the `QasmUGate` class following [serialization.md](https://github.com/quantumlib/Cirq/blob/master/docs/dev/serialization.md). Without this support, `QasmUGate` cannot be properly serialized and deserialized, which causes issue quantumlib#4728. The test of serialization ability is done through the .repr and .json files under json_test_data folder. These files are also added for `QasmUGate`. close quantumlib#4728
This PR provides the serialization support for the `QasmUGate` class following [serialization.md](https://github.com/quantumlib/Cirq/blob/master/docs/dev/serialization.md). Without this support, `QasmUGate` cannot be properly serialized and deserialized, which causes issue quantumlib#4728. The test of serialization ability is done through the .repr and .json files under json_test_data folder. These files are also added for `QasmUGate`. close quantumlib#4728
This PR provides the serialization support for the `QasmUGate` class following [serialization.md](https://github.com/quantumlib/Cirq/blob/master/docs/dev/serialization.md). Without this support, `QasmUGate` cannot be properly serialized and deserialized, which causes issue quantumlib#4728. The test of serialization ability is done through the .repr and .json files under json_test_data folder. These files are also added for `QasmUGate`. close quantumlib#4728
This PR provides the serialization support for the
QasmUGate
class following serialization.md. Without this support,QasmUGate
cannot be properly serialized and deserialized, which causes issue #4728.The test of serialization ability is done through the .repr and .json files under json_test_data folder. These files are also added for
QasmUGate
.close #4728