You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/advance.rst
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The larger bond dimension we set, the better approximation ratio (of course the
19
19
Stacked gates
20
20
----------------
21
21
22
-
Stacked gates is a simple grammar sugar to make constructing the circuit easily when multiple gate of the same type are applied on the different qubits, namely, the index for gate function can accept list of ints instead of one integer.
22
+
Stacked-gate is a simple syntactic sugar rendering circuit construction easily when multiple gate of the same type are applied on different qubits, namely, the index for gate call can accept list of ints instead of one integer.
23
23
24
24
.. code-block:: python
25
25
@@ -98,12 +98,14 @@ Analog circuit simulation
98
98
99
99
TensorCircuit-NG support digital-analog hybrid simulation (say cases in Rydberg atom arrays), where the analog part is simulated by the neural differential equation solver given the API to specify a time dependent Hamiltonian.
100
100
The simulation is still differentiable and jittable. Only jax backend is supported for analog simulation as the neural ode engine is built on top of jax.
101
+
101
102
This utility is super helpful for optimizing quantum control or investigating digital-analog hybrid variational quantum schemes.
102
-
We support two modes of analog simulation, where :py:meth:`tensorcircuit.experimentaql.evol_global` evolve the state via a Hamiltonian define on the whole system, and :py:meth:`tensorcircuit.experimentaql.evol_local` evolve the state via a Hamiltonian define on a local subsystem.
103
+
104
+
We support two modes of analog simulation, where :py:meth:`tensorcircuit.experimental.evol_global` evolve the state via a Hamiltonian define on the whole system, and :py:meth:`tensorcircuit.experimental.evol_local` evolve the state via a Hamiltonian define on a local subsystem.
103
105
104
106
.. Note::
105
107
106
-
``evol_global`` use sparse Hamiltonian while ``evol_local`` use dense Hamiltonian.
108
+
``evol_global`` uses sparse Hamiltonian while ``evol_local`` uses dense Hamiltonian.
107
109
108
110
109
111
.. code-block:: python
@@ -155,9 +157,9 @@ We wrap the tf-backend `SavedModel` as very easy-to-use function :py:meth:`tenso
155
157
156
158
For the JAX-backend quantum function, one can first transform them into the tf-backend function via JAX experimental support: `jax2tf <https://github.com/google/jax/tree/main/jax/experimental/jax2tf>`_.
157
159
158
-
**Updates**: jax now also support jitted function save/load via ``export`` module, see `jax documentation <https://jax.readthedocs.io/en/latest/export/export.html>_`.
160
+
**Updates**: jax now also support jitted function save/load via ``export`` module, see `jax documentation <https://jax.readthedocs.io/en/latest/export/export.html>`_.
159
161
160
-
We wrape the jax function export capability in ``experimental`` module and can be used as follows
162
+
We wrap the jax function export capability in ``experimental`` module and can be used as follows
Copy file name to clipboardExpand all lines: docs/source/index.rst
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,11 @@ TensorCircuit Next Generation
7
7
8
8
**Welcome and congratulations! You have found TensorCircuit: the Next Generation.** 👏
9
9
10
+
10
11
Introduction
11
12
---------------
12
13
13
-
TensorCircuit-NG is an open-source high-performance quantum computing software framework in Python.
14
+
TensorCircuit-NG is an open-source high-performance quantum software framework in Python.
14
15
15
16
* It is built for humans. 👽
16
17
@@ -22,16 +23,21 @@ TensorCircuit-NG is an open-source high-performance quantum computing software f
22
23
23
24
* It is implemented with industry-standard machine learning frameworks: TensorFlow, JAX, and PyTorch. 🤖
24
25
26
+
* It is flexible and powerful to build and simulate tensor networks, neural networks and quantum circuits together. 🧠
27
+
25
28
* It is compatible with machine learning engineering paradigms: automatic differentiation, just-in-time compilation, vectorized parallelism and GPU acceleration. 🛠
26
29
27
-
With the help of TensorCircuit-NG, now get ready to efficiently and elegantly solve interesting and challenging quantum computing problems: from academic research prototype to industry application deployment.
30
+
With the help of TensorCircuit-NG, now get ready to efficiently and elegantly solve interesting and challenging quantum computing and quantum many-body problems: from academic research prototype to industry application deployment.
28
31
32
+
.. important::
33
+
Please cite the `whitepaper <https://quantum-journal.org/papers/q-2023-02-02-912/>`_ when using TensorCircuit or TensorCircuit-NG in your research. The bibtex information is provided by ``tc.cite()``.
29
34
30
35
31
36
32
-
Relevant Links
37
+
Useful Links
33
38
--------------------
34
39
40
+
35
41
TensorCircuit is created and now maintained as TensorCircuit-NG by `Shi-Xin Zhang <https://github.com/refraction-ray>`_.
36
42
37
43
The current core authors of TensorCircuit-NG are `Shi-Xin Zhang <https://github.com/refraction-ray>`_ and `Yu-Qin Chen <https://github.com/yutuer21>`_.
@@ -153,19 +159,19 @@ TensorCircuit-NG is unifying infrastructures and interfaces for quantum computin
153
159
:columns: 12 6 3 3
154
160
:shadow: md
155
161
156
-
ideal/noisy/approximate simulation
162
+
ideal/noisy/approximate/analog simulation
157
163
158
164
.. grid-item-card:: Unified Representations
159
165
:columns: 12 6 3 3
160
166
:shadow: md
161
167
162
168
from/to_IR/qiskit/openqasm/json
163
169
164
-
.. grid-item-card:: Unified Pipelines
170
+
.. grid-item-card:: Unified Objects
165
171
:columns: 12 6 3 3
166
172
:shadow: md
167
173
168
-
stateless functional programming/stateful ML models
@@ -27,7 +27,6 @@ Docker is also recommended (especially Linux + Nvidia GPU setup):
27
27
28
28
For more details on docker setup, please refer to `docker readme <https://github.com/tensorcircuit/tensorcircuit-ng/tree/master/docker>`_.
29
29
30
-
- For Windows, due to the lack of support for Jax, we recommend to use docker or WSL, please refer to `TC via windows docker <contribs/development_windows.html>`_ or `TC via WSL <contribs/development_wsl2.html>`_.
31
30
32
31
Overall, the installation of TensorCircuit-NG is simple, since it is purely in Python and hence very portable.
33
32
As long as the users can take care of the installation of ML frameworks on the corresponding system, TensorCircuit-NG will work as expected.
@@ -239,6 +238,7 @@ To learn more about the jit mechanism, one can refer to documentation or blogs o
239
238
240
239
Inputs, parameters, measurements, circuit structures, and Monte Carlo noise can all be evaluated in parallel.
241
240
To learn more about vmap mechanism, one can refer to documentation or blogs on ``tf.vectorized_map`` or ``jax.vmap``.
241
+
One can also refer to `tutorial <https://tensorcircuit-ng.readthedocs.io/en/latest/whitepaper/6-3-vmap.html>`_ for more details on the vmap usage in TensorCircuit-NG.
Copy file name to clipboardExpand all lines: tensorcircuit/about.py
+46Lines changed: 46 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -23,20 +23,26 @@ def about() -> None:
23
23
print(f"Scipy version: {scipy.__version__}")
24
24
exceptModuleNotFoundError:
25
25
print(f"Scipy is not installed")
26
+
exceptExceptionase:
27
+
print(f"Misconfiguration for Scipy: {e}")
26
28
27
29
try:
28
30
importpandas
29
31
30
32
print(f"Pandas version: {pandas.__version__}")
31
33
exceptModuleNotFoundError:
32
34
print(f"Pandas is not installed")
35
+
exceptExceptionase:
36
+
print(f"Misconfiguration for Pandas: {e}")
33
37
34
38
try:
35
39
importtensornetworkastn
36
40
37
41
print(f"TensorNetwork version: {tn.__version__}")
38
42
exceptModuleNotFoundError:
39
43
print(f"TensorNetwork is not installed")
44
+
exceptExceptionase:
45
+
print(f"Misconfiguration for TensorNetwork: {e}")
40
46
41
47
try:
42
48
importcotengra
@@ -47,6 +53,8 @@ def about() -> None:
47
53
print(f"Cotengra: installed")
48
54
exceptModuleNotFoundError:
49
55
print(f"Cotengra is not installed")
56
+
exceptExceptionase:
57
+
print(f"Misconfiguration for Cotengra: {e}")
50
58
51
59
try:
52
60
importtensorflowastf
@@ -56,6 +64,8 @@ def about() -> None:
56
64
print(f"TensorFlow CUDA infos: {dict(tf.sysconfig.get_build_info())}")
57
65
exceptModuleNotFoundError:
58
66
print(f"TensorFlow is not installed")
67
+
exceptExceptionase:
68
+
print(f"Misconfiguration for TensorFlow: {e}")
59
69
60
70
try:
61
71
importjax
@@ -68,13 +78,17 @@ def about() -> None:
68
78
print(f"Jax installation doesn't support GPU")
69
79
exceptModuleNotFoundError:
70
80
print(f"Jax is not installed")
81
+
exceptExceptionase:
82
+
print(f"Misconfiguration for Jax: {e}")
71
83
72
84
try:
73
85
importjaxlib
74
86
75
87
print(f"JaxLib version: {jaxlib.__version__}")
76
88
exceptModuleNotFoundError:
77
89
print(f"JaxLib is not installed")
90
+
exceptExceptionase:
91
+
print(f"Misconfiguration for Jaxlib: {e}")
78
92
79
93
try:
80
94
importtorch
@@ -88,32 +102,64 @@ def about() -> None:
88
102
print(f"Pytorch cuda version: {torch.version.cuda}")
89
103
exceptModuleNotFoundError:
90
104
print(f"PyTorch is not installed")
105
+
exceptExceptionase:
106
+
print(f"Misconfiguration for Torch: {e}")
91
107
92
108
try:
93
109
importcupy
94
110
95
111
print(f"Cupy version: {cupy.__version__}")
96
112
exceptModuleNotFoundError:
97
113
print(f"Cupy is not installed")
114
+
exceptExceptionase:
115
+
print(f"Misconfiguration for Cupy: {e}")
98
116
99
117
try:
100
118
importqiskit
101
119
102
120
print(f"Qiskit version: {qiskit.__version__}")
103
121
exceptModuleNotFoundError:
104
122
print(f"Qiskit is not installed")
123
+
exceptExceptionase:
124
+
print(f"Misconfiguration for Qiskit: {e}")
105
125
106
126
try:
107
127
importcirq
108
128
109
129
print(f"Cirq version: {cirq.__version__}")
110
130
exceptModuleNotFoundError:
111
131
print(f"Cirq is not installed")
132
+
exceptExceptionase:
133
+
print(f"Misconfiguration for Cirq: {e}")
112
134
113
135
fromtensorcircuitimport__version__
114
136
115
137
print(f"TensorCircuit version {__version__}")
116
138
117
139
140
+
defcite(format: str="bib") ->str:
141
+
"""
142
+
Returns the citation information for tensorcircuit.
143
+
Please cite our work if you use the package in your research.
144
+
145
+
:param format: format for bib, defaults to "bib"
146
+
:type format: str, optional
147
+
:return: the citation information
148
+
:rtype: str
149
+
"""
150
+
ifformat=="bib":
151
+
return"""@article{Zhang_TensorCircuit_2023,
152
+
author = {Zhang, Shi-Xin and Allcock, Jonathan and Wan, Zhou-Quan and Liu, Shuo and Sun, Jiace and Yu, Hao and Yang, Xing-Han and Qiu, Jiezhong and Ye, Zhaofeng and Chen, Yu-Qin and Lee, Chee-Kong and Zheng, Yi-Cong and Jian, Shao-Kai and Yao, Hong and Hsieh, Chang-Yu and Zhang, Shengyu},
153
+
doi = {10.22331/q-2023-02-02-912},
154
+
journal = {Quantum},
155
+
month = feb,
156
+
title = {{TensorCircuit: a Quantum Software Framework for the NISQ Era}},
157
+
volume = {7},
158
+
year = {2023}}"""
159
+
elifformat=="aps":
160
+
return"""S.-X. Zhang, J. Allcock, Z.-Q. Wan, S. Liu, J. Sun, H. Yu, X.-H. Yang, J. Qiu, Z. Ye, Y.-Q. Chen, C.-K. Lee, Y.-C. Zheng, S.-K. Jian, H. Yao, C.-Y. Hsieh, and S. Zhang, TensorCircuit: a Quantum Software Framework for the NISQ Era, Quantum 7, 912 (2023)."""# pylint: disable=line-too-long
0 commit comments