Skip to content

Commit 382c626

Browse files
fix some docs
1 parent 908e25d commit 382c626

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

docs/source/api/interfaces.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
tensorcircuit.interfaces
22
================================================================================
33
.. toctree::
4+
interfaces/jax.rst
45
interfaces/numpy.rst
56
interfaces/scipy.rst
67
interfaces/tensorflow.rst

docs/source/api/interfaces/jax.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
tensorcircuit.interfaces.jax
2+
================================================================================
3+
.. automodule:: tensorcircuit.interfaces.jax
4+
:members:
5+
:undoc-members:
6+
:show-inheritance:
7+
:inherited-members:

docs/source/contribution.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,9 @@ And from GitHub page choose draft a release from tag.
250250
export VERSION=0.x.y
251251
twine upload dist/tensorcircuit-${VERSION}-py3-none-any.whl dist/tensorcircuit-${VERSION}.tar.gz
252252
253-
For upload authetication via token, please refer `this tutorial <https://kynan.github.io/blog/2020/05/23/how-to-upload-your-package-to-the-python-package-index-pypi-test-server>`__ . (username is ``__token__``)
253+
For upload authetication via token, please refer `this tutorial <https://kynan.github.io/blog/2020/05/23/how-to-upload-your-package-to-the-python-package-index-pypi-test-server>`__ .
254+
Latest version of twine direct accepts token.
255+
254256

255257
**DockerHub Release**
256258

docs/source/sharpbits.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,16 @@ Also see the code below for a reference:
228228
# [0.90929747 0.90929747]
229229
230230
231-
VMAP outside grad-like function on tensorflow backend
232-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
231+
VMAP outside grad-like function on tensorflow backend
232+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233233

234-
Vmap (vectorized map) outside a grad-like function may cause incorrected results on TensorFlow backends due to a long existing `bug <https://github.com/tensorflow/tensorflow/issues/52148>`_ in TensorFlow codebase. So better always stick to the first-vmap-then-differentiated paradigm.
234+
Vmap (vectorized map) outside a grad-like function may cause incorrected results on TensorFlow backends due to a long existing `bug <https://github.com/tensorflow/tensorflow/issues/52148>`_ in TensorFlow codebase. So better always stick to the first-vmap-then-differentiated paradigm.
235235

236-
Grad over vmap function
237-
~~~~~~~~~~~~~~~~~~~~~~~~~
236+
Grad over vmap function
237+
~~~~~~~~~~~~~~~~~~~~~~~~~
238238

239-
A related issue is the different behavior for `K.grad(K.vmap(f))` on different backends. For tensorflow backend, the function to be differentiated has a scalar output which is the sum of all outputs.
239+
A related issue is the different behavior for `K.grad(K.vmap(f))` on different backends. For tensorflow backend, the function to be differentiated has a scalar output which is the sum of all outputs.
240240

241-
However, for Jax backend, the function simply raise error as only scalar output function can be differentiated, no implicit sum of the vectorized ``f`` is assumed. For non-scalar output, one should use `jacrev` or `jacfwd` to get the gradient information.
241+
However, for Jax backend, the function simply raise error as only scalar output function can be differentiated, no implicit sum of the vectorized ``f`` is assumed. For non-scalar output, one should use `jacrev` or `jacfwd` to get the gradient information.
242242

243-
Specifically, `K.grad(K.vmap(f))` on TensorFlow backend is equilvalent to `K.grad(K.append(K.vamp(f), K.sum))` on Jax backend.
243+
Specifically, `K.grad(K.vmap(f))` on TensorFlow backend is equilvalent to `K.grad(K.append(K.vamp(f), K.sum))` on Jax backend.

0 commit comments

Comments
 (0)