Quantar 0.1.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.
Files changed (42) hide show
  1. quantar-0.1.0/.gitignore +226 -0
  2. quantar-0.1.0/Grammar/python.gram +1577 -0
  3. quantar-0.1.0/Grammar/python_clean.gram +873 -0
  4. quantar-0.1.0/LICENSE +201 -0
  5. quantar-0.1.0/PKG-INFO +399 -0
  6. quantar-0.1.0/README.md +176 -0
  7. quantar-0.1.0/hatch_build.py +66 -0
  8. quantar-0.1.0/pyproject.toml +53 -0
  9. quantar-0.1.0/src/lang_systems/__init__.py +38 -0
  10. quantar-0.1.0/src/lang_systems/ast_builder.py +272 -0
  11. quantar-0.1.0/src/lang_systems/lsp/__init__.py +1 -0
  12. quantar-0.1.0/src/lang_systems/lsp/__main__.py +3 -0
  13. quantar-0.1.0/src/lang_systems/lsp/server.py +247 -0
  14. quantar-0.1.0/src/lang_systems/operators.py +367 -0
  15. quantar-0.1.0/src/lang_systems/pegen_gram_gen.py +159 -0
  16. quantar-0.1.0/src/lang_systems/quantar.gram +27 -0
  17. quantar-0.1.0/src/lang_systems/quantar.py +63 -0
  18. quantar-0.1.0/src/lang_systems/quantar_parser.py +11729 -0
  19. quantar-0.1.0/src/lang_systems/quantar_tokens.py +87 -0
  20. quantar-0.1.0/src/lang_systems/runner.py +55 -0
  21. quantar-0.1.0/src/lang_systems/runtime.py +63 -0
  22. quantar-0.1.0/src/lang_systems/visitors.py +30 -0
  23. quantar-0.1.0/src/quantum/__init__.py +60 -0
  24. quantar-0.1.0/src/quantum/basic_funcs.py +262 -0
  25. quantar-0.1.0/src/quantum/composites.py +33 -0
  26. quantar-0.1.0/src/quantum/gate_abs.py +127 -0
  27. quantar-0.1.0/src/quantum/gate_matrix.py +171 -0
  28. quantar-0.1.0/src/quantum/kernels.py +234 -0
  29. quantar-0.1.0/src/quantum/parse_qasm.py +393 -0
  30. quantar-0.1.0/src/quantum/qasm.py +89 -0
  31. quantar-0.1.0/src/quantum/qubit_abs.py +682 -0
  32. quantar-0.1.0/src/stl/__init__.py +1 -0
  33. quantar-0.1.0/src/stl/physics_algs/__init__.py +57 -0
  34. quantar-0.1.0/src/stl/physics_algs/duals_and_coords.py +482 -0
  35. quantar-0.1.0/src/stl/physics_algs/units.py +923 -0
  36. quantar-0.1.0/src/stl/physics_algs/vector_fields.py +270 -0
  37. quantar-0.1.0/src/stl/quantum_algs/__init__.py +70 -0
  38. quantar-0.1.0/src/stl/quantum_algs/fast_factor.py +195 -0
  39. quantar-0.1.0/src/stl/quantum_algs/grovers_alg.py +125 -0
  40. quantar-0.1.0/src/stl/quantum_algs/quantum_optim.py +154 -0
  41. quantar-0.1.0/src/stl/quantum_algs/quantum_optim_hl.py +362 -0
  42. quantar-0.1.0/src/stl/quantum_algs/shors_alg.py +371 -0
@@ -0,0 +1,226 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # generated grammar
10
+ Grammar/quantar_merged.gram
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py.cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+
57
+ # Translations
58
+ *.mo
59
+ *.pot
60
+
61
+ # Django stuff:
62
+ *.log
63
+ local_settings.py
64
+ db.sqlite3
65
+ db.sqlite3-journal
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ .pybuilder/
79
+ target/
80
+
81
+ # Jupyter Notebook
82
+ .ipynb_checkpoints
83
+
84
+ # IPython
85
+ profile_default/
86
+ ipython_config.py
87
+
88
+ # pyenv
89
+ # For a library or package, you might want to ignore these files since the code is
90
+ # intended to run in multiple environments; otherwise, check them in:
91
+ # .python-version
92
+
93
+ # pipenv
94
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
96
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
97
+ # install all needed dependencies.
98
+ # Pipfile.lock
99
+
100
+ # UV
101
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
103
+ # commonly ignored for libraries.
104
+ uv.lock
105
+
106
+ # poetry
107
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
109
+ # commonly ignored for libraries.
110
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111
+ # poetry.lock
112
+ # poetry.toml
113
+
114
+ # pdm
115
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
116
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
117
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
118
+ # pdm.lock
119
+ # pdm.toml
120
+ .pdm-python
121
+ .pdm-build/
122
+
123
+ # pixi
124
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
125
+ # pixi.lock
126
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
127
+ # in the .venv directory. It is recommended not to include this directory in version control.
128
+ .pixi
129
+
130
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
131
+ __pypackages__/
132
+
133
+ # Celery stuff
134
+ celerybeat-schedule
135
+ celerybeat.pid
136
+
137
+ # Redis
138
+ *.rdb
139
+ *.aof
140
+ *.pid
141
+
142
+ # RabbitMQ
143
+ mnesia/
144
+ rabbitmq/
145
+ rabbitmq-data/
146
+
147
+ # ActiveMQ
148
+ activemq-data/
149
+
150
+ # SageMath parsed files
151
+ *.sage.py
152
+
153
+ # Environments
154
+ .env
155
+ .envrc
156
+ .venv
157
+ env/
158
+ venv/
159
+ ENV/
160
+ env.bak/
161
+ venv.bak/
162
+
163
+ # Spyder project settings
164
+ .spyderproject
165
+ .spyproject
166
+
167
+ # Rope project settings
168
+ .ropeproject
169
+
170
+ # mkdocs documentation
171
+ /site
172
+
173
+ # mypy
174
+ .mypy_cache/
175
+ .dmypy.json
176
+ dmypy.json
177
+
178
+ # Pyre type checker
179
+ .pyre/
180
+
181
+ # pytype static type analyzer
182
+ .pytype/
183
+
184
+ # Cython debug symbols
185
+ cython_debug/
186
+
187
+ # PyCharm
188
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
189
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
190
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
191
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
192
+ # .idea/
193
+
194
+ # Abstra
195
+ # Abstra is an AI-powered process automation framework.
196
+ # Ignore directories containing user credentials, local state, and settings.
197
+ # Learn more at https://abstra.io/docs
198
+ .abstra/
199
+
200
+ # Visual Studio Code
201
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
202
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
203
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
204
+ # you could uncomment the following to ignore the entire vscode folder
205
+ # .vscode/
206
+ # Temporary file for partial code execution
207
+ tempCodeRunnerFile.py
208
+
209
+ # VS Code extension build output
210
+ editors/vscode/node_modules/
211
+ editors/vscode/out/
212
+ editors/vscode/*.vsix
213
+
214
+ # Ruff stuff:
215
+ .ruff_cache/
216
+
217
+ # PyPI configuration file
218
+ .pypirc
219
+
220
+ # Marimo
221
+ marimo/_static/
222
+ marimo/_lsp/
223
+ __marimo__/
224
+
225
+ # Streamlit
226
+ .streamlit/secrets.toml