quantumflow-sdk 0.1.0__py3-none-any.whl

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 (60) hide show
  1. api/__init__.py +1 -0
  2. api/auth.py +208 -0
  3. api/main.py +403 -0
  4. api/models.py +137 -0
  5. api/routes/__init__.py +1 -0
  6. api/routes/auth_routes.py +234 -0
  7. api/routes/teleport_routes.py +415 -0
  8. db/__init__.py +15 -0
  9. db/crud.py +319 -0
  10. db/database.py +93 -0
  11. db/models.py +197 -0
  12. quantumflow/__init__.py +47 -0
  13. quantumflow/algorithms/__init__.py +48 -0
  14. quantumflow/algorithms/compression/__init__.py +7 -0
  15. quantumflow/algorithms/compression/amplitude_amplification.py +189 -0
  16. quantumflow/algorithms/compression/qft_compression.py +133 -0
  17. quantumflow/algorithms/compression/token_compression.py +261 -0
  18. quantumflow/algorithms/cryptography/__init__.py +6 -0
  19. quantumflow/algorithms/cryptography/qkd.py +205 -0
  20. quantumflow/algorithms/cryptography/qrng.py +231 -0
  21. quantumflow/algorithms/machine_learning/__init__.py +7 -0
  22. quantumflow/algorithms/machine_learning/qnn.py +276 -0
  23. quantumflow/algorithms/machine_learning/qsvm.py +249 -0
  24. quantumflow/algorithms/machine_learning/vqe.py +229 -0
  25. quantumflow/algorithms/optimization/__init__.py +7 -0
  26. quantumflow/algorithms/optimization/grover.py +223 -0
  27. quantumflow/algorithms/optimization/qaoa.py +251 -0
  28. quantumflow/algorithms/optimization/quantum_annealing.py +237 -0
  29. quantumflow/algorithms/utility/__init__.py +6 -0
  30. quantumflow/algorithms/utility/circuit_optimizer.py +194 -0
  31. quantumflow/algorithms/utility/error_correction.py +330 -0
  32. quantumflow/api/__init__.py +1 -0
  33. quantumflow/api/routes/__init__.py +4 -0
  34. quantumflow/api/routes/billing_routes.py +520 -0
  35. quantumflow/backends/__init__.py +33 -0
  36. quantumflow/backends/base_backend.py +184 -0
  37. quantumflow/backends/braket_backend.py +345 -0
  38. quantumflow/backends/ibm_backend.py +112 -0
  39. quantumflow/backends/simulator_backend.py +86 -0
  40. quantumflow/billing/__init__.py +25 -0
  41. quantumflow/billing/models.py +126 -0
  42. quantumflow/billing/stripe_service.py +619 -0
  43. quantumflow/core/__init__.py +12 -0
  44. quantumflow/core/entanglement.py +164 -0
  45. quantumflow/core/memory.py +147 -0
  46. quantumflow/core/quantum_backprop.py +394 -0
  47. quantumflow/core/quantum_compressor.py +309 -0
  48. quantumflow/core/teleportation.py +386 -0
  49. quantumflow/integrations/__init__.py +107 -0
  50. quantumflow/integrations/autogen_tools.py +501 -0
  51. quantumflow/integrations/crewai_agents.py +425 -0
  52. quantumflow/integrations/crewai_tools.py +407 -0
  53. quantumflow/integrations/langchain_memory.py +385 -0
  54. quantumflow/integrations/langchain_tools.py +366 -0
  55. quantumflow/integrations/mcp_server.py +575 -0
  56. quantumflow_sdk-0.1.0.dist-info/METADATA +190 -0
  57. quantumflow_sdk-0.1.0.dist-info/RECORD +60 -0
  58. quantumflow_sdk-0.1.0.dist-info/WHEEL +5 -0
  59. quantumflow_sdk-0.1.0.dist-info/entry_points.txt +2 -0
  60. quantumflow_sdk-0.1.0.dist-info/top_level.txt +3 -0
@@ -0,0 +1,190 @@
1
+ Metadata-Version: 2.4
2
+ Name: quantumflow-sdk
3
+ Version: 0.1.0
4
+ Summary: Quantum-optimized AI agent workflow platform with 53% token compression
5
+ Author-email: BlockQuantAI <hello@blockquant.ai>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://qflowai.dev
8
+ Project-URL: Documentation, https://qflowai.dev/docs
9
+ Project-URL: Repository, https://github.com/blockquantai/quantumflow
10
+ Project-URL: Issues, https://github.com/blockquantai/quantumflow/issues
11
+ Keywords: quantum,quantum-computing,ai,machine-learning,token-compression,qkd,teleportation,langchain,crewai
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Scientific/Engineering :: Physics
23
+ Requires-Python: >=3.9
24
+ Description-Content-Type: text/markdown
25
+ Requires-Dist: numpy>=1.21.0
26
+ Requires-Dist: scipy>=1.7.0
27
+ Provides-Extra: ibm
28
+ Requires-Dist: qiskit>=0.45.0; extra == "ibm"
29
+ Requires-Dist: qiskit-ibm-runtime>=0.15.0; extra == "ibm"
30
+ Provides-Extra: aws
31
+ Requires-Dist: amazon-braket-sdk>=1.50.0; extra == "aws"
32
+ Provides-Extra: langchain
33
+ Requires-Dist: langchain>=0.1.0; extra == "langchain"
34
+ Provides-Extra: crewai
35
+ Requires-Dist: crewai>=0.1.0; extra == "crewai"
36
+ Provides-Extra: all
37
+ Requires-Dist: qiskit>=0.45.0; extra == "all"
38
+ Requires-Dist: qiskit-ibm-runtime>=0.15.0; extra == "all"
39
+ Requires-Dist: amazon-braket-sdk>=1.50.0; extra == "all"
40
+ Requires-Dist: langchain>=0.1.0; extra == "all"
41
+ Requires-Dist: crewai>=0.1.0; extra == "all"
42
+ Provides-Extra: dev
43
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
44
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
45
+ Requires-Dist: black>=23.0.0; extra == "dev"
46
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
47
+
48
+ # QuantumFlow SDK
49
+
50
+ Quantum-optimized AI agent workflow platform with 53% token compression, quantum teleportation, and BB84 QKD.
51
+
52
+ ## Installation
53
+
54
+ ```bash
55
+ pip install quantumflow-sdk
56
+ ```
57
+
58
+ With IBM Quantum support:
59
+ ```bash
60
+ pip install quantumflow-sdk[ibm]
61
+ ```
62
+
63
+ With all integrations:
64
+ ```bash
65
+ pip install quantumflow-sdk[all]
66
+ ```
67
+
68
+ ## Quick Start
69
+
70
+ ### Token Compression
71
+
72
+ ```python
73
+ from quantumflow import QuantumCompressor
74
+
75
+ compressor = QuantumCompressor(backend="simulator")
76
+ result = compressor.compress([100, 200, 150, 175, 225, 180, 160, 190])
77
+
78
+ print(f"Input tokens: {result.input_token_count}")
79
+ print(f"Output qubits: {result.n_qubits}")
80
+ print(f"Compression: {result.compression_percentage:.1f}%")
81
+ ```
82
+
83
+ ### Quantum Backpropagation
84
+
85
+ ```python
86
+ from quantumflow import QuantumBackprop
87
+
88
+ backprop = QuantumBackprop(backend="simulator")
89
+ result = backprop.compute_gradient(
90
+ input_state=[0.5, 0.5],
91
+ target_state=[0.8, 0.2],
92
+ weights=[0.3, 0.7],
93
+ )
94
+
95
+ print(f"Gradients: {result.gradients}")
96
+ print(f"Similarity: {result.similarity:.2%}")
97
+ ```
98
+
99
+ ### Quantum Key Distribution (QKD)
100
+
101
+ ```python
102
+ from quantumflow import QKDExchange
103
+
104
+ qkd = QKDExchange(backend="simulator")
105
+ result = qkd.exchange(key_length=256)
106
+
107
+ print(f"Shared key: {result['key'][:32]}...")
108
+ print(f"Error rate: {result['error_rate']:.2%}")
109
+ print(f"Secure: {result['secure']}")
110
+ ```
111
+
112
+ ### Quantum Teleportation
113
+
114
+ ```python
115
+ from quantumflow import QuantumTeleporter
116
+
117
+ teleporter = QuantumTeleporter(backend="simulator")
118
+
119
+ # Create Bell pairs
120
+ pairs = teleporter.create_bell_pairs(10)
121
+
122
+ # Teleport a quantum state
123
+ state = [0.707 + 0j, 0.707 + 0j] # |+> state
124
+ result = teleporter.teleport_state(state)
125
+
126
+ print(f"Fidelity: {result.fidelity:.4f}")
127
+ print(f"Corrections: {result.corrections_applied}")
128
+ ```
129
+
130
+ ### Secure Messaging
131
+
132
+ ```python
133
+ from quantumflow import SecureMessenger
134
+
135
+ messenger = SecureMessenger(backend="simulator")
136
+
137
+ # Establish secure channel
138
+ channel = messenger.establish_channel("bob@example.com")
139
+
140
+ # Send message via compressed teleportation + QKD
141
+ result = messenger.send_message("Hello, quantum world!")
142
+
143
+ print(f"Compression ratio: {result['compression_ratio']:.1f}x")
144
+ print(f"QKD secured: {result['qkd_secured']}")
145
+ ```
146
+
147
+ ## REST API
148
+
149
+ You can also use the hosted API at `https://api.qflowai.dev`:
150
+
151
+ ```bash
152
+ # Token compression
153
+ curl -X POST https://api.qflowai.dev/v1/compress \
154
+ -H "Content-Type: application/json" \
155
+ -d '{"tokens": [100, 200, 150, 175]}'
156
+
157
+ # QKD exchange
158
+ curl -X POST https://api.qflowai.dev/v1/quantum/qkd/exchange \
159
+ -H "Content-Type: application/json" \
160
+ -d '{"key_length": 256}'
161
+
162
+ # Secure message
163
+ curl -X POST https://api.qflowai.dev/v1/quantum/message \
164
+ -H "Content-Type: application/json" \
165
+ -d '{"message": "Hello quantum world!"}'
166
+ ```
167
+
168
+ ## Features
169
+
170
+ - **53% Token Compression**: Quantum amplitude encoding for exponential compression
171
+ - **Quantum Backpropagation**: 97.78% gradient similarity via teleportation protocol
172
+ - **BB84 QKD**: Unconditionally secure key exchange
173
+ - **Quantum Teleportation**: State transfer without physical qubit transmission
174
+ - **Secure Messaging**: Compressed teleportation + QKD encryption
175
+ - **Multi-Backend**: Simulator, IBM Quantum, AWS Braket
176
+
177
+ ## Framework Integrations
178
+
179
+ - LangChain
180
+ - CrewAI
181
+ - AutoGen
182
+ - Claude MCP
183
+
184
+ ## Documentation
185
+
186
+ Full documentation at [https://qflowai.dev/docs](https://qflowai.dev/docs)
187
+
188
+ ## License
189
+
190
+ MIT License - see LICENSE file for details.
@@ -0,0 +1,60 @@
1
+ api/__init__.py,sha256=Oc_JXlNXQ8vZqr7A32xlhaW-FLUk2DfSVqjDoh4cv4Y,31
2
+ api/auth.py,sha256=8gxgMSwsfsUCK0mM-ZTWM_ZsvTDvyOfVdO0NYLCHg1I,5942
3
+ api/main.py,sha256=SJKAzb1HRzGjpUbOvplU8U-Xul6XavM_8yvmDSmJVNc,12494
4
+ api/models.py,sha256=i0bwfN697wSxnIchHo13aOWkzZQE90WSRFUArJS0a2M,3262
5
+ api/routes/__init__.py,sha256=NsndLhwM3PzBnPYSUiKAu0pJKf2JnVkt3vFbaFkA6PA,26
6
+ api/routes/auth_routes.py,sha256=f80G08AfUh2XCUdziJbncNH8HT9GlOq3f9BpX9p_ans,5966
7
+ api/routes/teleport_routes.py,sha256=8G8-lAuB1H2qSom7Im7s1NiiHRy0HBPzlnJ-QAer3DI,12149
8
+ db/__init__.py,sha256=CLyI_3_AP7wQATuxLV2yHPvYDNikJYmH5BMQ3Oez1xw,280
9
+ db/crud.py,sha256=q_HpP0RzsI7Lz1EMhEWzaMxdxzGAdVTBD2LALqbGLGQ,8175
10
+ db/database.py,sha256=Md_e3z1t6NzKCCVdS4gRo0Pf6LNZvRClIX4QU8F8InI,2078
11
+ db/models.py,sha256=W-NLqT6kGtXTN3r4DqVPSPglt-_iFDBlqB6e3nzflrg,5975
12
+ quantumflow/__init__.py,sha256=FjUmp-TJl6O25iSYqCb1uhKyOgyOSffFmSExuHba89g,1284
13
+ quantumflow/algorithms/__init__.py,sha256=waXASb2jnbAcjV-xS1wx-bGmPJ5lCj111dJ14eB8KCo,916
14
+ quantumflow/algorithms/compression/__init__.py,sha256=rejDCdZJEy1tamQdDaZodGbo8wA1rszlXEtwvYgZO7A,361
15
+ quantumflow/algorithms/compression/amplitude_amplification.py,sha256=pebJiATIhwEdnAZY4CwInYPEKbtZufJ0Ka3OCdtvZRk,5440
16
+ quantumflow/algorithms/compression/qft_compression.py,sha256=Z6xPNa4vaqq72CcRl-QPxpDSu8GRaUC2g3SjcDe4Adw,3701
17
+ quantumflow/algorithms/compression/token_compression.py,sha256=qwjV-fWV7fy9PvEQSTFCFj-I_Aji2uRtgz9ndknPi5Y,7305
18
+ quantumflow/algorithms/cryptography/__init__.py,sha256=uzJMUgBJIH16gP_RaZhg9Ue66uw8mwqUYMllfhOU9Bw,173
19
+ quantumflow/algorithms/cryptography/qkd.py,sha256=mFRlypQXi4AhFxSy0FBpuAapJh5La1rx-siL1cJoqTc,6023
20
+ quantumflow/algorithms/cryptography/qrng.py,sha256=aVyFZZZYsNw-LKZghIF505BQDzX9uc2kIrcoK92OXU8,5875
21
+ quantumflow/algorithms/machine_learning/__init__.py,sha256=P2jSE7ibOaA9uzUw2Mu8p2zc-D5t9nwEsnSBmgQSJ5Y,252
22
+ quantumflow/algorithms/machine_learning/qnn.py,sha256=1aPNNTu0I2c_C6maPKWDMHW2p-Torz6nhGrIeD8gCs0,7972
23
+ quantumflow/algorithms/machine_learning/qsvm.py,sha256=_JAsrMI7nthOdmN8VETCXwpjCOaO1q-bQJQR-1eMPj8,7839
24
+ quantumflow/algorithms/machine_learning/vqe.py,sha256=Vy5wxr2KAKBK_qphMn9seKckoVrqNbqKgsZr66SKNpU,6958
25
+ quantumflow/algorithms/optimization/__init__.py,sha256=gQ_EgS4je9HBwk563bY86kuTfqWwPMnFGV-HcxuLsr0,297
26
+ quantumflow/algorithms/optimization/grover.py,sha256=onn6rgIZFIw9CAPQQDhnc_1Y8PkQJYF8-GNLFUZPg8Y,6250
27
+ quantumflow/algorithms/optimization/qaoa.py,sha256=7VsD456_P4JrzsUJ9nJ2DEKOEoGLHdHUetqOfIwedFw,7254
28
+ quantumflow/algorithms/optimization/quantum_annealing.py,sha256=JsJNzeYdkKdWK8BNHFQnQD2kyIO6NrNEGSipAtdFsY0,6659
29
+ quantumflow/algorithms/utility/__init__.py,sha256=O-pY9GQ3i5DspBg-pLXFKz2QpLobL-q19jJ6Ovtv6-w,232
30
+ quantumflow/algorithms/utility/circuit_optimizer.py,sha256=PsvSZA6teiO4soktMW2hiVKrTEieqw5ccKYjtV4T63I,5839
31
+ quantumflow/algorithms/utility/error_correction.py,sha256=1L4ikcgasFwKYFSCxkx9Bk-Jz9En1KqZI-uGUScjsFw,9398
32
+ quantumflow/api/__init__.py,sha256=WxcaYzyvrvOdWFlJn2AchfEm9Jy8ytFD9f0POaAF-f8,25
33
+ quantumflow/api/routes/__init__.py,sha256=2WPtPte_1ZsrG9StXgcrqRPx-wPDFV8x1vn2FVtaBrY,130
34
+ quantumflow/api/routes/billing_routes.py,sha256=MDvwkbVaXZhFl4_j5pgJ72_049a14u3fgAXxh314OdQ,16955
35
+ quantumflow/backends/__init__.py,sha256=Q2Oi3VMp-AMXYN3QffsYd9NFz-qOaxgK_iSVCpVIivI,829
36
+ quantumflow/backends/base_backend.py,sha256=cvvFcInPtzmzp1-uF796ciW3GpXgzaj4NJI2u_zsbL4,5408
37
+ quantumflow/backends/braket_backend.py,sha256=vpWH0w6sQa_56SEBk_kvomKsuOJlb1ILANS-jUGcDv4,11527
38
+ quantumflow/backends/ibm_backend.py,sha256=EHm-aflsFTEPAhTQs9NkX9eIyse6ElGQ054PW2gK3kY,3345
39
+ quantumflow/backends/simulator_backend.py,sha256=tMbDcGwOWYbhTA8gNZheCfk1inAwbsH9oLeZnoJFE5g,2641
40
+ quantumflow/billing/__init__.py,sha256=4b9JwTXIT7LsehvkX42bsvMZ6RvcP3om5MuW9i9ulXo,484
41
+ quantumflow/billing/models.py,sha256=NeLbWX_31T52gKTL_toYcSwjUjzk3Te9jq0QFPaMTbY,3344
42
+ quantumflow/billing/stripe_service.py,sha256=Fy5vUSUQt2r3kKAQhb2KzxMAklOoB-bOnjZE0fAKbYg,20525
43
+ quantumflow/core/__init__.py,sha256=fZFBkVu1wsLf7qSY1s3OMi6oBIwy65K_Cwk-jrd_SSo,359
44
+ quantumflow/core/entanglement.py,sha256=0H9XKU7D5OkUBgMEiNKsvfjAhsiD2TX3BmCYzrVyd5U,4663
45
+ quantumflow/core/memory.py,sha256=0rB2Dks3XM1NEiL-v4G0P6jeL2BvcdJNljezRrVccdI,4494
46
+ quantumflow/core/quantum_backprop.py,sha256=XozlPtwinegI5NosxlW4TrpP5Zh58_yI8WnxznwBHlU,12370
47
+ quantumflow/core/quantum_compressor.py,sha256=okzfF4-1uL22FcK9Xhng1DLzmIbz3ADN-R1xzFTv-tI,10094
48
+ quantumflow/core/teleportation.py,sha256=_T5rRItjFramqWdqBNLwu_fY7Yr9pmdUda4L7STcwcA,12420
49
+ quantumflow/integrations/__init__.py,sha256=_QS8M9XxmBzRspuBCly6qocCopPCPsykFt-QhHWmfQ8,2571
50
+ quantumflow/integrations/autogen_tools.py,sha256=sTTX7mGFjUKbmVatlcY9N9F2NeR6vkIj-VYduE0SNus,14672
51
+ quantumflow/integrations/crewai_agents.py,sha256=t62hukL0xg2FV54yczTAakNYQA-AOZ9AWWgzDnH0LGM,12604
52
+ quantumflow/integrations/crewai_tools.py,sha256=bY5uJyKmCegt6Kb9hvErhvaKcCDlk2_injx50-krN7E,13744
53
+ quantumflow/integrations/langchain_memory.py,sha256=wgYTdovncZNWpFwcNZjhNUqNRi661ys9GXaHYmbXP-Q,12608
54
+ quantumflow/integrations/langchain_tools.py,sha256=bDrKZDYSRQJJGSNc9iay1Q4NoIR8CHmtZLcybS5ub_w,12401
55
+ quantumflow/integrations/mcp_server.py,sha256=KJTAxJOyCVl7-whTD1iss9VZmyi0K1f4gNJCH8Cvl_0,21117
56
+ quantumflow_sdk-0.1.0.dist-info/METADATA,sha256=vKxocuo57XDRBrVSIXGWoYWMGQ_TvPEctPMsjpCbF7w,5461
57
+ quantumflow_sdk-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
58
+ quantumflow_sdk-0.1.0.dist-info/entry_points.txt,sha256=ebX2acoOLgym42XZEqym3OfKCYiPz-mFuPSSGsHFz4c,53
59
+ quantumflow_sdk-0.1.0.dist-info/top_level.txt,sha256=hEr_GRvoZ3-83naVIhNuJvoAND1aCvhBag_ynxQguIo,19
60
+ quantumflow_sdk-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ quantumflow = quantumflow.cli:main
@@ -0,0 +1,3 @@
1
+ api
2
+ db
3
+ quantumflow