libqasm 0.6.5__cp310-cp310-win_amd64.whl → 0.6.7__cp310-cp310-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,127 @@
1
+ Metadata-Version: 2.1
2
+ Name: libqasm
3
+ Version: 0.6.7
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: Topic :: Scientific/Engineering
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE.md
19
+ Requires-Dist: numpy
20
+
21
+ # libQASM
22
+
23
+ [![CI](https://github.com/QuTech-Delft/libqasm/workflows/Test/badge.svg)](https://github.com/qutech-delft/libqasm/actions)
24
+ [![Conan Center](https://img.shields.io/conan/v/libqasm)](https://conan.io/center/recipes/libqasm)
25
+ [![PyPI](https://badgen.net/pypi/v/libqasm)](https://pypi.org/project/libqasm/)
26
+ ![OS](https://img.shields.io/badge/os-emscripten%20%7C%20linux%20%7C%20macos%20%7C%20windows-blue?style=flat-square)
27
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
28
+
29
+ libQASM is a library to parse programs written in the cQASM quantum programming language, developed by QuTech.
30
+ At the moment, libQASM only supports cQASM v3.0 programs.
31
+
32
+ It performs lexical, syntactic, and semantic analysis of an input program received via a file or a string.
33
+ It produces one of the following results:
34
+
35
+ - A syntactic or semantic AST (Abstract Syntax Tree) object. Depending on if we are parsing or analysing.
36
+ - A list of parsing or analysing errors. In case the input program was malformed.
37
+ - A JSON representation of either the AST or the list of errors.
38
+
39
+ It can be used within:
40
+
41
+ - C++ projects (as a [Conan package](https://conan.io/center/recipes/libqasm)).
42
+ - Python projects (as a [Python package](https://pypi.org/project/libqasm/)).
43
+ - Emscripten projects (via a Typescript frontend).
44
+
45
+ Check out [QX simulator](https://github.com/QuTech-Delft/qx-simulator)
46
+ and [OpenSquirrel](https://github.com/QuTech-Delft/OpenSquirrel) compiler
47
+ for an example of use in a C++ and a Python project, respectively.
48
+
49
+ ## Getting started
50
+
51
+ Given a cQASM program `example.cq`.
52
+
53
+ ```cQASM
54
+ version 3.0
55
+
56
+ qubit[2] q
57
+ bit[2] b
58
+
59
+ H q[0]
60
+ CNOT q[0], q[1]
61
+ b = measure q
62
+ ```
63
+
64
+ We can parse or analyze this circuit, using libQASM through the following programming language:
65
+
66
+ ### C++
67
+
68
+ ```cpp
69
+ #include "v3/cqasm-py.hpp"
70
+
71
+ int main() {
72
+ auto parse_result = V3xAnalyzer::parse_file("example.cq");
73
+
74
+ auto analyzer = V3xAnalyzer();
75
+ auto analysis_result = analyzer.analyze_file("example.cq");
76
+ }
77
+ ```
78
+
79
+
80
+ ### Emscripten
81
+
82
+ The emscripten API only allows to input a cQASM program as a string.
83
+
84
+ ```typescript
85
+ import { default as wrapper } from 'cqasm_emscripten.mjs';
86
+
87
+ wrapper().then(function(result: any) {
88
+ let analyzer = new result["EmscriptenWrapper"]()
89
+ let program = `
90
+ version 3
91
+ qubit[2] q
92
+ bit[2] b
93
+ H q[0]
94
+ CNOT q[0], q[1]
95
+ b = measure q
96
+ `
97
+ let output = analyzer.parse_string_to_json(program)
98
+ analyzer.delete()
99
+ }).catch((error: any) => {
100
+ console.error("unhandledRejection", error, "\n");
101
+ });
102
+ ```
103
+
104
+ ### Python
105
+
106
+ ```python
107
+ from libqasm import Analyzer
108
+
109
+ if __name__ == "__main__":
110
+ parse_result = Analyzer.parse_file('example.cq')
111
+
112
+ analyzer = Analyzer()
113
+ analysis_result = analyzer.analyze_file('example.cq')
114
+ ```
115
+
116
+ ## Documentation
117
+
118
+ The [libQASM documentation](https://QuTech-Delft.github.io/libqasm/) is hosted through GitHub Pages.
119
+
120
+ ## License
121
+
122
+ libQASM is licensed under the Apache License, Version 2.0.
123
+ See [LICENSE](https://github.com/QuTech-Delft/libqasm/blob/master/LICENSE.md) for the full license text.
124
+
125
+ ## Authors
126
+
127
+ 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=7TEhDqL-4KxL_9nUkjOWYvgo9nOOY1YiDusYP2Bf8tU,4890
3
+ cqasm/v3x/ast.py,sha256=Zng-B1PS3WLQ21WFnlTmlQli9Fe4SWh5XBaILtfzzkg,431665
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=wN9awUdn76sNp1WlzV5P4R4Z54r-W0JC4D-xaDzQec4,88679
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.cp310-win_amd64.pyd,sha256=CQoONiPhZ3DTme8gaqreeF8QCEViMRl0IWfp1rAu-9Y,2301440
11
+ libqasm/libqasm.py,sha256=s0RWrMGoy0vl-lES8ff61BLCa-Rv0FRlQFnaw40u7T0,31677
12
+ libqasm-0.6.7.dist-info/LICENSE.md,sha256=395F6Sje50f5Too7yWFAoS_owYO4aOtjbMeQd_go_sk,579
13
+ libqasm-0.6.7.dist-info/METADATA,sha256=2jnb_TDMrtMvYqgg6fTZXVIkmQFFn-j8A6wIRGb_E0A,4094
14
+ libqasm-0.6.7.dist-info/WHEEL,sha256=TYUDfHBZQod294as1x7ro928Hk-WSGPsPZPVYrwc_bI,101
15
+ libqasm-0.6.7.dist-info/top_level.txt,sha256=iZ8PSLyg3lJwvSUCvWE8VCJGU-nmQY2YIrbMe7M7kLw,14
16
+ libqasm-0.6.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (73.0.1)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-win_amd64
5
5
 
@@ -0,0 +1,2 @@
1
+ cqasm
2
+ libqasm
Binary file