Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

RotatingFrame.vectorized_map_into_frame is not JAX compatible and has ambiguous name #364

@DanPuzzuoli

Description

@DanPuzzuoli

The problem

This method is not JAX compatible (simple fix).

It is also "ambiguous" in the sense that "vectorized_map" does not indicate the nature of the transformation - a vectorized map in this context could either be the state of a differential equation or an operator that acts on states, and both are subject to different transformation rules. It currently implements the operator transformation, and there is no way to do a vectorized state transformation.

Suggestion

JAX fix is easy - I think there is a single usage of np that can be changed to unp. Along with this though, tests need to be added that would have caught this. I don't believe this method is being tested anywhere.

For the ambiguity, this method should be renamed vectorized_map -> vectorized_operator, and the equivalent vectorized_state method should also be added. There also isn't an out_of_frame version of this function, so one should be added for each of the operator and state methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions