Closed ArbitRandomUser closed 1 year ago
Add 'hmax': dt
to solver_options
, as is done in the DynamicsBackend tutorial. This will limit the step size to never exceed the width of a sample, and should solve this problem.
'jax_odeint'
seems to be pretty aggressive in the rate at which it increases the step size. As the simulation is by-default performed in the rotating frame of the drift, if the pulse amplitudes are 0
at some point, then the Hamiltonian in this frame is actually fully 0
, and hence there is no evolution. During this period the solver will rapidly increase the step size to the point that it will just jump the end. Limiting the max step size as above fixes this issue.
I'm going to close this for now, but if this doesn't solve your problem we can reopen.
solved
Informations
What is the current behavior?
if the pulse amplitude in the first "dt" is 0 , the resultant probabilities is always {000: no_shots} . I.E there seems to be probability-amplitude only on the 000 basis whatever be the evolution.
Steps to reproduce the problem
run attached file mwe.py the example plays a constant pulse with amnplitude 0 for dt and then amplitude 1 for 100 dt.
toggle comment line 80 , to see the difference between . one can change the 100 to different values and see that whatever be the duration the subsequent pulse is played the result is always {'000':no_shots}
What is the expected behavior?
some probabilities should develop on all the basis , however whatever be the schedule if the amp during the first dt is 0 the result is always {'000':no_shots}. This is not restricted to playing pulse.Constant , playing pulse.Waveform too gives similar bug when the amplitude starts of at 0.
This bug is restricted to passing 'jax_odeint' to the solver. using numpy as the backend does not give the same problem
Suggested solutions
something to do with jax_odeint , idk really !.
mwe.py