How to use jax.custom_vjp with functions that take non-JAX types (e.g., SymPy expressions) as inputs?
I’m trying to use JAX’s custom_vjp to define custom gradient computations for a function that takes a SymPy expression as an input. However, I’m encountering errors because JAX doesn’t support non-JAX types as inputs for functions that are transformed (e.g., with grad, jit, or custom_vjp). I am recently modifying code in ScQubits to add a new jax backend to improve the efficiency, and then I meet some problem with jax and sympy.
TypeError: ‘Add’ object is not iterable when iterating over SymPy expressions in scqubits with JAX custom_vjp
I’m trying to modify the scqubits Python package to use JAX’s custom_vjp for differentiable programming. While doing so, I encountered the following error:
TypeError: ‘Add’ object is not iterable when iterating over SymPy expressions in scqubits with JAX custom_vjp
I’m trying to modify the scqubits Python package to use JAX’s custom_vjp for differentiable programming. While doing so, I encountered the following error:
TypeError: ‘Add’ object is not iterable when iterating over SymPy expressions in scqubits with JAX custom_vjp
I’m trying to modify the scqubits Python package to use JAX’s custom_vjp for differentiable programming. While doing so, I encountered the following error:
TypeError: ‘Add’ object is not iterable when iterating over SymPy expressions in scqubits with JAX custom_vjp
I’m trying to modify the scqubits Python package to use JAX’s custom_vjp for differentiable programming. While doing so, I encountered the following error:
TypeError: ‘Add’ object is not iterable when iterating over SymPy expressions in scqubits with JAX custom_vjp
I’m trying to modify the scqubits Python package to use JAX’s custom_vjp for differentiable programming. While doing so, I encountered the following error:
TypeError: ‘Add’ object is not iterable when iterating over SymPy expressions in scqubits with JAX custom_vjp
I’m trying to modify the scqubits Python package to use JAX’s custom_vjp for differentiable programming. While doing so, I encountered the following error: