Cannot serialize identity gate on Quantum Engine
See original GitHub issueDescription of the issue
Cannot serialize identity gate when using SQRT_ISWAP_GATESET.
How to reproduce the issue
sampler = engine.get_sampler(processor_id='...', gate_set=cg.SQRT_ISWAP_GATESET)
q = cirq.GridQubit(7, 4)
c = cirq.Circuit(cirq.I(q))
r = sampler.run(c, repetitions=1)
...
ValueError: Cannot serialize op cirq.I(cirq.GridQubit(7, 4)) of type <class 'cirq.ops.identity.IdentityGate'>
Cirq version
0.14.0.dev20211210220312
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Google Cirq Gate Throws Serialization Error #200 - GitHub
We wanted to be able to serialize and deserialize circuits to protocol buffer representations when passing them between our ops (C++ protocol ...
Read more >cirq.IdentityGate - Google Quantum AI
A Gate that perform no operation on qubits. ... diagonal and all 0s off the diagonal in any basis. cirq.I is the single...
Read more >There seems to be a problem with the implementation of ...
There seems to be a problem with the implementation of identity gates on Qiskit as compared to the circuit composer.
Read more >quantum Cirq 1.0 :: Triage Party
4833 · Cannot serialize identity gate on Quantum Engine. 4. 10mo, 4mo, 6mo. kind/bug-report. triage/accepted. area/serialization. priority/p2. assigned.
Read more >Release notes - Azure Quantum | Microsoft Learn
Azure Quantum now supports CCX native gates, this fixes GitHub issue ... Problem.serialize() of the azure.quantum.optimization Python ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Confirmed with @viathor that we should just strip these gates out when serializing. Let’s do this in CircuitSerializer too. @verult
Just FYI: We already have
cirq.drop_negligible_operations
transformer to achieve this.https://github.com/quantumlib/Cirq/blob/afb62da0e33559a47135094047ce3a872740a17e/cirq-core/cirq/transformers/drop_negligible_operations.py#L26