sia-script 0.8.0__tar.gz → 0.8.2__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.
- {sia_script-0.8.0 → sia_script-0.8.2}/PKG-INFO +1 -1
- {sia_script-0.8.0 → sia_script-0.8.2}/pyproject.toml +1 -1
- {sia_script-0.8.0 → sia_script-0.8.2}/sia/__init__.py +147 -30
- sia_script-0.8.2/sia/hdqs_engine.py +1872 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/sia_script.egg-info/PKG-INFO +1 -1
- sia_script-0.8.0/sia/hdqs_engine.py +0 -1093
- {sia_script-0.8.0 → sia_script-0.8.2}/LICENSE.md +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/README.md +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/setup.cfg +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/sia/els.py +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/sia/hdqs.py +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/sia/ntt.py +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/sia_script.egg-info/SOURCES.txt +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/sia_script.egg-info/dependency_links.txt +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/sia_script.egg-info/requires.txt +0 -0
- {sia_script-0.8.0 → sia_script-0.8.2}/sia_script.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sia-script
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2
|
|
4
4
|
Summary: SIA — Simplified Integrated Architecture: SiaNTT, SIA-ELS (ABAP interpreter), the HDQS server client, and hdqs_engine (offline statevector quantum simulator — no server or API token required)
|
|
5
5
|
Author-email: Sia Software Innovations Private Limited <info@siasoftwareinnovations.com>
|
|
6
6
|
License: # PROPRIETARY SOFTWARE LICENSE
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sia-script"
|
|
7
|
-
version = "0.8.
|
|
7
|
+
version = "0.8.2"
|
|
8
8
|
description = "SIA — Simplified Integrated Architecture: SiaNTT, SIA-ELS (ABAP interpreter), the HDQS server client, and hdqs_engine (offline statevector quantum simulator — no server or API token required)"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "Sia Software Innovations Private Limited", email = "info@siasoftwareinnovations.com" }
|
|
@@ -9,10 +9,12 @@ Client-side package. Loads:
|
|
|
9
9
|
2. ntt — SiaNTT declarative entity module. Pure Python, no deps.
|
|
10
10
|
3. els — SIA Enterprise Logic Studio (ABAP-style interpreter).
|
|
11
11
|
Pure Python, no deps. (proprietary)
|
|
12
|
-
4. hdqs_engine — offline
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
4. hdqs_engine — offline quantum simulator: statevector/density matrix,
|
|
13
|
+
GPU acceleration via PyTorch, advanced noise channels,
|
|
14
|
+
canonical algorithms (Deutsch, Grover, Shor-adjacent primitives,
|
|
15
|
+
VQE, QAOA, ...) and QKD protocols (BB84, E91, QSS).
|
|
16
|
+
Runs entirely locally — no server, no API token, no network call.
|
|
17
|
+
Requires NumPy; PyTorch optional for GPU acceleration.
|
|
16
18
|
MIT-licensed (see sia/hdqs_engine/LICENSE), distinct from the
|
|
17
19
|
proprietary license covering the rest of this package.
|
|
18
20
|
|
|
@@ -126,33 +128,113 @@ except ImportError:
|
|
|
126
128
|
NttSecurityError = None
|
|
127
129
|
|
|
128
130
|
# =====================================================
|
|
129
|
-
# OPTIONAL: HDQS-ENGINE (offline statevector simulator)
|
|
131
|
+
# OPTIONAL: HDQS-ENGINE (offline statevector/density matrix simulator)
|
|
130
132
|
# Single file (sia/hdqs_engine.py) — no server, no API token, no network
|
|
131
|
-
# call. Requires NumPy;
|
|
132
|
-
#
|
|
133
|
-
#
|
|
133
|
+
# call. Requires NumPy; PyTorch optional for GPU acceleration.
|
|
134
|
+
# MIT-licensed on its own (see the MIT_LICENSE string inside
|
|
135
|
+
# sia/hdqs_engine.py), distinct from the proprietary license covering
|
|
136
|
+
# the rest of sia-script.
|
|
137
|
+
#
|
|
138
|
+
# UPDATED v0.3.0: Now includes:
|
|
139
|
+
# - HDQS class (renamed from StatevectorEngine for cleaner API)
|
|
140
|
+
# - Density matrix support (off by default, enable with use_density_matrix=True)
|
|
141
|
+
# - GPU acceleration via PyTorch (enable with use_gpu=True)
|
|
142
|
+
# - Advanced noise channels:
|
|
143
|
+
# * Basic: bit_flip, phase_flip, depolarizing, amplitude_damping, phase_damping
|
|
144
|
+
# * Advanced: thermal, coherent, amplitude_phase_coupling,
|
|
145
|
+
# correlated_noise (two-qubit), readout_error
|
|
146
|
+
# - Purity, entropy, and other quantum information metrics
|
|
147
|
+
# - All canonical algorithms with GPU support
|
|
148
|
+
# - QKD protocols (BB84, E91, QSS) with GPU support
|
|
149
|
+
# - PyTorch QuantumLayer with GPU acceleration
|
|
134
150
|
# =====================================================
|
|
135
151
|
|
|
136
152
|
try:
|
|
137
153
|
from . import hdqs_engine
|
|
138
154
|
from .hdqs_engine import (
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
155
|
+
# Core class (renamed from StatevectorEngine)
|
|
156
|
+
HDQS,
|
|
157
|
+
GATES,
|
|
158
|
+
controlled,
|
|
159
|
+
random_state,
|
|
160
|
+
partial_trace, # Partial trace utility
|
|
161
|
+
|
|
162
|
+
# GPU and backend detection
|
|
163
|
+
_GPU_AVAILABLE,
|
|
164
|
+
_TORCH_AVAILABLE,
|
|
165
|
+
|
|
166
|
+
# Canonical algorithms
|
|
167
|
+
deutsch,
|
|
168
|
+
deutsch_jozsa,
|
|
169
|
+
bernstein_vazirani,
|
|
170
|
+
grover,
|
|
171
|
+
simon,
|
|
172
|
+
apply_qft,
|
|
173
|
+
qft_matrix,
|
|
174
|
+
teleport,
|
|
175
|
+
superdense,
|
|
176
|
+
|
|
177
|
+
# VQE and QAOA
|
|
178
|
+
vqe,
|
|
179
|
+
energy,
|
|
180
|
+
parameter_shift_gradient,
|
|
181
|
+
hardware_efficient_ansatz,
|
|
182
|
+
exact_ground_energy,
|
|
183
|
+
qaoa_maxcut,
|
|
184
|
+
qaoa_state,
|
|
185
|
+
maxcut_expectation,
|
|
186
|
+
|
|
187
|
+
# QKD protocols
|
|
188
|
+
bb84,
|
|
189
|
+
e91,
|
|
190
|
+
qss,
|
|
191
|
+
|
|
192
|
+
# PyTorch integration with GPU support
|
|
145
193
|
QuantumLayer,
|
|
146
194
|
)
|
|
195
|
+
|
|
196
|
+
# Legacy alias for backward compatibility
|
|
197
|
+
# StatevectorEngine is still available as an alias to HDQS
|
|
198
|
+
StatevectorEngine = HDQS
|
|
199
|
+
|
|
147
200
|
except ImportError:
|
|
148
|
-
hdqs_engine
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
201
|
+
# If hdqs_engine is not available, set all to None
|
|
202
|
+
HDQS = None
|
|
203
|
+
StatevectorEngine = None
|
|
204
|
+
GATES = None
|
|
205
|
+
controlled = None
|
|
206
|
+
random_state = None
|
|
207
|
+
partial_trace = None
|
|
208
|
+
|
|
209
|
+
_GPU_AVAILABLE = False
|
|
210
|
+
_TORCH_AVAILABLE = False
|
|
211
|
+
|
|
212
|
+
deutsch = None
|
|
213
|
+
deutsch_jozsa = None
|
|
214
|
+
bernstein_vazirani = None
|
|
215
|
+
grover = None
|
|
216
|
+
simon = None
|
|
217
|
+
apply_qft = None
|
|
218
|
+
qft_matrix = None
|
|
219
|
+
teleport = None
|
|
220
|
+
superdense = None
|
|
221
|
+
|
|
222
|
+
vqe = None
|
|
223
|
+
energy = None
|
|
224
|
+
parameter_shift_gradient = None
|
|
225
|
+
hardware_efficient_ansatz = None
|
|
226
|
+
exact_ground_energy = None
|
|
227
|
+
qaoa_maxcut = None
|
|
228
|
+
qaoa_state = None
|
|
229
|
+
maxcut_expectation = None
|
|
230
|
+
|
|
231
|
+
bb84 = None
|
|
232
|
+
e91 = None
|
|
233
|
+
qss = None
|
|
234
|
+
|
|
155
235
|
QuantumLayer = None
|
|
236
|
+
|
|
237
|
+
hdqs_engine = None
|
|
156
238
|
|
|
157
239
|
__all__ = [
|
|
158
240
|
# HDQS client (server + token required)
|
|
@@ -197,13 +279,48 @@ __all__ = [
|
|
|
197
279
|
"SystemVariables",
|
|
198
280
|
"SelectionOption",
|
|
199
281
|
|
|
200
|
-
#
|
|
201
|
-
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
"
|
|
282
|
+
# HDQS-Engine (offline, no server/token required)
|
|
283
|
+
# Core class (renamed for cleaner API)
|
|
284
|
+
"HDQS",
|
|
285
|
+
"StatevectorEngine", # Legacy alias for backward compatibility
|
|
286
|
+
"GATES",
|
|
287
|
+
"controlled",
|
|
288
|
+
"random_state",
|
|
289
|
+
"partial_trace", # Partial trace utility
|
|
290
|
+
|
|
291
|
+
# GPU and backend detection
|
|
292
|
+
"_GPU_AVAILABLE",
|
|
293
|
+
"_TORCH_AVAILABLE",
|
|
294
|
+
|
|
295
|
+
# Canonical algorithms
|
|
296
|
+
"deutsch",
|
|
297
|
+
"deutsch_jozsa",
|
|
298
|
+
"bernstein_vazirani",
|
|
299
|
+
"grover",
|
|
300
|
+
"simon",
|
|
301
|
+
"apply_qft",
|
|
302
|
+
"qft_matrix",
|
|
303
|
+
"teleport",
|
|
304
|
+
"superdense",
|
|
305
|
+
|
|
306
|
+
# VQE and QAOA
|
|
307
|
+
"vqe",
|
|
308
|
+
"energy",
|
|
309
|
+
"parameter_shift_gradient",
|
|
310
|
+
"hardware_efficient_ansatz",
|
|
311
|
+
"exact_ground_energy",
|
|
312
|
+
"qaoa_maxcut",
|
|
313
|
+
"qaoa_state",
|
|
314
|
+
"maxcut_expectation",
|
|
315
|
+
|
|
316
|
+
# QKD protocols
|
|
317
|
+
"bb84",
|
|
318
|
+
"e91",
|
|
319
|
+
"qss",
|
|
320
|
+
|
|
321
|
+
# PyTorch integration with GPU support
|
|
208
322
|
"QuantumLayer",
|
|
209
|
-
|
|
323
|
+
|
|
324
|
+
# Module reference
|
|
325
|
+
"hdqs_engine",
|
|
326
|
+
]
|