Cirq
Cirq copied to clipboard
Deprecated `gate_set` still set by `CircuitSerializer`
The CircuitSerializer
continues to set the deprecated gate_set
field on Program
messages. This should be cleaned up, but is blocked by https://github.com/qh-lab/pyle/issues/29210 since the field is actually still required.
The serializer utility also requires the gate_set
for deserialization, which should not happen if the field is truly deprecated. It also looks like we can no longer deserialize circuits that were stored with legacy gatesets, which continue to exist in the Quantum Engine and can be retrieved by users. Was this intentional? In general, I expect that we should remain backwards-compatible with stored data even if we make breaking changes in code since users can update their code but can't update legacy data stores.
Thanks for the catch!
The CircuitSerializer continues to set the deprecated gate_set field on Program messages. This should be cleaned up, but is blocked by https://github.com/qh-lab/pyle/issues/29210 since the field is actually still required. The serializer utility also requires the gate_set for deserialization, which should not happen if the field is truly deprecated.
Will do, it was an oversight that this wasn't cleaned up after Cirq is updated on server side.
It also looks like we can no longer deserialize circuits that were stored with legacy gatesets, which continue to exist in the Quantum Engine and can be retrieved by users. Was this intentional?
I hadn't thought about that. My take is users can still use an old Cirq version to deserialize old stored circuits. A warning could be added to newer Cirq versions to recommend using an older version if the gate_set
field is unrecognized. WDYT?
Need to check how this interacts with server side replay functionality. The same solution for retrieving historical programs can likely be used for this.