Inconsistent convention for complex derivatives
The convention for the handling of complex derivatives in JAX seems to be mixed. Consider the following two implementations of the abolute value function.
```py
import jax.numpy as np
from jax import grad

def f(x):
    return np.abs(x)

def g(x):
    return np.sqrt(np.real(x)**2 + np.imag(x)**2)

df = grad(f)
dg = grad(g)

print('gradient by df: ',df(1.0+0.5j))
print('gradient by dg: ',dg(1.0+0.5j))
```
The respective results differ by complex conjugation:
```
gradient by df:  (0.8944272-0.4472136j)
gradient by dg:  (0.8944272+0.4472136j)
```
diff --git a/jax/_src/lax/lax.py b/jax/_src/lax/lax.py
index f70cb0df2..7692a59d5 100644
--- a/jax/_src/lax/lax.py
+++ b/jax/_src/lax/lax.py
@@ -2306,7 +2306,7 @@ real_p = unop(_complex_basetype, _complex, 'real')
 ad.deflinear(real_p, lambda t: [complex(t, np.zeros((), _dtype(t)))])
 
 imag_p = unop(_complex_basetype, _complex, 'imag')
-ad.defjvp(imag_p, lambda g, _: real(mul(_const(g, -1j), g)))
+ad.deflinear(imag_p, lambda t: [complex(np.zeros((), _dtype(t)), neg(t))])
 
 _complex_dtype = lambda dtype, *args: (np.zeros((), dtype) + np.zeros((), np.complex64)).dtype
 complex_p = naryop(_complex_dtype, [_complex_elem_types, _complex_elem_types],
diff --git a/tests/lax_autodiff_test.py b/tests/lax_autodiff_test.py
index 4840a69dd..2c737bb14 100644
--- a/tests/lax_autodiff_test.py
+++ b/tests/lax_autodiff_test.py
@@ -1067,6 +1067,20 @@ class LaxAutodiffTest(jtu.JaxTestCase):
     grad_fn = jax.grad(jax.grad(jax.grad(jax.grad(jax.grad(jax.grad(inv))))))
     self.assertAllClose(np.float32(0.0439453125), grad_fn(np.float32(4.)))
 
+  def test_linear_transpose_real(self):
+    f = lambda x: x.real
+    transpose = api.linear_transpose(f, 1.j)
+    actual, = transpose(1.)
+    expected = 1.
+    self.assertEqual(actual, expected)
+
+  def test_linear_transpose_imag(self):
+    f = lambda x: x.imag
+    transpose = api.linear_transpose(f, 1.j)
+    actual, = transpose(1.)
+    expected = -1.j
+    self.assertEqual(actual, expected)
+
 
 if __name__ == '__main__':
   absltest.main(testLoader=jtu.JaxTestLoader())
['jax/_src/lax/lax.py', 'tests/lax_autodiff_test.py']