qiskit-community / qiskit-dynamics

Tools for building and solving models of quantum systems in Qiskit
https://qiskit-community.github.io/qiskit-dynamics/
Apache License 2.0
105 stars 61 forks source link

Make Signal carrier_freq arg compatible with JAX compilation #245

Closed DanPuzzuoli closed 1 year ago

DanPuzzuoli commented 1 year ago

As discussed in #243, the following function is not JAX compatible:

def signal_from_input(pulse_input):
    amp = Array(pulse_input[0])
    w = pulse_input[1]
    sig = Signal(amp, carrier_freq = w)
    return sig(1.)

This is due to the code checking if carrier_freq == 0.0.

I'm pretty surprised this doesn't work - I would have thought this issue would have been caught very early in the development of the project.