Jax, automatic differentiation, and adjoint optimization: basics