q-optimize / c3

Toolset for control, calibration and characterization of physical systems
https://c3-toolset.readthedocs.io/
Apache License 2.0
66 stars 36 forks source link

PWC pulse has incorrect dimensions #201

Closed Ashutosh-Mishra2 closed 2 years ago

Ashutosh-Mishra2 commented 2 years ago

Describe the bug

AWG returns a signal of shape (n, n) instead of (n, ). This causes error during computing the propagator.

To Reproduce

Steps to reproduce the behavior. This can be in the form of a code snippet or some config files or a notebook to produce a minimum viable example of the bug.

Expected behavior

AWG should return an (1D) array for the signal.

Screenshots

image

Environment (please complete the following information)

Ashutosh-Mishra2 commented 2 years ago

I think this issue occurs as the shape of the pulse (from pwc_shape in envelopes.py) has shape (n, 1). And shape of mask (in _get_shape_values_just in pulse.py) is (n, ). Multiplying the mask to the pulse gives a shape of (n, n).

Changing [len(t), 1] (line 65, pwc_shape in envelop.py) to [len(t)] seems to work.

nwittler commented 2 years ago

Please add a config or script that produces the error.

nwittler commented 2 years ago

Can you add it in test form, so that #202 fails?