-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support complex-to-real optimization #76
Comments
@patrick-kidger specifically the third point requires some design decision which I yet have no idea how to realize. Make complex-to-real operator support in Lineax? |
I think JAX has a sharply limited notion of complex linearity, to be honest. They're pretty up-front about the fact that they're really just treating things as functions between vector spaces over the reals. Thinking out loud: linearity is the property that We should follow JAX's lead on this one, I think, if we're going to interface well with the rest of its ecosystem. |
You are correct that linear map between vector spaces over different fields doesn't make sense, definitely when the field of the input has elements not contained in the field of the output. If I understand correctly, I'm not familiar with internals, but making |
So, thinking out loud, the only real place we are affected is materialization. As long as we do not materialize the matrix, jax internals take care of everything for us. When we want to materialize, we have a problem since the materialization of However, if we want to have a uniform interface, I think we should allow representing the So, the first step would be to make lineax
Then, it should be possible to use those for optimization. What do you think? |
I like the identification of materialization as being where things go wrong. I think that's plausibly the main problem or only problem for us. What does |
jax gives an error and suggests to use |
It would be really cool to have this in Optimistix!
That's funny, I think I actually added that to the error message in this pull request, which incidentally is about supporting heterogeneous pytrees (with complex and real values).
I just wonder why you need the flag? Wouldn't it be more ideal to support any pytree input? It might we worth it to take a look at my pull request to see how I did it and whether you can adapt my solution (or more ideally call into it somehow) to Optimistix? |
I agree that support for arbitrary pytree can be nice. |
Totally agree!
Maybe. Is it possible to fix |
Depends on you expectations of |
Related tutorial that discusses similar issues of JVP of C->R functions: |
tree_dot
lineax#105)The text was updated successfully, but these errors were encountered: