Skip to content

Commit bcb7571

Browse files
Merge branch 'master' into beta
2 parents a17944b + f361c2d commit bcb7571

File tree

14 files changed

+305
-24
lines changed

14 files changed

+305
-24
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,15 @@
331331
"contributions": [
332332
"example"
333333
]
334+
},
335+
{
336+
"login": "abhinavd",
337+
"name": "Abhinav Deshpande",
338+
"avatar_url": "https://avatars.githubusercontent.com/u/6169877?v=4",
339+
"profile": "https://adeshpande.gitlab.io",
340+
"contributions": [
341+
"code"
342+
]
334343
}
335344
],
336345
"contributorsPerLine": 6,

.pylintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ max-module-lines=2000
5353

5454
# Exceptions that will emit a warning when being caught. Defaults to
5555
# "BaseException, Exception".
56-
overgeneral-exceptions=BaseException,
57-
Exception
56+
overgeneral-exceptions=builtins.BaseException,
57+
builtins.Exception
5858

5959
# Note how codecc doesn't accept goddnames in pylintrc, and how we use pylint disable invalid name per file instead
6060
# it is not neat at all, but this is codecc's badness :(

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## Unreleased
44

5+
## 1.0.1
6+
7+
### Fixed
8+
9+
- Fix support for qiskit>1
10+
11+
- tf>=2.16.2 fix the complex input issue for keras
12+
513
## 1.0.0
614

715
### Added

README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ TensorCircuit-NG is a high performance quantum software framework, supporting fo
2929

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

32-
TensorCircuit-NG is [fully compatible](https://tensorcircuit-ng.readthedocs.io/en/latest/faq.html#what-is-the-relation-between-tensorcircuit-and-tensorcircuit-ng) with TensorCircuit with more new features and bug fixes.
32+
TensorCircuit-NG is [fully compatible](https://tensorcircuit-ng.readthedocs.io/en/latest/faq.html#what-is-the-relation-between-tensorcircuit-and-tensorcircuit-ng) with TensorCircuit with more new features and bug fixes (support numpy>2 and qiskit>1).
3333

3434
## Getting Started
3535

@@ -297,6 +297,7 @@ TensorCircuit-NG is open source, released under the Apache License, Version 2.0.
297297
<td align="center" valign="top" width="16.66%"><a href="https://github.com/king-p3nguin"><img src="https://avatars.githubusercontent.com/u/103920010?v=4?s=100" width="100px;" alt="Kazuki Tsuoka"/><br /><sub><b>Kazuki Tsuoka</b></sub></a><br /><a href="https://github.com/tensorcircuit/tensorcircuit-ng/commits?author=king-p3nguin" title="Code">💻</a> <a href="https://github.com/tensorcircuit/tensorcircuit-ng/commits?author=king-p3nguin" title="Tests">⚠️</a> <a href="https://github.com/tensorcircuit/tensorcircuit-ng/commits?author=king-p3nguin" title="Documentation">📖</a> <a href="#example-king-p3nguin" title="Examples">💡</a></td>
298298
<td align="center" valign="top" width="16.66%"><a href="https://gopal-dahale.github.io/"><img src="https://avatars.githubusercontent.com/u/49199003?v=4?s=100" width="100px;" alt="Gopal Ramesh Dahale"/><br /><sub><b>Gopal Ramesh Dahale</b></sub></a><br /><a href="#example-Gopal-Dahale" title="Examples">💡</a></td>
299299
<td align="center" valign="top" width="16.66%"><a href="https://github.com/AbdullahKazi500"><img src="https://avatars.githubusercontent.com/u/75779966?v=4?s=100" width="100px;" alt="Chanandellar Bong"/><br /><sub><b>Chanandellar Bong</b></sub></a><br /><a href="#example-AbdullahKazi500" title="Examples">💡</a></td>
300+
<td align="center" valign="top" width="16.66%"><a href="https://adeshpande.gitlab.io"><img src="https://avatars.githubusercontent.com/u/6169877?v=4?s=100" width="100px;" alt="Abhinav Deshpande"/><br /><sub><b>Abhinav Deshpande</b></sub></a><br /><a href="https://github.com/tensorcircuit/tensorcircuit-ng/commits?author=abhinavd" title="Code">💻</a></td>
300301
</tr>
301302
</tbody>
302303
</table>
@@ -365,8 +366,8 @@ Reference paper: https://arxiv.org/abs/2308.01068 (published in PRApplied).
365366

366367
### More works
367368

368-
<details>
369-
<summary> More research works and code projects using TensorCircuit (click for details) </summary>
369+
<details>
370+
<summary> More research works and code projects using TensorCircuit and TensorCircuit-NG (click for details) </summary>
370371

371372
- Neural Predictor based Quantum Architecture Search: https://arxiv.org/abs/2103.06524 (published in Machine Learning: Science and Technology).
372373

@@ -388,22 +389,40 @@ Reference paper: https://arxiv.org/abs/2308.01068 (published in PRApplied).
388389

389390
- Practical advantage of quantum machine learning in ghost imaging: https://www.nature.com/articles/s42005-023-01290-1 (published in Communications Physics).
390391

391-
- Zero and Finite Temperature Quantum Simulations Powered by Quantum Magic: https://arxiv.org/abs/2308.11616.
392+
- Zero and Finite Temperature Quantum Simulations Powered by Quantum Magic: https://arxiv.org/abs/2308.11616 (published in Quantum).
392393

393394
- Comparison of Quantum Simulators for Variational Quantum Search: A Benchmark Study: https://arxiv.org/abs/2309.05924.
394395

395396
- Statistical analysis of quantum state learning process in quantum neural networks: https://arxiv.org/abs/2309.14980 (published in NeurIPS).
396397

397398
- Generative quantum machine learning via denoising diffusion probabilistic models: https://arxiv.org/abs/2310.05866 (published in PRL).
398399

399-
- Quantum imaginary time evolution and quantum annealing meet topological sector optimization: https://arxiv.org/abs/2310.04291.
400+
- Exploring the topological sector optimization on quantum computers: https://arxiv.org/abs/2310.04291 (published in PRApplied).
400401

401402
- Google Summer of Code 2023 Projects (QML4HEP): https://github.com/ML4SCI/QMLHEP, https://github.com/Gopal-Dahale/qgnn-hep, https://github.com/salcc/QuantumTransformers.
402403

404+
- Universal imaginary-time critical dynamics on a quantum computer: https://arxiv.org/abs/2308.05408 (published in PRB).
405+
403406
- Absence of barren plateaus in finite local-depth circuits with long-range entanglement: https://arxiv.org/abs/2311.01393 (published in PRL).
404407

405408
- Non-Markovianity benefits quantum dynamics simulation: https://arxiv.org/abs/2311.17622.
406409

407-
</details>
410+
- Variational post-selection for ground states and thermal states simulation: https://arxiv.org/abs/2402.07605 (published in PRB).
411+
412+
- Subsystem information capacity in random circuits and Hamiltonian dynamics: https://arxiv.org/abs/2405.05076.
413+
414+
- Symmetry restoration and quantum Mpemba effect in symmetric random circuits: https://arxiv.org/abs/2403.08459 (published in PRL).
415+
416+
- Quantum Mpemba effects in many-body localization systems: https://arxiv.org/abs/2408.07750.
417+
418+
- Supersymmetry dynamics on Rydberg atom arrays: https://arxiv.org/abs/2410.21386.
419+
420+
- Dynamic parameterized quantum circuits: expressive and barren-plateau free: https://arxiv.org/abs/2411.05760.
421+
422+
- Holographic deep thermalization: https://arxiv.org/abs/2411.03587.
423+
424+
- Quantum deep generative prior with programmable quantum circuits: https://www.nature.com/articles/s42005-024-01765-9 (published in Communications Physics).
425+
426+
</details>
408427

409428
If you want to highlight your research work or projects here, feel free to add by opening PR.

docs/source/contribution.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ 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__``)
253254

254255
**DockerHub Release**
255256

requirements/requirements-2411.txt

Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
absl-py==2.1.0
2+
alabaster==1.0.0
3+
annotated-types==0.7.0
4+
anyio==4.6.2.post1
5+
astroid==3.3.5
6+
asttokens==3.0.0
7+
astunparse==1.6.3
8+
attrs==24.2.0
9+
babel==2.16.0
10+
beautifulsoup4==4.12.3
11+
black==24.10.0
12+
bleach==6.2.0
13+
cachetools==5.5.0
14+
certifi==2024.8.30
15+
cffi==1.17.1
16+
charset-normalizer==3.4.0
17+
chex==0.1.87
18+
cirq==1.4.1
19+
cirq-aqt==1.4.1
20+
cirq-core==1.4.1
21+
cirq-google==1.4.1
22+
cirq-ionq==1.4.1
23+
cirq-pasqal==1.4.1
24+
cirq-rigetti==1.4.1
25+
cirq-web==1.4.1
26+
click==8.1.7
27+
contourpy==1.3.1
28+
coverage==7.6.8
29+
cryptography==44.0.0
30+
cycler==0.12.1
31+
Cython==3.0.11
32+
decorator==5.1.1
33+
defusedxml==0.7.1
34+
Deprecated==1.2.15
35+
deprecation==2.1.0
36+
dill==0.3.9
37+
docutils==0.21.2
38+
duet==0.2.9
39+
etils==1.11.0
40+
exceptiongroup==1.2.2
41+
execnet==2.1.1
42+
executing==2.1.0
43+
fastjsonschema==2.21.0
44+
filelock==3.16.1
45+
flatbuffers==24.3.25
46+
fonttools==4.55.0
47+
fsspec==2024.10.0
48+
furo==2024.8.6
49+
gast==0.6.0
50+
google-api-core==2.23.0
51+
google-auth==2.36.0
52+
google-pasta==0.2.0
53+
googleapis-common-protos==1.66.0
54+
graphviz==0.20.3
55+
grpc-interceptor==0.15.4
56+
grpcio==1.68.0
57+
grpcio-status==1.62.3
58+
h11==0.14.0
59+
h5py==3.12.1
60+
httpcore==1.0.7
61+
httpx==0.28.0
62+
ibm-cloud-sdk-core==3.22.0
63+
ibm-platform-services==0.59.0
64+
idna==3.10
65+
imagesize==1.4.1
66+
iniconfig==2.0.0
67+
ipython==8.30.0
68+
isort==5.13.2
69+
jax==0.4.35
70+
jaxlib==0.4.35
71+
jedi==0.19.2
72+
Jinja2==3.1.4
73+
jsonschema==4.23.0
74+
jsonschema-specifications==2024.10.1
75+
jupyter_client==8.6.3
76+
jupyter_core==5.7.2
77+
jupyterlab_pygments==0.3.0
78+
keras==3.7.0
79+
kiwisolver==1.4.7
80+
libclang==18.1.1
81+
Markdown==3.7
82+
markdown-it-py==3.0.0
83+
MarkupSafe==3.0.2
84+
matplotlib==3.9.2
85+
matplotlib-inline==0.1.7
86+
mccabe==0.7.0
87+
mdit-py-plugins==0.4.2
88+
mdurl==0.1.2
89+
mistune==3.0.2
90+
mitiq==0.41.0
91+
ml-dtypes==0.4.1
92+
mpmath==1.3.0
93+
msgpack==1.1.0
94+
mthree==2.7.0
95+
# 2.8 gives buffer unmatch float vs double
96+
mypy==1.13.0
97+
mypy-extensions==1.0.0
98+
myst-parser==4.0.0
99+
namex==0.0.8
100+
nbclient==0.10.1
101+
nbconvert==7.16.4
102+
nbformat==5.10.4
103+
nbsphinx==0.9.5
104+
networkx==3.4.2
105+
numpy==1.26.4
106+
openfermion==1.6.1
107+
opt_einsum==3.4.0
108+
optax==0.2.4
109+
optree==0.13.1
110+
orjson==3.10.12
111+
packaging==23.2
112+
pandas==2.2.3
113+
pandocfilters==1.5.1
114+
parso==0.8.4
115+
pathspec==0.12.1
116+
pbr==6.1.0
117+
pexpect==4.9.0
118+
pillow==11.0.0
119+
platformdirs==4.3.6
120+
pluggy==1.5.0
121+
ply==3.11
122+
prompt_toolkit==3.0.48
123+
proto-plus==1.25.0
124+
protobuf==4.25.5
125+
psutil==6.1.0
126+
ptyprocess==0.7.0
127+
PubChemPy==1.0.4
128+
pure_eval==0.2.3
129+
py-cpuinfo==9.0.0
130+
pyasn1==0.6.1
131+
pyasn1_modules==0.4.1
132+
pycparser==2.22
133+
pydantic==2.10.2
134+
pydantic_core==2.27.1
135+
Pygments==2.18.0
136+
PyJWT==2.10.1
137+
pylatexenc==2.10
138+
pylint==3.3.1
139+
pyparsing==3.2.0
140+
pyquil==4.14.3
141+
pyspnego==0.11.2
142+
pytest==7.4.4
143+
# < 8.0 due to lazy-fixture
144+
# https://github.com/dev-petrov/pytest-lazy-fixtures for the future
145+
pytest-benchmark==5.0.1
146+
pytest-cov==6.0.0
147+
pytest-lazy-fixture==0.6.3
148+
pytest-xdist==3.6.1
149+
python-dateutil==2.9.0.post0
150+
python-rapidjson==1.20
151+
pytz==2024.2
152+
PyYAML==6.0.2
153+
pyzmq==26.2.0
154+
qcs-api-client-common==0.10.0
155+
qcs-sdk-python==0.21.4
156+
qiskit==1.2.4
157+
# qiskit 1.3 global_phase in DAG attribute error
158+
qiskit-aer==0.15.1
159+
qiskit-algorithms==0.3.1
160+
qiskit-ibm-runtime==0.33.2
161+
qiskit-nature==0.7.2
162+
quil==0.13.2
163+
referencing==0.35.1
164+
requests==2.32.3
165+
requests_ntlm==1.3.0
166+
rich==13.9.4
167+
rpcq==3.11.0
168+
rpds-py==0.21.0
169+
rsa==4.9
170+
ruamel.yaml==0.18.6
171+
ruamel.yaml.clib==0.2.12
172+
rustworkx==0.15.1
173+
scipy==1.14.1
174+
six==1.16.0
175+
sniffio==1.3.1
176+
snowballstemmer==2.2.0
177+
sortedcontainers==2.4.0
178+
soupsieve==2.6
179+
Sphinx==8.1.3
180+
sphinx-basic-ng==1.0.0b2
181+
sphinx-copybutton==0.5.2
182+
sphinx_design==0.6.1
183+
sphinxcontrib-applehelp==2.0.0
184+
sphinxcontrib-devhelp==2.0.0
185+
sphinxcontrib-htmlhelp==2.1.0
186+
sphinxcontrib-jsmath==1.0.1
187+
sphinxcontrib-qthelp==2.0.0
188+
sphinxcontrib-serializinghtml==2.0.0
189+
stack-data==0.6.3
190+
stevedore==5.4.0
191+
symengine==0.13.0
192+
sympy==1.13.1
193+
tabulate==0.9.0
194+
tensorboard==2.18.0
195+
tensorboard-data-server==0.7.2
196+
tensorflow==2.18.0
197+
tensorflow-io-gcs-filesystem==0.37.1
198+
tensornetwork-ng==0.5.0
199+
termcolor==2.5.0
200+
tinycss2==1.4.0
201+
tokenize_rt==6.1.0
202+
tomli==2.2.1
203+
tomlkit==0.13.2
204+
toolz==1.0.0
205+
torch==2.5.1
206+
tornado==6.4.2
207+
tqdm==4.67.1
208+
traitlets==5.14.3
209+
types-Deprecated==1.2.15.20241117
210+
types-docutils==0.21.0.20241128
211+
types-protobuf==5.28.3.20241030
212+
types-pytz==2024.2.0.20241003
213+
types-requests==2.32.0.20241016
214+
types-setuptools==75.6.0.20241126
215+
types-toml==0.10.8.20240310
216+
types-typed-ast==1.5.8.7
217+
types-urllib3==1.26.25.14
218+
typing_extensions==4.12.2
219+
tzdata==2024.2
220+
urllib3==2.2.3
221+
wcwidth==0.2.13
222+
webencodings==0.5.1
223+
websocket-client==1.8.0
224+
Werkzeug==3.1.3
225+
wrapt==1.17.0

requirements/requirements-extra.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ torch==2.2.2
88
# jupyter
99
mthree==1.1.0
1010
openfermion
11+
pylatexenc

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
include_package_data=True,
2020
install_requires=["numpy", "scipy", "tensornetwork-ng", "networkx"],
2121
extras_require={
22-
"tensorflow": ["tensorflow<2.16"],
22+
"tensorflow": ["tensorflow"],
2323
"jax": ["jax", "jaxlib"],
2424
"torch": ["torch"],
25-
"qiskit": ["qiskit<1.0"],
26-
"cloud": ["qiskit<1.0", "mthree"],
25+
"qiskit": ["qiskit"],
26+
"cloud": ["qiskit", "mthree<2.8"],
2727
},
2828
classifiers=[
2929
"Programming Language :: Python :: 3",

tensorcircuit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "1.0.0"
1+
__version__ = "1.0.1"
22
__author__ = "TensorCircuit Authors"
33
__creator__ = "refraction-ray"
44

tensorcircuit/abstractcircuit.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,14 @@ def to_openqasm(self, **kws: Any) -> str:
783783
:return: circuit representation in openqasm format
784784
:rtype: str
785785
"""
786-
return self.to_qiskit(enable_instruction=True).qasm(**kws) # type: ignore
786+
qc = self.to_qiskit(enable_instruction=True)
787+
try:
788+
qasm_str = qc.qasm(**kws) # type: ignore
789+
except AttributeError: # qiskit 1.0
790+
from qiskit.qasm2 import dumps
791+
792+
qasm_str = dumps(qc) # type: ignore
793+
return qasm_str # type: ignore
787794

788795
@classmethod
789796
def from_openqasm(

0 commit comments

Comments
 (0)