Skip to content

Commit d15d353

Browse files
authored
Merge pull request #11 from tencent-quantum-lab/master
local sync
2 parents 63cf700 + c7d918f commit d15d353

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@
1616

1717
- Add end to end infrastructures and methods for classical shadow in `shadows.py`
1818

19+
- Add classical shadow tutorial
20+
21+
- Add NN-VQE tutorial
22+
1923
### Fixed
2024

2125
- improve the `adaptive_vmap` to support internal jit and pytree output
2226

23-
- fix `pauli_gates` dtype unchange issue when set new dtype (not recommend to use this property)
27+
- fix `pauli_gates` dtype unchange issue when set new dtype (not recommend to use this attr anymore)
2428

2529
- fix rem `apply_correction` bug when non-numpy backend is set
30+
31+
- fix tf warning for `cast` with higher version of tf
2632
### Changed
2733

2834
- The static method `BaseCircuit.copy` is renamed as `BaseCircuit.copy_nodes` (breaking changes)

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,8 @@ We also have [Docker support](/docker).
205205

206206
- Reusable common circuit/measurement/problem templates and patterns.
207207

208+
- Jittable classical shadow infrastructures.
209+
208210
- SOTA quantum algorithm and model implementations.
209211

210212
- Support hybrid workflows and pipelines with CPU/GPU/QPU hardware from local/cloud/hpc resources using tf/torch/jax/cupy/numpy frameworks all at the same time.
@@ -334,6 +336,12 @@ For the numerical simulation and hardware experiments with error mitigation on Q
334336

335337
Reference paper: https://arxiv.org/abs/2303.14877.
336338

339+
### NN-VQA
340+
341+
For the setup and simulation code of neural network encoded variational quantum eigensolver, see the [demo](/docs/source/tutorials/nnvqe.ipynb).
342+
343+
Reference paper: https://arxiv.org/abs/2308.01068.
344+
337345
### More works
338346

339347
<details>

README_cn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,9 @@ VQEX 在 MBL 相位识别上的应用见 [教程](/docs/source/tutorials/vqex_mb
184184
数值模拟和带错误消除的真实量子硬件实验验证 QAOA 优化的代码请参考 [项目](https://github.com/sherrylixuecheng/EMQAOA-DARBO)
185185

186186
参考论文: https://arxiv.org/abs/2303.14877。
187+
188+
### NN-VQA
189+
190+
关于神经网络编码的变分量子算法的实现和工作流, 见 [教程](/docs/source/tutorials/nnvqe.ipynb)
191+
192+
参考论文: https://arxiv.org/abs/2308.01068。

tensorcircuit/backends/tensorflow_backend.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# pylint: disable=invalid-name
55

66
import os
7+
import re
78
from functools import reduce, partial
89
from operator import mul
910
from typing import Any, Callable, Optional, Sequence, Tuple, Union
@@ -378,6 +379,9 @@ def __init__(self) -> None:
378379
tf.sparse.SparseTensor.__add__ = tf.sparse.add
379380
self.minor = int(tf.__version__.split(".")[1])
380381
self.name = "tensorflow"
382+
logger = tf.get_logger() # .setLevel('ERROR')
383+
logger.addFilter(lambda s: not re.match(".*You are casting.*", s.getMessage()))
384+
# ignore casting warning by logger
381385

382386
def eye(
383387
self, N: int, dtype: Optional[str] = None, M: Optional[int] = None

0 commit comments

Comments
 (0)