Skip to content

Commit acf6944

Browse files
update readme
1 parent 3be3f33 commit acf6944

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525

2626
<p align="center"> English | <a href="README_cn.md"> 简体中文 </a></p>
2727

28-
TensorCircuit-NG is the next-generation open-source high-performance quantum software framework, built upon tensornetwork engines, supporting for automatic differentiation, just-in-time compiling, hardware acceleration, and vectorized parallelism, providing unified infrastructures and interfaces for quantum programming. It can compose quantum circuits, neural networks and tensor networks seamlessly with high simulation efficiency and flexibility.
28+
TensorCircuit-NG is the next-generation open-source high-performance quantum software framework, built upon tensornetwork engines, supporting for automatic differentiation, just-in-time compiling, hardware acceleration, vectorized parallelism and distributed training, providing unified infrastructures and interfaces for quantum programming. It can compose quantum circuits, neural networks and tensor networks seamlessly with high simulation efficiency and flexibility.
2929

30-
TensorCircuit-NG is built on top of modern machine learning frameworks: Jax, TensorFlow, and PyTorch. It is specifically suitable for large-scale simulations of quantum-classical hybrid paradigm and variational quantum algorithms in ideal, noisy, Clifford, approximate and analog cases. It also supports quantum hardware access and provides CPU/GPU/QPU hybrid deployment solutions.
30+
TensorCircuit-NG is built on top of modern machine learning frameworks: Jax, TensorFlow, and PyTorch. It is specifically suitable for large-scale simulations of quantum-classical hybrid paradigm and variational quantum algorithms in ideal, noisy, Clifford, approximate, analog and fermionic cases. It also supports quantum hardware access and provides CPU/GPU/QPU hybrid deployment solutions.
3131

32-
TensorCircuit-NG is the actively maintained official version and a [fully compatible](https://tensorcircuit-ng.readthedocs.io/en/latest/faq.html#what-is-the-relation-between-tensorcircuit-and-tensorcircuit-ng) successor to TensorCircuit with more new features (stabilizer circuit and distributed simulation) and bug fixes (support latest `numpy>2` and `qiskit>1`).
32+
TensorCircuit-NG is the actively maintained official version and a [fully compatible](https://tensorcircuit-ng.readthedocs.io/en/latest/faq.html#what-is-the-relation-between-tensorcircuit-and-tensorcircuit-ng) successor to TensorCircuit with more new features (stabilizer circuit, multi-card distributed simulation, etc.) and bug fixes (support latest `numpy>2` and `qiskit>1`).
3333

3434
## Getting Started
3535

3636
Please begin with [Quick Start](/docs/source/quickstart.rst) in the [full documentation](https://tensorcircuit-ng.readthedocs.io/).
3737

38-
For more information on software usage, sota algorithm implementation and engineer paradigm demonstration, please refer to 80+ [example scripts](/examples) and 30+ [tutorial notebooks](https://tensorcircuit-ng.readthedocs.io/en/latest/#tutorials). API docstrings and test cases in [tests](/tests) are also informative. One can also refer to tensorcircuit-ng [deepwiki](https://deepwiki.com/tensorcircuit/tensorcircuit-ng) generated by LLM.
38+
For more information on software usage, sota algorithm implementation and engineer paradigm demonstration, please refer to 80+ [example scripts](/examples) and 30+ [tutorial notebooks](https://tensorcircuit-ng.readthedocs.io/en/latest/#tutorials). API docstrings and test cases in [tests](/tests) are also informative. One can also refer to tensorcircuit-ng [deepwiki](https://deepwiki.com/tensorcircuit/tensorcircuit-ng) by LLM.
3939

4040
For beginners, please refer to [quantum computing lectures with TC-NG](https://github.com/sxzgroup/qc_lecture) to learn both quantum computing basics and representative usage of TensorCircuit-NG.
4141

@@ -135,7 +135,7 @@ The package is written in pure Python and can be obtained via pip as:
135135
pip install tensorcircuit-ng
136136
```
137137

138-
We recommend you install this package with tensorflow also installed as:
138+
We recommend you install this package with tensorflow or jax also installed as:
139139

140140
```python
141141
pip install "tensorcircuit-ng[tensorflow]"

examples/distributed_interface_vqe.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def opt_update(params, opt_state, grads):
112112
print(f"Step {i+1:03d} | " f"Loss: {loss:.8f} | " f"Time: {t1 - t0:.4f} s")
113113

114114
print("\nOptimization finished.")
115-
final_energy = DC.value(
116-
params, op=lambda x: K.real(K.sum(x)), output_dtype=tc.rdtypestr
117-
)
115+
real = lambda x: K.real(K.sum(x))
116+
final_energy = DC.value(params, op=real, output_dtype=tc.rdtypestr)
118117
print(f"Final energy: {final_energy:.8f}")

tensorcircuit/experimental.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,7 @@ def value_and_grad(
901901
:param aggregate: Whether to aggregate (sum) the results across devices, defaults to True
902902
:type aggregate: bool, optional
903903
:param op: Optional post-processing function for the output, defaults to None (corresponding to `backend.real`)
904+
op is a cache key, so dont directly pass lambda function for op
904905
:type op: Optional[Callable[[Tensor], Tensor]], optional
905906
:param output_dtype: dtype str for the output of `nodes_fn`, defaults to None (corresponding to `rdtypestr`)
906907
:type output_dtype: Optional[str], optional
@@ -939,6 +940,7 @@ def value(
939940
:param aggregate: Whether to aggregate (sum) the results across devices, defaults to True
940941
:type aggregate: bool, optional
941942
:param op: Optional post-processing function for the output, defaults to None (corresponding to identity)
943+
op is a cache key, so dont directly pass lambda function for op
942944
:type op: Optional[Callable[[Tensor], Tensor]], optional
943945
:param output_dtype: dtype str for the output of `nodes_fn`, defaults to None (corresponding to `dtypestr`)
944946
:type output_dtype: Optional[str], optional

0 commit comments

Comments
 (0)