tyxonq 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. tyxonq-0.1.1/CONTRIBUTING.md +4 -0
  2. tyxonq-0.1.1/LICENSE +61 -0
  3. tyxonq-0.1.1/MANIFEST.in +37 -0
  4. tyxonq-0.1.1/PKG-INFO +312 -0
  5. tyxonq-0.1.1/README.md +265 -0
  6. tyxonq-0.1.1/examples/Get_Started_Demo.ipynb +349 -0
  7. tyxonq-0.1.1/examples/Readme_Demo.ipynb +110 -0
  8. tyxonq-0.1.1/examples/simple_demo_1.py +32 -0
  9. tyxonq-0.1.1/pyproject.toml +65 -0
  10. tyxonq-0.1.1/setup.cfg +4 -0
  11. tyxonq-0.1.1/src/tyxonq/__init__.py +70 -0
  12. tyxonq-0.1.1/src/tyxonq/about.py +119 -0
  13. tyxonq-0.1.1/src/tyxonq/abstractcircuit.py +1286 -0
  14. tyxonq-0.1.1/src/tyxonq/applications/__init__.py +5 -0
  15. tyxonq-0.1.1/src/tyxonq/applications/ai/__init__.py +0 -0
  16. tyxonq-0.1.1/src/tyxonq/applications/ai/ensemble.py +163 -0
  17. tyxonq-0.1.1/src/tyxonq/applications/dqas.py +973 -0
  18. tyxonq-0.1.1/src/tyxonq/applications/finance/__init__.py +0 -0
  19. tyxonq-0.1.1/src/tyxonq/applications/finance/portfolio.py +89 -0
  20. tyxonq-0.1.1/src/tyxonq/applications/graphdata.py +481 -0
  21. tyxonq-0.1.1/src/tyxonq/applications/layers.py +519 -0
  22. tyxonq-0.1.1/src/tyxonq/applications/optimization.py +364 -0
  23. tyxonq-0.1.1/src/tyxonq/applications/physics/__init__.py +0 -0
  24. tyxonq-0.1.1/src/tyxonq/applications/physics/baseline.py +57 -0
  25. tyxonq-0.1.1/src/tyxonq/applications/physics/fss.py +110 -0
  26. tyxonq-0.1.1/src/tyxonq/applications/utils.py +443 -0
  27. tyxonq-0.1.1/src/tyxonq/applications/vags.py +1183 -0
  28. tyxonq-0.1.1/src/tyxonq/applications/van.py +404 -0
  29. tyxonq-0.1.1/src/tyxonq/applications/vqes.py +677 -0
  30. tyxonq-0.1.1/src/tyxonq/asciiart.py +267 -0
  31. tyxonq-0.1.1/src/tyxonq/backends/__init__.py +2 -0
  32. tyxonq-0.1.1/src/tyxonq/backends/abstract_backend.py +1767 -0
  33. tyxonq-0.1.1/src/tyxonq/backends/backend_factory.py +59 -0
  34. tyxonq-0.1.1/src/tyxonq/backends/cupy_backend.py +486 -0
  35. tyxonq-0.1.1/src/tyxonq/backends/jax_backend.py +783 -0
  36. tyxonq-0.1.1/src/tyxonq/backends/jax_ops.py +176 -0
  37. tyxonq-0.1.1/src/tyxonq/backends/numpy_backend.py +447 -0
  38. tyxonq-0.1.1/src/tyxonq/backends/pytorch_backend.py +711 -0
  39. tyxonq-0.1.1/src/tyxonq/backends/pytorch_ops.py +116 -0
  40. tyxonq-0.1.1/src/tyxonq/backends/tensorflow_backend.py +1014 -0
  41. tyxonq-0.1.1/src/tyxonq/backends/tf_ops.py +103 -0
  42. tyxonq-0.1.1/src/tyxonq/basecircuit.py +987 -0
  43. tyxonq-0.1.1/src/tyxonq/channels.py +996 -0
  44. tyxonq-0.1.1/src/tyxonq/circuit.py +1000 -0
  45. tyxonq-0.1.1/src/tyxonq/cloud/__init__.py +5 -0
  46. tyxonq-0.1.1/src/tyxonq/cloud/abstraction.py +472 -0
  47. tyxonq-0.1.1/src/tyxonq/cloud/apis.py +525 -0
  48. tyxonq-0.1.1/src/tyxonq/cloud/config.py +8 -0
  49. tyxonq-0.1.1/src/tyxonq/cloud/local.py +75 -0
  50. tyxonq-0.1.1/src/tyxonq/cloud/tyxonq_provider.py +405 -0
  51. tyxonq-0.1.1/src/tyxonq/cloud/utils.py +121 -0
  52. tyxonq-0.1.1/src/tyxonq/cloud/wrapper.py +321 -0
  53. tyxonq-0.1.1/src/tyxonq/compiler/__init__.py +8 -0
  54. tyxonq-0.1.1/src/tyxonq/compiler/composed_compiler.py +84 -0
  55. tyxonq-0.1.1/src/tyxonq/compiler/qiskit_compiler.py +191 -0
  56. tyxonq-0.1.1/src/tyxonq/compiler/simple_compiler.py +311 -0
  57. tyxonq-0.1.1/src/tyxonq/cons.py +900 -0
  58. tyxonq-0.1.1/src/tyxonq/densitymatrix.py +383 -0
  59. tyxonq-0.1.1/src/tyxonq/experimental.py +527 -0
  60. tyxonq-0.1.1/src/tyxonq/fgs.py +931 -0
  61. tyxonq-0.1.1/src/tyxonq/gates.py +985 -0
  62. tyxonq-0.1.1/src/tyxonq/interfaces/__init__.py +17 -0
  63. tyxonq-0.1.1/src/tyxonq/interfaces/jax.py +189 -0
  64. tyxonq-0.1.1/src/tyxonq/interfaces/numpy.py +61 -0
  65. tyxonq-0.1.1/src/tyxonq/interfaces/scipy.py +106 -0
  66. tyxonq-0.1.1/src/tyxonq/interfaces/tensorflow.py +126 -0
  67. tyxonq-0.1.1/src/tyxonq/interfaces/tensortrans.py +308 -0
  68. tyxonq-0.1.1/src/tyxonq/interfaces/torch.py +165 -0
  69. tyxonq-0.1.1/src/tyxonq/keras.py +291 -0
  70. tyxonq-0.1.1/src/tyxonq/mps_base.py +390 -0
  71. tyxonq-0.1.1/src/tyxonq/mpscircuit.py +982 -0
  72. tyxonq-0.1.1/src/tyxonq/noisemodel.py +356 -0
  73. tyxonq-0.1.1/src/tyxonq/quantum.py +2459 -0
  74. tyxonq-0.1.1/src/tyxonq/results/__init__.py +4 -0
  75. tyxonq-0.1.1/src/tyxonq/results/counts.py +124 -0
  76. tyxonq-0.1.1/src/tyxonq/results/qem/__init__.py +14 -0
  77. tyxonq-0.1.1/src/tyxonq/results/qem/benchmark_circuits.py +107 -0
  78. tyxonq-0.1.1/src/tyxonq/results/qem/qem_methods.py +383 -0
  79. tyxonq-0.1.1/src/tyxonq/results/readout_mitigation.py +836 -0
  80. tyxonq-0.1.1/src/tyxonq/shadows.py +485 -0
  81. tyxonq-0.1.1/src/tyxonq/simplify.py +283 -0
  82. tyxonq-0.1.1/src/tyxonq/templates/__init__.py +9 -0
  83. tyxonq-0.1.1/src/tyxonq/templates/ansatz.py +93 -0
  84. tyxonq-0.1.1/src/tyxonq/templates/blocks.py +203 -0
  85. tyxonq-0.1.1/src/tyxonq/templates/chems.py +7 -0
  86. tyxonq-0.1.1/src/tyxonq/templates/conversions.py +94 -0
  87. tyxonq-0.1.1/src/tyxonq/templates/dataset.py +71 -0
  88. tyxonq-0.1.1/src/tyxonq/templates/graphs.py +147 -0
  89. tyxonq-0.1.1/src/tyxonq/templates/measurements.py +335 -0
  90. tyxonq-0.1.1/src/tyxonq/torchnn.py +138 -0
  91. tyxonq-0.1.1/src/tyxonq/translation.py +778 -0
  92. tyxonq-0.1.1/src/tyxonq/utils.py +232 -0
  93. tyxonq-0.1.1/src/tyxonq/vis.py +337 -0
  94. tyxonq-0.1.1/src/tyxonq.egg-info/PKG-INFO +312 -0
  95. tyxonq-0.1.1/src/tyxonq.egg-info/SOURCES.txt +102 -0
  96. tyxonq-0.1.1/src/tyxonq.egg-info/dependency_links.txt +1 -0
  97. tyxonq-0.1.1/src/tyxonq.egg-info/requires.txt +21 -0
  98. tyxonq-0.1.1/src/tyxonq.egg-info/top_level.txt +1 -0
  99. tyxonq-0.1.1/tests/__init__.py +0 -0
  100. tyxonq-0.1.1/tests/conftest.py +67 -0
  101. tyxonq-0.1.1/tests/test_channels.py +367 -0
  102. tyxonq-0.1.1/tests/test_circuit.py +1700 -0
  103. tyxonq-0.1.1/tests/test_compiler.py +147 -0
  104. tyxonq-0.1.1/tests/test_gates.py +156 -0
@@ -0,0 +1,4 @@
1
+ # Contributing to TyxonQ
2
+
3
+ For information on how to contribute, see
4
+ [Guide for Contributors](docs/source/contribution.rst).
tyxonq-0.1.1/LICENSE ADDED
@@ -0,0 +1,61 @@
1
+ TyxonQ is licensed under the Apache License Version 2.0.
2
+
3
+
4
+ Terms of the Apache License Version 2.0:
5
+ --------------------------------------------------------------------
6
+ Apache License
7
+
8
+ Version 2.0, January 2004
9
+
10
+ http://www.apache.org/licenses/
11
+
12
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
13
+ 1. Definitions.
14
+
15
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
18
+
19
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
20
+
21
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
22
+
23
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
24
+
25
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
26
+
27
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
28
+
29
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
30
+
31
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
32
+
33
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
34
+
35
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
36
+
37
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
38
+
39
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
40
+
41
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
42
+
43
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
44
+
45
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
46
+
47
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
48
+
49
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
50
+
51
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
52
+
53
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
54
+
55
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
56
+
57
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
58
+
59
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
60
+
61
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,37 @@
1
+ # Include the license file
2
+ include LICENSE
3
+
4
+ # Include the readme
5
+ include README.md
6
+
7
+ # Include important docs
8
+ include CONTRIBUTING.md
9
+
10
+ # Include examples (用户可能需要这些示例)
11
+ recursive-include examples *.py *.ipynb *.md
12
+ prune examples/.gitignore
13
+
14
+ # Include tests for people who want to run them
15
+ recursive-include tests *.py
16
+ include tests/conftest.py
17
+
18
+ # Exclude unnecessary files
19
+ global-exclude *.pyc
20
+ global-exclude *.pyo
21
+ global-exclude *.pyd
22
+ global-exclude __pycache__
23
+ global-exclude .git*
24
+ global-exclude .DS_Store
25
+ global-exclude *.so
26
+ global-exclude .pytest_cache
27
+
28
+ # Exclude development and build artifacts
29
+ exclude .gitignore
30
+ exclude .github
31
+ recursive-exclude .github *
32
+ exclude build
33
+ recursive-exclude build *
34
+ exclude dist
35
+ recursive-exclude dist *
36
+ exclude *.egg-info
37
+ recursive-exclude *.egg-info *
tyxonq-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,312 @@
1
+ Metadata-Version: 2.4
2
+ Name: tyxonq
3
+ Version: 0.1.1
4
+ Summary: Quantum computing framework with multi-backend support
5
+ Author-email: Albert Lee <code@quregenai.com>
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/QureGenAI-Biotech/TyxonQ
8
+ Project-URL: Documentation, https://github.com/QureGenAI-Biotech/TyxonQ
9
+ Project-URL: Repository, https://github.com/QureGenAI-Biotech/TyxonQ
10
+ Project-URL: Issues, https://github.com/QureGenAI-Biotech/TyxonQ/issues
11
+ Project-URL: Official Website, https://www.tyxonq.com
12
+ Keywords: quantum,quantum-computing,quantum-machine-learning,quantum-chemistry,quantum-simulation
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Topic :: Scientific/Engineering :: Physics
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Classifier: License :: OSI Approved :: Apache Software License
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Operating System :: OS Independent
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: cirq>=1.5.0
27
+ Requires-Dist: jax>=0.6.2
28
+ Requires-Dist: numpy>=2.0.2
29
+ Requires-Dist: opt-einsum>=3.4.0
30
+ Requires-Dist: python-dotenv>=1.1.1
31
+ Requires-Dist: qiskit>=2.1.0
32
+ Requires-Dist: requests>=2.32.4
33
+ Requires-Dist: ruff>=0.12.2
34
+ Requires-Dist: scipy>=1.13.1
35
+ Requires-Dist: symengine>=0.14.1
36
+ Requires-Dist: sympy>=1.14.0
37
+ Requires-Dist: tensorflow>=2.19.0
38
+ Requires-Dist: tensornetwork>=0.4.6
39
+ Requires-Dist: torch>=2.7.1
40
+ Provides-Extra: dev
41
+ Requires-Dist: jupyter>=1.1.1; extra == "dev"
42
+ Requires-Dist: pytest>=6.0; extra == "dev"
43
+ Requires-Dist: pytest-lazy-fixtures>=1.1.4; extra == "dev"
44
+ Requires-Dist: build>=0.8.0; extra == "dev"
45
+ Requires-Dist: twine>=4.0.0; extra == "dev"
46
+ Dynamic: license-file
47
+
48
+ <h2><p align="center">TyxonQ</p></h2>
49
+ <h3><p align="center">Full-stack Quantum Software Framework on Real Machine</p></h3>
50
+
51
+ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
52
+ [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)
53
+ [![Real Quantum Hardware](https://img.shields.io/badge/Quantum%20Hardware-Homebrew__S2-brightgreen)](https://www.tyxonq.com/)
54
+
55
+ TyxonQ​​ 太玄量子 is a full-stack quantum software framework for quantum simulation, optimization, and quantum machine learning. Forked from the open-source project ​[​TensorCircuit](https://github.com/tencent-quantum-lab/tensorcircuit)​​ and licensed under Apache License 2.0, it integrates modern quantum programming paradigms including automatic differentiation, just-in-time compilation, and hardware acceleration.
56
+
57
+ **🚀 REAL QUANTUM HARDWARE READY**: TyxonQ supports **real quantum machine execution** through our quantum cloud services powered by **QureGenAI**. Currently featuring the **Homebrew_S2** quantum processor, enabling you to run your quantum algorithms on actual quantum hardware, not just simulators.
58
+
59
+ ***Try Real Quantum Computer Right Now!***: [Getting a Key](https://www.tyxonq.com/) to register and obtain your API key
60
+
61
+ Innovatively combining generative AI, heterogeneous computing architectures, TyxonQ delivers ​​end-to-end solutions​​ for quantum chemistry, drug discovery, and materials science.
62
+
63
+ ## 🏗️ Quantum-Classical Hybrid Architecture
64
+
65
+ TyxonQ implements a comprehensive quantum-classical hybrid workflow that bridges high-level quantum algorithms to executable quantum programs:
66
+
67
+ ```mermaid
68
+ graph TB
69
+ subgraph "Real Problems"
70
+ A[Quantum Algorithm] --> B[Circuit Structure]
71
+ end
72
+
73
+ subgraph "Quantum Circuit Design"
74
+ B --> C[Sampling<br/>Heuristic Algorithm<br/>RL<br/>Machine Learning]
75
+ C --> D[Unitary Matrix]
76
+ D --> E[Logic Circuit Synthesis<br/>Logic Circuit Optimization]
77
+ E --> F[Logic Circuit]
78
+ end
79
+
80
+ subgraph "Quantum Compilation"
81
+ F --> G[Gate Count<br/>Circuit Depth<br/>Execution Time<br/>Fidelity]
82
+ G --> H[Dynamic Programming<br/>Heuristic Algorithm<br/>Reduction<br/>Machine Learning]
83
+ end
84
+
85
+ subgraph "Hardware Design"
86
+ H --> I[Qubit Mapping<br/>Qubit Routing]
87
+ I --> J[Executable Program<br/>Homebrew_S2]
88
+ end
89
+
90
+ style J fill:#e1f5fe
91
+ style A fill:#f3e5f5
92
+ ```
93
+
94
+ ### Architecture Components:
95
+ - **🧮 Quantum Algorithm Layer**: High-level quantum algorithm specification
96
+ - **🔄 Circuit Structure**: Parameterized quantum circuits with rotation parameters
97
+ - **⚙️ Logic Circuit Synthesis**: Automated circuit optimization and compilation
98
+ - **🎯 Qubit Mapping**: Physical qubit topology-aware mapping and routing
99
+ - **💻 Hardware Execution**: Direct execution on **Homebrew_S2** quantum processor
100
+
101
+ ## Features
102
+
103
+ ### 🔥 Real Quantum Hardware Integration
104
+ - **Production-Ready Quantum Execution**: Direct integration with **QureGenAI's Homebrew_S2** quantum processor
105
+ - **Pulse-Level Control**: Support for both gate-level operations and **pulse-level signals** for advanced quantum control
106
+ - **Real-Time Quantum Computing**: Execute your quantum algorithms on actual quantum hardware with low latency
107
+ - **Quantum-Classical Hybrid Workflows**: Seamlessly combine classical preprocessing with quantum execution
108
+
109
+ ### 🚀 Upcoming API & MCP Services (Coming Soon)
110
+ - **🔗 Quantum API Gateway**: RESTful APIs for direct quantum hardware access
111
+ - **🤖 LLM Integration**: Model Control Protocol (MCP) services for large language model integration
112
+ - **☁️ Quantum Cloud Services**: Scalable quantum computing as a service
113
+ - **📊 Real-time Monitoring**: Quantum job monitoring and result analytics
114
+
115
+ ### Unified Quantum-Classical Hybrid Computing Paradigm​​
116
+ - Supports efficient simulation and optimization of variational quantum algorithms (​​VQE, QAOA​​), featuring a built-in ​​automatic differentiation engine​​ for seamless integration with PyTorch/TensorFlow gradient computation workflows.
117
+ - Provides a ​​hybrid task scheduler​​ that dynamically allocates quantum hardware and classical computing resources (CPU/GPU) for acceleration​​.
118
+
119
+ ### Multi-Level Hardware Support​​
120
+ ​​- **Direct Quantum Hardware Integration​​**: Compatible with mainstream quantum processors (e.g., superconducting), supporting low-level control from ​​gate-level operations​​ to **​​pulse-level signals** :fire: :fire: :fire:​.
121
+ - ​​**Heterogeneous Computing Optimization​​**: Enhances simulation throughput via ​​GPU vectorization​​ and quantum instruction compilation.
122
+
123
+ ### Generative AI Integration​​
124
+ - Built-in [Generative ​Quantum Eigensolver (GQE)](https://arxiv.org/abs/2401.09253)​​ and [​​Quantum Machine Learning (QML)](​​https://arxiv.org/abs/2502.01146) modules for direct pre-trained model deployment in tasks like molecular structure generation and protein folding computing.
125
+ - Supports ​​large language model (LLM) interaction​​, enabling automated ​​"natural language → quantum circuit"​​ generation (experimental feature).
126
+
127
+ ### Domain-Specific Toolkits​​
128
+ - **Quantum Chemistry Suite​​**: Includes molecular Hamiltonian builders and electronic structure analysis tools, compatible with classical quantum chemistry and drug discovery framework like [PySCF](https://pyscf.org/), [ByteQC](https://github.com/bytedance/byteqc) and [​​OpenMM](https://openmm.org/)​​.
129
+ - ​​**Materials Simulation Library​​**: Integrates ​​quantum-accelerated density functional theory (DFT)​​ modules for predicting novel material band structures.
130
+
131
+ ## 🚀 Roadmap & Development Status
132
+
133
+ ### ✅ Current Features (v1.x)
134
+ - [x] Quantum circuit simulation and optimization
135
+ - [x] **Real quantum hardware execution** (Homebrew_S2)
136
+ - [x] Automatic differentiation engine
137
+ - [x] Multi-backend support (NumPy, PyTorch, TensorFlow, JAX)
138
+ - [ ] Variational quantum algorithms (VQE,GQE,QAOA)
139
+ - [ ] Quantum chemistry toolkit integration
140
+
141
+ ### 🔄 In Progress (v2.x)
142
+ - [ ] **Quantum API Gateway** - RESTful APIs for quantum hardware access
143
+ - [ ] **MCP Services** - Large language model integration protocols
144
+ - [ ] Advanced quantum error correction protocols
145
+ - [ ] Enhanced pulse-level control interface
146
+ - [ ] Real-time quantum job monitoring dashboard
147
+ - [ ] Quantum circuit optimization using machine learning
148
+
149
+ ### 🎯 Future Plans (v3.x+)
150
+ - [ ] **Multi-QPU Support** - Support for additional quantum processors
151
+ - [ ] **Quantum Networking** - Distributed quantum computing capabilities
152
+ - [ ] **Advanced QML Models** - Pre-trained quantum machine learning models
153
+ - [ ] **Natural Language Interface** - "English → Quantum Circuit" generation
154
+ - [ ] **Quantum Advantage Benchmarks** - Standardized performance metrics
155
+ - [ ] **Enterprise Cloud Platform** - Scalable quantum computing infrastructure
156
+
157
+ ### 🧪 Experimental Features
158
+ - [ ] Quantum generative adversarial networks (QGANs)
159
+ - [ ] Quantum federated learning protocols
160
+ - [ ] Quantum-enhanced drug discovery pipelines
161
+ - [ ] Materials discovery acceleration frameworks
162
+
163
+ ## Installation
164
+ The package now is written in pure Python and can be obtained via `pip` or
165
+
166
+ Install from source:
167
+
168
+ ```bash
169
+ uv build
170
+ uv pip install dist/tyxonq-0.1.1-py3-none-any.whl
171
+ ```
172
+
173
+ `uv` as:
174
+ ```bash
175
+ pip install tyxonq
176
+ ```
177
+ or
178
+ ```bash
179
+ uv pip install tyxonq
180
+ ```
181
+ or you can install it from github:
182
+ ```bash
183
+ git clone https://github.com/QureGenAI-Biotech/TyxonQ.git
184
+ cd tyxonq
185
+ pip install --editable .
186
+ ```
187
+
188
+ ## Get Started Example
189
+
190
+ See examples/Get_Started_Demo.ipynb
191
+
192
+ ## 🔑 Real Quantum Hardware Setup
193
+
194
+ ### Getting API Access
195
+ 1. **Apply for API Key**: Visit [TyxonQ Quantum AI Portal](https://www.tyxonq.com/) to register and obtain your API key
196
+ 2. **Hardware Access**: Request access to **Homebrew_S2** quantum processor through API [TyxonQ QPU API](https://www.tyxonq.com)
197
+
198
+ ### Configuration
199
+ Set up your API credentials:
200
+
201
+ ```python
202
+ import tyxonq as tq
203
+ from tyxonq.cloud import apis
204
+ import getpass
205
+
206
+ # Configure quantum hardware access
207
+ API_KEY = getpass.getpass("Input your TyxonQ API_KEY:")
208
+ apis.set_token(API_KEY) # Get from https://www.tyxonq.com
209
+ ```
210
+
211
+ ### Real Hardware Example
212
+
213
+ See 'examples/simple_demo_1.py' , run:
214
+ ```shell
215
+ python examples/simple_demo_1.py
216
+ ```
217
+
218
+ Code:
219
+
220
+ ```python
221
+ import sys
222
+ sys.path.append("./")
223
+
224
+ import tyxonq as tq
225
+ import getpass
226
+ from tyxonq.cloud import apis
227
+ import time
228
+ # Configure for real quantum hardware
229
+ apis.set_token(getpass.getpass("Input your TyxonQ API_KEY: "))
230
+
231
+ provider = "tyxonq"
232
+ device = "homebrew_s2"
233
+
234
+ # Create and execute quantum circuit on real hardware
235
+ def quantum_hello_world():
236
+ c = tq.Circuit(2)
237
+ c.H(0) # Hadamard gate on qubit 0
238
+ c.CNOT(0, 1) # CNOT gate between qubits 0 and 1
239
+ c.rx(1, theta=0.2) # Rotation around x-axis
240
+
241
+ # Execute on real quantum hardware
242
+
243
+ print("Submit task to TyxonQ")
244
+
245
+ task = apis.submit_task(provider = provider,
246
+ device = device,
247
+ circuit = c,
248
+ shots = 100)
249
+ print(f"Task submitted: {task}")
250
+ print("Wait 20 seconds to get task details")
251
+ time.sleep(20)
252
+ print(f"Real quantum hardware result: {task.details()}")
253
+
254
+ quantum_hello_world()
255
+
256
+ ```
257
+
258
+ ## Basic Usage and Guide
259
+ Considering that the features and documentation related to ​​TyxonQ characteristics​​ are currently under development, you can refer to the upstream library ​​[Tensorcircuit](https://github.com/tencent-quantum-lab/tensorcircuit)​​ for usage guidance in the interim: [Quick Start](https://github.com/tencent-quantum-lab/tensorcircuit/blob/master/docs/source/quickstart.rst) and [full documentation](https://tensorcircuit.readthedocs.io/). We will promptly update the ​​TyxonQ documentation and tutorials in [English](), [Chinese]() and [Japanese]()​​.
260
+
261
+ - Circuit manipulation:
262
+ ```python
263
+ import tyxonq as tq
264
+ c = tq.Circuit(2)
265
+ c.H(0)
266
+ c.CNOT(0,1)
267
+ c.rx(1, theta=0.2)
268
+ print(c.wavefunction())
269
+ print(c.expectation_ps(z=[0, 1]))
270
+ print(c.sample(allow_state=True, batch=1024, format="count_dict_bin"))
271
+ ```
272
+
273
+ - Runtime behavior customization:
274
+ ```python
275
+ tq.set_backend("tensorflow")
276
+ tq.set_dtype("complex128")
277
+ tq.set_contractor("greedy")
278
+ ```
279
+
280
+ - Automatic differentiations with jit:
281
+ ```python
282
+ def forward(theta):
283
+ c = tq.Circuit(2)
284
+ c.R(0, theta=theta, alpha=0.5, phi=0.8)
285
+ return tq.backend.real(c.expectation((tq.gates.z(), [0])))
286
+
287
+ g = tq.backend.grad(forward)
288
+ g = tq.backend.jit(g)
289
+ theta = tq.array_to_tensor(1.0)
290
+ print(g(theta))
291
+ ```
292
+
293
+ ## Dependencies
294
+ - Python >= 3.7 (supports Python 3.7, 3.8, 3.9, 3.10, 3.11, 3.12+)
295
+ - PyTorch >= 1.8.0
296
+
297
+ ## 📧 Contact & Support
298
+
299
+ - **Home**: [www.tyxonq.com](https://www.tyxonq.com)
300
+ - **Technical Support**: [code@quregenai.com](mailto:code@quregenai.com)
301
+
302
+ - **General Inquiries**: [bd@quregenai.com](mailto:bd@quregenai.com)
303
+ - **Documentation (beta version)**: [docs.tyxonq.com](https://tensorcircuit.readthedocs.io/)
304
+ - **Issue**:[github issue](https://github.com/QureGenAI-Biotech/TyxonQ/issues)
305
+
306
+ ### Development Team
307
+ - **QureGenAI**: Quantum hardware infrastructure and services
308
+ - **TyxonQ Core Team**: Framework development and optimization
309
+ - **Community Contributors**: Open source development and testing
310
+
311
+ ## License
312
+ TyxonQ is open source, released under the Apache License, Version 2.0.