quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.28k stars 1.02k forks source link

Cannot serialize cirq_google.experimental.ops.coupler_pulse.CouplerPulse() #6440

Closed aasfaw closed 8 months ago

aasfaw commented 9 months ago

Description of the issue

Serialization isn't supported for cirq_google.experimental.CouplerPulse()

How to reproduce the issue

Run the following circuit:

this_circuit = cirq.Circuit(
              cirq_google.experimental.CouplerPulse(hold_time=hold_time, coupling_mhz = 20)(*qubits),
              cirq.measure(*qubits, key = 'thequbits')
              )
Cannot serialize op cirq_google.experimental.ops.coupler_pulse.CouplerPulse(hold_time=5, coupling_mhz=20, rise_time=cirq.Duration(nanos=8), padding_time=cirq.Duration(picos=2500.0), q0_detune_mhz=0.0, q1_detune_mhz=0.0).on(cirq.GridQubit(4, 5), cirq.GridQubit(5, 5)) of type

Cirq version 1.3.0

eliottrosenberg commented 9 months ago

Hold time is supposed to be a cirq.Duration, but I get the same error when I do that.

dstrain115 commented 9 months ago

Nour, can you take a look at this?