libqasm 1.2.1__cp313-cp313-win_amd64.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.
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.4
2
+ Name: libqasm
3
+ Version: 1.2.1
4
+ Summary: libqasm Python Package
5
+ Home-page: https://github.com/QuTech-Delft/libqasm
6
+ Author: QuTech, TU Delft
7
+ Classifier: License :: OSI Approved :: Apache Software License
8
+ Classifier: Operating System :: POSIX :: Linux
9
+ Classifier: Operating System :: MacOS
10
+ Classifier: Operating System :: Microsoft :: Windows
11
+ Classifier: Programming Language :: Python :: 3 :: Only
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE.md
20
+ Requires-Dist: numpy
21
+ Dynamic: author
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: license-file
27
+ Dynamic: requires-dist
28
+ Dynamic: summary
29
+
30
+ # libQASM
31
+
32
+ [![CI](https://github.com/QuTech-Delft/libqasm/workflows/Test/badge.svg)](https://github.com/qutech-delft/libqasm/actions)
33
+ [![Conan Center](https://img.shields.io/conan/v/libqasm)](https://conan.io/center/recipes/libqasm)
34
+ [![cpp-linter](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml)
35
+ [![PyPI](https://badgen.net/pypi/v/libqasm)](https://pypi.org/project/libqasm/)
36
+ ![OS](https://img.shields.io/badge/os-emscripten%20%7C%20linux%20%7C%20macos%20%7C%20windows-blue?style=flat-square)
37
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
38
+
39
+ libQASM is a library to parse cQASM programs, developed by QuTech.
40
+ At the moment, libQASM only supports cQASM v3.0 programs
41
+ (see [cQASM-spec](https://qutech-delft.github.io/cQASM-spec/latest/) for the language specification).
42
+
43
+ It performs lexical, syntactic, and semantic analysis of an input program received via a file or a string.
44
+ It produces one of the following results:
45
+
46
+ - A syntactic or semantic AST (Abstract Syntax Tree) object. Depending on if we are parsing or analysing.
47
+ - A list of parsing or analysing errors. In case the input program was malformed.
48
+ - A JSON representation of either the AST or the list of errors.
49
+
50
+ It can be used from:
51
+
52
+ - C++ projects (as a [Conan package](https://conan.io/center/recipes/libqasm)).
53
+ - Python projects (as a [Python package](https://pypi.org/project/libqasm/)).
54
+ - Emscripten projects (via a Typescript frontend).
55
+
56
+ Check out [QX simulator](https://github.com/QuTech-Delft/qx-simulator)
57
+ and [OpenSquirrel](https://github.com/QuTech-Delft/OpenSquirrel) compiler
58
+ for an example of use in a C++ and a Python project, respectively.
59
+
60
+ ## Getting started
61
+
62
+ Given a cQASM program `example.cq`.
63
+
64
+ ```cQASM
65
+ version 3.0
66
+
67
+ qubit[2] q
68
+ bit[2] b
69
+
70
+ H q[0]
71
+ CNOT q[0], q[1]
72
+ b = measure q
73
+ ```
74
+
75
+ We can parse or analyze this circuit using libQASM through the following programming language:
76
+
77
+ ### C++
78
+
79
+ ```cpp
80
+ #include "libqasm/v3x/cqasm-python.hpp"
81
+
82
+ int main() {
83
+ auto parse_result = V3xAnalyzer::parse_file("example.cq");
84
+
85
+ auto analyzer = V3xAnalyzer();
86
+ auto analysis_result = analyzer.analyze_file("example.cq");
87
+ }
88
+ ```
89
+
90
+ ### Emscripten
91
+
92
+ The emscripten API only allows to input a cQASM program as a string.
93
+
94
+ ```typescript
95
+ import { default as wrapper } from 'cqasm_emscripten.mjs';
96
+
97
+ wrapper().then(function(result: any) {
98
+ let analyzer = new result["EmscriptenWrapper"]()
99
+ let program = `
100
+ version 3
101
+ qubit[2] q
102
+ bit[2] b
103
+ H q[0]
104
+ CNOT q[0], q[1]
105
+ b = measure q
106
+ `
107
+ let output = analyzer.parse_string_to_json(program)
108
+ analyzer.delete()
109
+ }).catch((error: any) => {
110
+ console.error("unhandledRejection", error, "\n");
111
+ });
112
+ ```
113
+
114
+ ### Python
115
+
116
+ ```python
117
+ from libqasm import Analyzer
118
+
119
+ if __name__ == "__main__":
120
+ parse_result = Analyzer.parse_file('example.cq')
121
+
122
+ analyzer = Analyzer()
123
+ analysis_result = analyzer.analyze_file('example.cq')
124
+ ```
125
+
126
+ ## Documentation
127
+
128
+ The [libQASM documentation](https://QuTech-Delft.github.io/libqasm/) is hosted through GitHub Pages.
129
+
130
+ ## License
131
+
132
+ libQASM is licensed under the Apache License, Version 2.0.
133
+ See [LICENSE](https://github.com/QuTech-Delft/libqasm/blob/master/LICENSE.md) for the full license text.
134
+
135
+ ## Authors
136
+
137
+ Quantum Inspire: [support@quantum-inspire.com](mailto:"support@quantum-inspire.com")
@@ -0,0 +1,16 @@
1
+ cqasm/__init__.py,sha256=_6Yl-eMBve0mGQA-aiFg4qvQ7GUCV5eGvIcoRf4mEPw,3
2
+ cqasm/v3x/__init__.py,sha256=s1r1kbfl9iGONOuB7V2HQ6llIbQ0CWiiGVytzjIRPng,4888
3
+ cqasm/v3x/ast.py,sha256=Mvrxb8TnQAx3t0uXS-Om2Rv5NXbbg_fcI9ngFQpAF1A,445478
4
+ cqasm/v3x/instruction.py,sha256=VAOqFpCH94CrutgMUZnQq8JXFIq_-C-ndTOjHLsg6_8,1219
5
+ cqasm/v3x/primitives.py,sha256=lkxg0gHMFba-O803cOh0QqOANFHsZDK0iHvIluFz-qI,2110
6
+ cqasm/v3x/semantic.py,sha256=BBUhlvPxdQK8LcTwg1iffIRltNfEZDKFJWhSuUpM3qU,131769
7
+ cqasm/v3x/types.py,sha256=krT1WB5URT0F7lhKTLwYAs_UtTCn9CZ7-M0WMGmxtU4,65070
8
+ cqasm/v3x/values.py,sha256=SfKw6zIjpMrXJggvN_QGPqsoZXDR7HwUjgUMOBnIzuo,63394
9
+ libqasm/__init__.py,sha256=X0G-HBFW9_uEcsaGROQ1nzxYfHzSuglOiXrpTpjF9_E,752
10
+ libqasm/_libqasm.cp313-win_amd64.pyd,sha256=fnYMVqfxdo9rAe_-43163ijhJUrTffx-p8LtLZSpo0Y,2397184
11
+ libqasm/libqasm.py,sha256=o33CFI-e4NcGT_9gWkSX7qUNqiWNahWYydNbShE4rhc,31701
12
+ libqasm-1.2.1.dist-info/licenses/LICENSE.md,sha256=395F6Sje50f5Too7yWFAoS_owYO4aOtjbMeQd_go_sk,579
13
+ libqasm-1.2.1.dist-info/METADATA,sha256=3-cHfQA4eEWNq3iH3AIonZvj1NWy6E2BYeFS3LfTZPw,4583
14
+ libqasm-1.2.1.dist-info/WHEEL,sha256=qV0EIPljj1XC_vuSatRWjn02nZIz3N1t8jsZz7HBr2U,101
15
+ libqasm-1.2.1.dist-info/top_level.txt,sha256=iZ8PSLyg3lJwvSUCvWE8VCJGU-nmQY2YIrbMe7M7kLw,14
16
+ libqasm-1.2.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp313-cp313-win_amd64
5
+
@@ -0,0 +1,13 @@
1
+ Copyright [2018] [QCA Lab, QuTech, TU Delft]
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
@@ -0,0 +1,2 @@
1
+ cqasm
2
+ libqasm