sia-script 0.6.3__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.
sia/__init__.py ADDED
@@ -0,0 +1,134 @@
1
+ """
2
+ HDQS Quantum Computing Library
3
+ Hyper-Dimensional Quantum System Client
4
+
5
+ Default Server: 31.97.239.213:8000
6
+ """
7
+
8
+ __version__ = "1.0.0"
9
+ __author__ = "Sia Software Innovations Private Limited"
10
+ __server_ip__ = "31.97.239.213"
11
+ __server_port__ = 8000
12
+ __default_url__ = f"http://{__server_ip__}:{__server_port__}"
13
+
14
+ # First import hdqs components that should always exist
15
+ from .hdqs import (
16
+ HDQSClient,
17
+ LocalHDQSClient,
18
+ HDQSError,
19
+ connect,
20
+ hdqs,
21
+ call,
22
+ create_circuit,
23
+ run_circuit,
24
+ measure,
25
+ analyze,
26
+ run_demo,
27
+ create_hyper_system,
28
+ DEFAULT_SERVER_IP,
29
+ DEFAULT_SERVER_PORT,
30
+ DEFAULT_BASE_URL
31
+ )
32
+
33
+ # Initialize ELS exports as None first
34
+ run = None
35
+ run_file = None
36
+ safe_run = None
37
+ repl = None
38
+ extract_sia_block = None
39
+ ABAPType = None
40
+ TypedVariable = None
41
+ RuntimeEnv = None
42
+ RuntimeError = None
43
+ SystemVariables = None
44
+ SelectionOption = None
45
+
46
+ # Try to import ELS modules separately
47
+ try:
48
+ from . import els_core
49
+
50
+ # Import main functions from els_core
51
+ from .els_core import (
52
+ run as run_func,
53
+ run_file as run_file_func,
54
+ safe_run as safe_run_func,
55
+ repl as repl_func,
56
+ extract_sia_block as extract_sia_block_func,
57
+ ABAPType as ABAPType_class,
58
+ TypedVariable as TypedVariable_class,
59
+ RuntimeEnv as RuntimeEnv_class,
60
+ RuntimeError as RuntimeError_class,
61
+ SystemVariables as SystemVariables_class,
62
+ SelectionOption as SelectionOption_class
63
+ )
64
+
65
+ # Assign to module-level variables
66
+ run = run_func
67
+ run_file = run_file_func
68
+ safe_run = safe_run_func
69
+ repl = repl_func
70
+ extract_sia_block = extract_sia_block_func
71
+ ABAPType = ABAPType_class
72
+ TypedVariable = TypedVariable_class
73
+ RuntimeEnv = RuntimeEnv_class
74
+ RuntimeError = RuntimeError_class
75
+ SystemVariables = SystemVariables_class
76
+ SelectionOption = SelectionOption_class
77
+
78
+ except ImportError as e:
79
+ # Silently ignore ELS import errors - they're optional
80
+ pass
81
+
82
+ # Try to import other optional modules
83
+ try:
84
+ from . import qbt
85
+ except ImportError:
86
+ qbt = None
87
+
88
+ try:
89
+ from . import vqram
90
+ except ImportError:
91
+ vqram = None
92
+
93
+ try:
94
+ from . import ntt
95
+ except ImportError:
96
+ ntt = None
97
+
98
+ __all__ = [
99
+ "HDQSClient",
100
+ "LocalHDQSClient",
101
+ "HDQSError",
102
+ "connect",
103
+ "hdqs",
104
+ "call",
105
+ "create_circuit",
106
+ "run_circuit",
107
+ "measure",
108
+ "analyze",
109
+ "run_demo",
110
+ "create_hyper_system",
111
+ "DEFAULT_SERVER_IP",
112
+ "DEFAULT_SERVER_PORT",
113
+ "DEFAULT_BASE_URL",
114
+ "qbt",
115
+ "vqram",
116
+ "ntt",
117
+ # ELS exports (will be None if not imported)
118
+ "run",
119
+ "run_file",
120
+ "safe_run",
121
+ "repl",
122
+ "extract_sia_block",
123
+ "ABAPType",
124
+ "TypedVariable",
125
+ "RuntimeEnv",
126
+ "RuntimeError",
127
+ "SystemVariables",
128
+ "SelectionOption"
129
+ ]
130
+
131
+ # For backward compatibility, create els module alias if els_core exists
132
+ if els_core is not None:
133
+ import sys
134
+ sys.modules[__name__ + '.els'] = sys.modules[__name__ + '.els_core']