SchusterLab / quantum-optimal-control

74 stars 31 forks source link

Negative loss #11

Closed pranavm1502 closed 6 years ago

pranavm1502 commented 6 years ago

I get a negative infidelity for L-BFGS-B algorithm. This should imply that there is something incorrect in the reg_loss or inner_product_2D function. But I am unable to figure out the problem.

image

nelsonleung commented 6 years ago

Hi Pranav,

From the plot I see your Unitary Metric tr(U^dag * U)/dim(U)[0] to be 1.00052 > 1. A non-1.0 Unitary Metric typically means your delta t is too large, which causes numerical instability. This can be solved by setting a larger number of step size. Let me know if it works for you.

pranavm1502 commented 6 years ago

Hi Nelson,

Thanks for the advice! That works.