Closed BoxiLi closed 7 months ago
It's not that easy to fix as qeye_like
need the data layer type, not just the dimensions.
But in a QobjEvo, different part could have different representation...
But yes, it feels unneeded to evaluate the QobjEvo
and I will try to think of something.
For the side question: Qobj.data_as("jax")
will return the jnp.array
from a Qobj
.
ps. Feel free to open issues about what is not jit compatible in qutip here.
I'm not sure if it is better to raise this issue here or in qutip main.
In functions like
qeye_like
, the dimensions are obtained by first evaluatingQobjEvo
att=0
.This is not always
jit
compatible as the evaluation att=0
may depend on external values. Below is an oversimplified example.A side question, what is the best way to get the
jnp.array
fromQobj
? Is there a public version ofQobj.data._jxa
.