Skip to content

Commit 3d291e0

Browse files
committedFeb 10, 2022
update readme and docs
1 parent eeca7a1 commit 3d291e0

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed
 

‎README.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ TensorCircuit is built on top of modern machine learning frameworks, and has the
66

77
## Basic Usage
88

9+
Please begin with [Quick Start](/docs/source/quickstart.rst) and [Jupyter Tutorials](https://github.com/quclub/tensorcircuit-tutorials/tree/master/tutorials).
10+
11+
For more information and introductions, please refer to helpful scripts [examples](/examples) and [documentations](/docs/source). API docstrings (incomplete for now) and test cases in [tests](/tests) are also informative.
12+
13+
The following are some minimal demos.
14+
15+
Circuit manipulation:
16+
917
```python
1018
import tensorcircuit as tc
1119
c = tc.Circuit(2)
1220
c.H(0)
1321
c.CNOT(0,1)
22+
c.rx(1, theta=0.2)
1423
print(c.wavefunction())
1524
print(c.expectation((tc.gates.z(), [1])))
25+
print(c.perfect_sampling())
1626
```
1727

1828
Runtime behavior customization:
@@ -23,10 +33,9 @@ tc.set_dtype("complex128")
2333
tc.set_contractor("greedy")
2434
```
2535

26-
Auto differentiations with jit:
36+
Automatic differentiations with jit:
2737

2838
```python
29-
@tc.backend.jit
3039
def forward(theta):
3140
c = tc.Circuit(2)
3241
c.R(0, theta=theta, alpha=0.5, phi=0.8)
@@ -38,13 +47,11 @@ theta = tc.gates.num_to_tensor(1.0)
3847
print(g(theta))
3948
```
4049

41-
Please begin with [Quick Start](/docs/source/quickstart.rst) and [Jupyter Tutorials](https://github.com/quclub/tensorcircuit-tutorials/tree/master/tutorials).
42-
43-
For more information and introductions, please refer to examples and docs/source in this repo. API docstrings (incomplete for now) and test cases in tests are also helpful and informative.
44-
4550
## Contributing
4651

47-
### Guidelines
52+
For contribution guidelines and notes, see [CONTRIBUTING](/CONTRIBUTING.md).
53+
54+
### Cautions
4855

4956
Please open issues or PRs.
5057

@@ -56,8 +63,6 @@ Keep the codebase private!
5663

5764
For development workflow, we suggest to first configure a good conda environment. The versions of dependecy package may vary in terms of development requirements. The minimum requirement is the [TensorNetwork](https://github.com/google/TensorNetwork) package (pip install suggested).
5865

59-
For git workflow of contribution, see [CONTRIBUTING](/CONTRIBUTING.md).
60-
6166
### Docs
6267

6368
```bash
@@ -97,10 +102,6 @@ For now, we introduce one for all checker for development:
97102
./check_all.sh
98103
```
99104

100-
### CI
101-
102-
We currently use GitHub Action for test CI, but it has limited quota for free private repo.
103-
104105
## Research projects and application codes
105106

106107
### DQAS

‎docs/source/advance.rst

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ The two-qubit gates applied on the circuit can be decomposed via SVD, which may
3131
split=split_conf
3232
)
3333
34+
Note ``max_singular_values`` must be specified to make the whole procedure static and thus jittable.
35+
3436

3537
SavedModel
3638
-----------------

‎docs/source/quickstart.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ The related API design in TensorCircuit closely follows the functional programmi
169169

170170
**AD support:**
171171

172-
gradients, vjps, jvps, natural gradients, Jacobians and Hessians
172+
Gradients, vjps, jvps, natural gradients, Jacobians and Hessians
173173

174174
**JIT support:**
175175

176-
parameterized quantum circuit can run in a blink. Always use jit if the circuit will get evaluations multiple times, it greatly boost the simulation efficiency with two or three order time reduction. But also be caution, you need to be an expert on jit, otherwise the jitted function may return unexpected results or recompiling on every hit (wasting lots of time).
176+
Parameterized quantum circuit can run in a blink. Always use jit if the circuit will get evaluations multiple times, it greatly boost the simulation efficiency with two or three order time reduction. But also be caution, you need to be an expert on jit, otherwise the jitted function may return unexpected results or recompiling on every hit (wasting lots of time).
177177

178178
**VMAP support:**
179179

‎requirements-docker.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ tensorflow==2.7
55
tensornetwork==0.4.6
66
graphviz
77
jax==0.2.27
8-
# jablib indepedent specify the version
8+
# jaxlib indepedent specify the version in Dockerfile
99
torch
1010
torchvision
1111
networkx

0 commit comments

Comments
 (0)
Please sign in to comment.