advay-platform 0.2.0__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.
- advay_platform-0.2.0/LICENSE +44 -0
- advay_platform-0.2.0/MANIFEST.in +22 -0
- advay_platform-0.2.0/PKG-INFO +218 -0
- advay_platform-0.2.0/README.md +176 -0
- advay_platform-0.2.0/advay_platform/__init__.py +70 -0
- advay_platform-0.2.0/advay_platform/__main__.py +5 -0
- advay_platform-0.2.0/advay_platform/api.py +409 -0
- advay_platform-0.2.0/advay_platform/cli.py +233 -0
- advay_platform-0.2.0/advay_platform/data/sqpu_profile_v2_1_4.json +37 -0
- advay_platform-0.2.0/advay_platform/execution/__init__.py +5 -0
- advay_platform-0.2.0/advay_platform/execution/clifford.py +102 -0
- advay_platform-0.2.0/advay_platform/execution/router.py +79 -0
- advay_platform-0.2.0/advay_platform/execution/state_vector.py +590 -0
- advay_platform-0.2.0/advay_platform/ingestion/__init__.py +33 -0
- advay_platform-0.2.0/advay_platform/ingestion/ir.py +201 -0
- advay_platform-0.2.0/advay_platform/ingestion/qasm_adapter.py +187 -0
- advay_platform-0.2.0/advay_platform/ingestion/qiskit_adapter.py +138 -0
- advay_platform-0.2.0/advay_platform/noise/__init__.py +3 -0
- advay_platform-0.2.0/advay_platform/noise/projector.py +101 -0
- advay_platform-0.2.0/advay_platform/resources/__init__.py +25 -0
- advay_platform-0.2.0/advay_platform/resources/estimator.py +263 -0
- advay_platform-0.2.0/advay_platform/resources/templates.py +152 -0
- advay_platform-0.2.0/advay_platform/schemas/__init__.py +21 -0
- advay_platform-0.2.0/advay_platform/schemas/request.py +114 -0
- advay_platform-0.2.0/advay_platform/schemas/response.py +232 -0
- advay_platform-0.2.0/advay_platform/twin_bridge.py +188 -0
- advay_platform-0.2.0/advay_platform.egg-info/PKG-INFO +218 -0
- advay_platform-0.2.0/advay_platform.egg-info/SOURCES.txt +37 -0
- advay_platform-0.2.0/advay_platform.egg-info/dependency_links.txt +1 -0
- advay_platform-0.2.0/advay_platform.egg-info/entry_points.txt +2 -0
- advay_platform-0.2.0/advay_platform.egg-info/requires.txt +11 -0
- advay_platform-0.2.0/advay_platform.egg-info/top_level.txt +1 -0
- advay_platform-0.2.0/examples/grover_4qubit.py +125 -0
- advay_platform-0.2.0/examples/qaoa_maxcut.py +104 -0
- advay_platform-0.2.0/examples/shor_factor_15.py +205 -0
- advay_platform-0.2.0/pyproject.toml +99 -0
- advay_platform-0.2.0/setup.cfg +4 -0
- advay_platform-0.2.0/tests/test_advay_platform.py +392 -0
- advay_platform-0.2.0/tests/test_v02_features.py +269 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Advay Platform SDK — License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Advay Labs Private Limited. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software is the proprietary property of Advay Labs Private Limited
|
|
6
|
+
("Advay Labs"). By installing, copying, or otherwise using this software,
|
|
7
|
+
you agree to the following terms.
|
|
8
|
+
|
|
9
|
+
PERMITTED USE
|
|
10
|
+
-------------
|
|
11
|
+
1. Evaluation and research use, including academic teaching and
|
|
12
|
+
non-commercial scientific research, is permitted free of charge
|
|
13
|
+
under the "preview" or "academia" subscription tier offered by
|
|
14
|
+
Advay Labs.
|
|
15
|
+
2. Commercial use — defined as any use that generates revenue, supports
|
|
16
|
+
a product or service offered to third parties, or is conducted by or
|
|
17
|
+
on behalf of an organization with annual revenue exceeding USD 1
|
|
18
|
+
million — requires a paid subscription tier and a separate written
|
|
19
|
+
license agreement with Advay Labs.
|
|
20
|
+
|
|
21
|
+
RESTRICTIONS
|
|
22
|
+
------------
|
|
23
|
+
You may not, without prior written consent from Advay Labs:
|
|
24
|
+
(a) sublicense, sell, rent, lease, or distribute this software or any
|
|
25
|
+
derivative work;
|
|
26
|
+
(b) reverse-engineer, decompile, or disassemble this software except
|
|
27
|
+
to the extent that such activity is expressly permitted by
|
|
28
|
+
applicable law notwithstanding this limitation;
|
|
29
|
+
(c) remove or alter any proprietary notices or labels on the software;
|
|
30
|
+
(d) use this software to provide a competing service to the Advay Labs
|
|
31
|
+
Quantum Platform without a separate license agreement.
|
|
32
|
+
|
|
33
|
+
NO WARRANTY
|
|
34
|
+
-----------
|
|
35
|
+
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
36
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
37
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
38
|
+
ADVAY LABS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING
|
|
39
|
+
FROM, OUT OF OR IN CONNECTION WITH THIS SOFTWARE.
|
|
40
|
+
|
|
41
|
+
CONTACT
|
|
42
|
+
-------
|
|
43
|
+
For commercial licensing, partnerships, or questions about permitted use:
|
|
44
|
+
support@advaylabs.com
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Files to include in the source distribution (advay-platform-X.Y.Z.tar.gz).
|
|
2
|
+
# The wheel (.whl) gets only the package directory by default — this controls
|
|
3
|
+
# what additionally ships in the sdist.
|
|
4
|
+
|
|
5
|
+
include README.md
|
|
6
|
+
include LICENSE
|
|
7
|
+
include pyproject.toml
|
|
8
|
+
|
|
9
|
+
# Include the package data (the SQPU profile JSON)
|
|
10
|
+
recursive-include advay_platform *.json *.py
|
|
11
|
+
|
|
12
|
+
# Tests and examples — useful for users to verify install and learn
|
|
13
|
+
recursive-include tests *.py
|
|
14
|
+
recursive-include examples *.py
|
|
15
|
+
|
|
16
|
+
# Explicit excludes — defensive against accidental commits
|
|
17
|
+
global-exclude __pycache__
|
|
18
|
+
global-exclude *.pyc
|
|
19
|
+
global-exclude *.pyo
|
|
20
|
+
global-exclude *.egg-info
|
|
21
|
+
global-exclude .DS_Store
|
|
22
|
+
global-exclude .pytest_cache
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: advay-platform
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Advay Labs quantum platform SDK — run OpenQASM 3 circuits against the SQPU emulator, get resource projections and noise estimates
|
|
5
|
+
Author-email: Advay Labs Private Limited <support@advaylabs.com>
|
|
6
|
+
Maintainer-email: Advay Labs Private Limited <support@advaylabs.com>
|
|
7
|
+
License: Proprietary
|
|
8
|
+
Project-URL: Homepage, https://advaylabs.com
|
|
9
|
+
Project-URL: Documentation, https://dev.advaylabs.com/docs
|
|
10
|
+
Project-URL: API Console, https://dev.advaylabs.com/dashboard
|
|
11
|
+
Project-URL: Issue Tracker, https://dev.advaylabs.com/support
|
|
12
|
+
Keywords: quantum,quantum-computing,qasm,openqasm,qiskit,simulator,surface-code,fault-tolerance,advay-labs,sqpu
|
|
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 :: Information Analysis
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Programming Language :: Python
|
|
20
|
+
Classifier: Programming Language :: Python :: 3
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
25
|
+
Classifier: Operating System :: OS Independent
|
|
26
|
+
Classifier: License :: Other/Proprietary License
|
|
27
|
+
Classifier: Natural Language :: English
|
|
28
|
+
Requires-Python: >=3.10
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Requires-Dist: numpy>=1.24
|
|
32
|
+
Requires-Dist: stim>=1.13
|
|
33
|
+
Requires-Dist: qiskit>=1.0
|
|
34
|
+
Requires-Dist: qiskit_qasm3_import>=0.5
|
|
35
|
+
Requires-Dist: pymatching>=2.1
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
39
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
40
|
+
Requires-Dist: twine>=4.0; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# advay-platform
|
|
44
|
+
|
|
45
|
+
[](https://www.python.org/downloads/)
|
|
46
|
+
[](#license)
|
|
47
|
+
|
|
48
|
+
Python SDK for the **Advay Labs Quantum Platform**. Run OpenQASM 3
|
|
49
|
+
circuits against our hosted SQPU emulator, get realistic noise projections
|
|
50
|
+
and surface-code resource estimates, all from a single `pip install`.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install advay-platform
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## What you get
|
|
57
|
+
|
|
58
|
+
- **Cloud emulator access** — submit OpenQASM 3 circuits to
|
|
59
|
+
`dev.advaylabs.com`, get counts back.
|
|
60
|
+
- **Local emulator** — the same compute stack also runs offline on your
|
|
61
|
+
machine for unit tests and CI; no API key required for local use.
|
|
62
|
+
- **Resource projection** — surface-code physical-qubit cost, code distance,
|
|
63
|
+
T-factory count, and wall-clock for your circuit on the SQPU roadmap
|
|
64
|
+
device, with factor-of-2 honest bounds.
|
|
65
|
+
- **Noise projection** — end-to-end success probability under three
|
|
66
|
+
control modes (`full` / `hybrid` / `reduced`), calibrated to the digital
|
|
67
|
+
twin's gate-time ceilings.
|
|
68
|
+
- **OpenQASM 3 support** — classical control flow (`if_else`), mid-circuit
|
|
69
|
+
measurement, and proper feedforward simulation included.
|
|
70
|
+
- **Qiskit interop** — `qiskit.QuantumCircuit` objects are accepted as
|
|
71
|
+
input alongside QASM strings.
|
|
72
|
+
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
### Run a circuit against the cloud API
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import os
|
|
79
|
+
import requests
|
|
80
|
+
|
|
81
|
+
QASM = """
|
|
82
|
+
OPENQASM 3.0;
|
|
83
|
+
include "stdgates.inc";
|
|
84
|
+
qubit[2] q;
|
|
85
|
+
bit[2] c;
|
|
86
|
+
h q[0];
|
|
87
|
+
cx q[0], q[1];
|
|
88
|
+
c[0] = measure q[0];
|
|
89
|
+
c[1] = measure q[1];
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
resp = requests.post(
|
|
93
|
+
"https://dev.advaylabs.com/api/v1/run",
|
|
94
|
+
headers={"Authorization": f"Bearer {os.environ['ADVAY_API_KEY']}"},
|
|
95
|
+
json={"qasm": QASM, "options": {"shots": 1024}},
|
|
96
|
+
timeout=60,
|
|
97
|
+
).json()
|
|
98
|
+
|
|
99
|
+
print(resp["response"]["status"]) # "succeeded"
|
|
100
|
+
print(resp["response"]["ideal_result"]["counts"]) # {'00': 510, '11': 514}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
You'll need an API key from [the dashboard](https://dev.advaylabs.com/dashboard/api-keys).
|
|
104
|
+
|
|
105
|
+
### Run a circuit locally (offline)
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
from advay_platform import run_circuit, RunOptions
|
|
109
|
+
|
|
110
|
+
result = run_circuit(open("bell.qasm").read(), RunOptions(shots=1024))
|
|
111
|
+
print(result.ideal_result.counts)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The full emulator is bundled in the wheel — no network call required.
|
|
115
|
+
Useful for CI and quick iteration on small circuits.
|
|
116
|
+
|
|
117
|
+
### Typed request options
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
from advay_platform import RunOptions
|
|
121
|
+
|
|
122
|
+
opts = RunOptions(
|
|
123
|
+
shots=1024,
|
|
124
|
+
control_mode="hybrid", # "full" | "hybrid" | "reduced"
|
|
125
|
+
seed=42, # repeatable runs
|
|
126
|
+
execute=True, # set False to skip ideal execution
|
|
127
|
+
resource_estimate=True,
|
|
128
|
+
noise_projection=True,
|
|
129
|
+
)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Pass `opts.model_dump()` as the `options` field when calling the REST API,
|
|
133
|
+
or pass the `RunOptions` object directly to the local `run_circuit()`.
|
|
134
|
+
|
|
135
|
+
## What the response contains
|
|
136
|
+
|
|
137
|
+
Every `run_circuit()` call (and every `POST /api/v1/run`) returns four
|
|
138
|
+
chunks:
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
response
|
|
142
|
+
├── circuit_summary # qubits, depth, gate counts, Clifford check
|
|
143
|
+
├── ideal_result # noiseless simulator counts
|
|
144
|
+
├── resource_projection # surface-code physical qubits, code distance,
|
|
145
|
+
│ # T-factories, wall-clock — with factor-of-2 bounds
|
|
146
|
+
├── noise_projection # end-to-end success probability per control mode
|
|
147
|
+
└── provenance # run_id, platform version, twin version, tags
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
See the [response format reference](https://dev.advaylabs.com/docs/response-format)
|
|
151
|
+
for field-by-field details.
|
|
152
|
+
|
|
153
|
+
## CLI
|
|
154
|
+
|
|
155
|
+
The wheel installs an `advay-platform` command:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Platform info
|
|
159
|
+
advay-platform info
|
|
160
|
+
|
|
161
|
+
# Run a QASM file
|
|
162
|
+
advay-platform run bell.qasm --shots 1024 --output-format json
|
|
163
|
+
|
|
164
|
+
# Pipe QASM from stdin
|
|
165
|
+
cat bell.qasm | advay-platform run - --shots 256
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Supported gates
|
|
169
|
+
|
|
170
|
+
**Clifford** (fast, no qubit cap):
|
|
171
|
+
`i`, `x`, `y`, `z`, `h`, `s`, `sdg`, `sx`, `sxdg`, `cx`, `cy`, `cz`,
|
|
172
|
+
`swap`, `iswap`, `measure`, `reset`, `barrier`.
|
|
173
|
+
|
|
174
|
+
**Non-Clifford** (state-vector simulator, ≤22 qubits by default):
|
|
175
|
+
`t`, `tdg`, `rx`, `ry`, `rz`, `p`, `u`, `u1`, `u2`, `u3`, `ccx`, `ccz`,
|
|
176
|
+
`cswap`, `crx`, `cry`, `crz`, `cp`, `cu`, `rxx`, `ryy`, `rzz`, `mcx`, `mcz`.
|
|
177
|
+
|
|
178
|
+
Classical feedback (`if_else`, mid-circuit measurement, conditional
|
|
179
|
+
gates) is fully supported in both the local emulator and the cloud API.
|
|
180
|
+
|
|
181
|
+
## Compatibility
|
|
182
|
+
|
|
183
|
+
| Component | Version |
|
|
184
|
+
|-----------|---------|
|
|
185
|
+
| Python | 3.10, 3.11, 3.12 |
|
|
186
|
+
| OS | Linux, macOS, Windows (pure-Python wheel) |
|
|
187
|
+
| qiskit | ≥ 1.0 |
|
|
188
|
+
| OpenQASM | 3.0 |
|
|
189
|
+
|
|
190
|
+
## Free tier
|
|
191
|
+
|
|
192
|
+
- 30-day free trial on signup.
|
|
193
|
+
- 20 SDK calls per day on the free tier.
|
|
194
|
+
- Verified academic emails (`.edu`, `.ac.uk`, `.ac.in`, `.edu.au`, …) get
|
|
195
|
+
the free tier with no expiry and no daily cap.
|
|
196
|
+
|
|
197
|
+
Upgrade to the researcher or commercial tier via
|
|
198
|
+
[support@advaylabs.com](mailto:support@advaylabs.com).
|
|
199
|
+
|
|
200
|
+
## Documentation
|
|
201
|
+
|
|
202
|
+
- **Getting started**: <https://dev.advaylabs.com/docs/getting-started>
|
|
203
|
+
- **API reference**: <https://dev.advaylabs.com/docs/api-reference>
|
|
204
|
+
- **Examples**: <https://dev.advaylabs.com/docs/examples>
|
|
205
|
+
- **Troubleshooting**: <https://dev.advaylabs.com/docs/troubleshooting>
|
|
206
|
+
|
|
207
|
+
## Support
|
|
208
|
+
|
|
209
|
+
- Email: <support@advaylabs.com>
|
|
210
|
+
- Status: <https://dev.advaylabs.com/status>
|
|
211
|
+
|
|
212
|
+
## License
|
|
213
|
+
|
|
214
|
+
Proprietary. © 2026 Advay Labs Private Limited. All rights reserved.
|
|
215
|
+
|
|
216
|
+
See LICENSE for terms. Free for evaluation and research use under the
|
|
217
|
+
preview tier; commercial use requires a license agreement — contact
|
|
218
|
+
[support@advaylabs.com](mailto:support@advaylabs.com).
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# advay-platform
|
|
2
|
+
|
|
3
|
+
[](https://www.python.org/downloads/)
|
|
4
|
+
[](#license)
|
|
5
|
+
|
|
6
|
+
Python SDK for the **Advay Labs Quantum Platform**. Run OpenQASM 3
|
|
7
|
+
circuits against our hosted SQPU emulator, get realistic noise projections
|
|
8
|
+
and surface-code resource estimates, all from a single `pip install`.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install advay-platform
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## What you get
|
|
15
|
+
|
|
16
|
+
- **Cloud emulator access** — submit OpenQASM 3 circuits to
|
|
17
|
+
`dev.advaylabs.com`, get counts back.
|
|
18
|
+
- **Local emulator** — the same compute stack also runs offline on your
|
|
19
|
+
machine for unit tests and CI; no API key required for local use.
|
|
20
|
+
- **Resource projection** — surface-code physical-qubit cost, code distance,
|
|
21
|
+
T-factory count, and wall-clock for your circuit on the SQPU roadmap
|
|
22
|
+
device, with factor-of-2 honest bounds.
|
|
23
|
+
- **Noise projection** — end-to-end success probability under three
|
|
24
|
+
control modes (`full` / `hybrid` / `reduced`), calibrated to the digital
|
|
25
|
+
twin's gate-time ceilings.
|
|
26
|
+
- **OpenQASM 3 support** — classical control flow (`if_else`), mid-circuit
|
|
27
|
+
measurement, and proper feedforward simulation included.
|
|
28
|
+
- **Qiskit interop** — `qiskit.QuantumCircuit` objects are accepted as
|
|
29
|
+
input alongside QASM strings.
|
|
30
|
+
|
|
31
|
+
## Quick start
|
|
32
|
+
|
|
33
|
+
### Run a circuit against the cloud API
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import os
|
|
37
|
+
import requests
|
|
38
|
+
|
|
39
|
+
QASM = """
|
|
40
|
+
OPENQASM 3.0;
|
|
41
|
+
include "stdgates.inc";
|
|
42
|
+
qubit[2] q;
|
|
43
|
+
bit[2] c;
|
|
44
|
+
h q[0];
|
|
45
|
+
cx q[0], q[1];
|
|
46
|
+
c[0] = measure q[0];
|
|
47
|
+
c[1] = measure q[1];
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
resp = requests.post(
|
|
51
|
+
"https://dev.advaylabs.com/api/v1/run",
|
|
52
|
+
headers={"Authorization": f"Bearer {os.environ['ADVAY_API_KEY']}"},
|
|
53
|
+
json={"qasm": QASM, "options": {"shots": 1024}},
|
|
54
|
+
timeout=60,
|
|
55
|
+
).json()
|
|
56
|
+
|
|
57
|
+
print(resp["response"]["status"]) # "succeeded"
|
|
58
|
+
print(resp["response"]["ideal_result"]["counts"]) # {'00': 510, '11': 514}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
You'll need an API key from [the dashboard](https://dev.advaylabs.com/dashboard/api-keys).
|
|
62
|
+
|
|
63
|
+
### Run a circuit locally (offline)
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
from advay_platform import run_circuit, RunOptions
|
|
67
|
+
|
|
68
|
+
result = run_circuit(open("bell.qasm").read(), RunOptions(shots=1024))
|
|
69
|
+
print(result.ideal_result.counts)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The full emulator is bundled in the wheel — no network call required.
|
|
73
|
+
Useful for CI and quick iteration on small circuits.
|
|
74
|
+
|
|
75
|
+
### Typed request options
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
from advay_platform import RunOptions
|
|
79
|
+
|
|
80
|
+
opts = RunOptions(
|
|
81
|
+
shots=1024,
|
|
82
|
+
control_mode="hybrid", # "full" | "hybrid" | "reduced"
|
|
83
|
+
seed=42, # repeatable runs
|
|
84
|
+
execute=True, # set False to skip ideal execution
|
|
85
|
+
resource_estimate=True,
|
|
86
|
+
noise_projection=True,
|
|
87
|
+
)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Pass `opts.model_dump()` as the `options` field when calling the REST API,
|
|
91
|
+
or pass the `RunOptions` object directly to the local `run_circuit()`.
|
|
92
|
+
|
|
93
|
+
## What the response contains
|
|
94
|
+
|
|
95
|
+
Every `run_circuit()` call (and every `POST /api/v1/run`) returns four
|
|
96
|
+
chunks:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
response
|
|
100
|
+
├── circuit_summary # qubits, depth, gate counts, Clifford check
|
|
101
|
+
├── ideal_result # noiseless simulator counts
|
|
102
|
+
├── resource_projection # surface-code physical qubits, code distance,
|
|
103
|
+
│ # T-factories, wall-clock — with factor-of-2 bounds
|
|
104
|
+
├── noise_projection # end-to-end success probability per control mode
|
|
105
|
+
└── provenance # run_id, platform version, twin version, tags
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
See the [response format reference](https://dev.advaylabs.com/docs/response-format)
|
|
109
|
+
for field-by-field details.
|
|
110
|
+
|
|
111
|
+
## CLI
|
|
112
|
+
|
|
113
|
+
The wheel installs an `advay-platform` command:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# Platform info
|
|
117
|
+
advay-platform info
|
|
118
|
+
|
|
119
|
+
# Run a QASM file
|
|
120
|
+
advay-platform run bell.qasm --shots 1024 --output-format json
|
|
121
|
+
|
|
122
|
+
# Pipe QASM from stdin
|
|
123
|
+
cat bell.qasm | advay-platform run - --shots 256
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Supported gates
|
|
127
|
+
|
|
128
|
+
**Clifford** (fast, no qubit cap):
|
|
129
|
+
`i`, `x`, `y`, `z`, `h`, `s`, `sdg`, `sx`, `sxdg`, `cx`, `cy`, `cz`,
|
|
130
|
+
`swap`, `iswap`, `measure`, `reset`, `barrier`.
|
|
131
|
+
|
|
132
|
+
**Non-Clifford** (state-vector simulator, ≤22 qubits by default):
|
|
133
|
+
`t`, `tdg`, `rx`, `ry`, `rz`, `p`, `u`, `u1`, `u2`, `u3`, `ccx`, `ccz`,
|
|
134
|
+
`cswap`, `crx`, `cry`, `crz`, `cp`, `cu`, `rxx`, `ryy`, `rzz`, `mcx`, `mcz`.
|
|
135
|
+
|
|
136
|
+
Classical feedback (`if_else`, mid-circuit measurement, conditional
|
|
137
|
+
gates) is fully supported in both the local emulator and the cloud API.
|
|
138
|
+
|
|
139
|
+
## Compatibility
|
|
140
|
+
|
|
141
|
+
| Component | Version |
|
|
142
|
+
|-----------|---------|
|
|
143
|
+
| Python | 3.10, 3.11, 3.12 |
|
|
144
|
+
| OS | Linux, macOS, Windows (pure-Python wheel) |
|
|
145
|
+
| qiskit | ≥ 1.0 |
|
|
146
|
+
| OpenQASM | 3.0 |
|
|
147
|
+
|
|
148
|
+
## Free tier
|
|
149
|
+
|
|
150
|
+
- 30-day free trial on signup.
|
|
151
|
+
- 20 SDK calls per day on the free tier.
|
|
152
|
+
- Verified academic emails (`.edu`, `.ac.uk`, `.ac.in`, `.edu.au`, …) get
|
|
153
|
+
the free tier with no expiry and no daily cap.
|
|
154
|
+
|
|
155
|
+
Upgrade to the researcher or commercial tier via
|
|
156
|
+
[support@advaylabs.com](mailto:support@advaylabs.com).
|
|
157
|
+
|
|
158
|
+
## Documentation
|
|
159
|
+
|
|
160
|
+
- **Getting started**: <https://dev.advaylabs.com/docs/getting-started>
|
|
161
|
+
- **API reference**: <https://dev.advaylabs.com/docs/api-reference>
|
|
162
|
+
- **Examples**: <https://dev.advaylabs.com/docs/examples>
|
|
163
|
+
- **Troubleshooting**: <https://dev.advaylabs.com/docs/troubleshooting>
|
|
164
|
+
|
|
165
|
+
## Support
|
|
166
|
+
|
|
167
|
+
- Email: <support@advaylabs.com>
|
|
168
|
+
- Status: <https://dev.advaylabs.com/status>
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
Proprietary. © 2026 Advay Labs Private Limited. All rights reserved.
|
|
173
|
+
|
|
174
|
+
See LICENSE for terms. Free for evaluation and research use under the
|
|
175
|
+
preview tier; commercial use requires a license agreement — contact
|
|
176
|
+
[support@advaylabs.com](mailto:support@advaylabs.com).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Advay Labs Platform — customer-facing circuit ingestion and SQPU projection.
|
|
2
|
+
|
|
3
|
+
The primary entry point is `run_circuit`. See README for the API contract.
|
|
4
|
+
|
|
5
|
+
Example:
|
|
6
|
+
from advay_platform import run_circuit, RunOptions
|
|
7
|
+
from qiskit import QuantumCircuit
|
|
8
|
+
|
|
9
|
+
qc = QuantumCircuit(2, 2)
|
|
10
|
+
qc.h(0); qc.cx(0, 1); qc.measure([0, 1], [0, 1])
|
|
11
|
+
|
|
12
|
+
response = run_circuit(qc, RunOptions(shots=1024))
|
|
13
|
+
print(response.to_json())
|
|
14
|
+
|
|
15
|
+
For the digital twin connection:
|
|
16
|
+
from advay_platform import is_live_mode, twin_info
|
|
17
|
+
print(is_live_mode()) # True if sqpu_digital_twin is importable
|
|
18
|
+
print(twin_info()) # full twin connection descriptor
|
|
19
|
+
|
|
20
|
+
CLI: `advay-platform info` or `advay-platform run <circuit.qasm>`.
|
|
21
|
+
"""
|
|
22
|
+
from .api import run_circuit, get_platform_info, PLATFORM_VERSION
|
|
23
|
+
from .schemas import (
|
|
24
|
+
RunOptions,
|
|
25
|
+
Response,
|
|
26
|
+
CircuitSummary,
|
|
27
|
+
IdealResult,
|
|
28
|
+
ResourceProjection,
|
|
29
|
+
NoiseProjection,
|
|
30
|
+
Provenance,
|
|
31
|
+
Bound,
|
|
32
|
+
)
|
|
33
|
+
from .ingestion import CircuitIR, Operation, ingest
|
|
34
|
+
from .twin_bridge import (
|
|
35
|
+
load_profile,
|
|
36
|
+
twin_version,
|
|
37
|
+
twin_info,
|
|
38
|
+
is_live_mode,
|
|
39
|
+
force_refresh as refresh_twin_detection,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
__version__ = PLATFORM_VERSION
|
|
43
|
+
|
|
44
|
+
__all__ = [
|
|
45
|
+
# Public API
|
|
46
|
+
"run_circuit",
|
|
47
|
+
"get_platform_info",
|
|
48
|
+
# Schemas
|
|
49
|
+
"RunOptions",
|
|
50
|
+
"Response",
|
|
51
|
+
"CircuitSummary",
|
|
52
|
+
"IdealResult",
|
|
53
|
+
"ResourceProjection",
|
|
54
|
+
"NoiseProjection",
|
|
55
|
+
"Provenance",
|
|
56
|
+
"Bound",
|
|
57
|
+
# IR
|
|
58
|
+
"CircuitIR",
|
|
59
|
+
"Operation",
|
|
60
|
+
"ingest",
|
|
61
|
+
# Twin connection
|
|
62
|
+
"load_profile",
|
|
63
|
+
"twin_version",
|
|
64
|
+
"twin_info",
|
|
65
|
+
"is_live_mode",
|
|
66
|
+
"refresh_twin_detection",
|
|
67
|
+
# Meta
|
|
68
|
+
"PLATFORM_VERSION",
|
|
69
|
+
"__version__",
|
|
70
|
+
]
|