Encountering 'Casting complex values to real discards the imaginary part' When Trying to Train a DiagonalQubitUnitary

Hi @Tz_19 ,

That ComplexWarning can sometimes arise but there shouldn’t be any reason to worry. It often happens when you have real + 0j kind of numbers. In this case I would suggest checking with a small example or printing one output just to be sure that everything’s as expected. But in general I wouldn’t worry too much about that warning.