-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
1,302 additions
and
549 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
## Examples | ||
|
||
**Running examples without building Rasqal:** Install [poetry](https://python-poetry.org/) and do `poetry install` in `rasqal/examples` or pip install the dependencies listed in the .toml file. | ||
**Running examples without building Rasqal:** Install [poetry](https://python-poetry.org/) and do `poetry install` in `rasqal/examples` which will set up the venv for you. You can then run `run python examples.py` to just run the script or use your favourite IDE to debug. | ||
|
||
If you've already built Rasqal via its build script its venv will have all the dependencies necessary so re-use that. | ||
|
||
Note: all our examples are built using the old Q# compiler as Rasqal can exploit its fully interwoven classical LLVM instructions. | ||
|
||
**Examples.py** holds runnable examples | ||
|
||
|
||
runnable examples of many of Rasqals internal test projects showing how you set up and run things, including backend and argument definition. Shows the Q# that the QIR was generated from for each example, along with tertiary information. | ||
Source for most examples can be found in `src/tests/qsharp` and can be modified from there and re-built. | ||
**Examples.py** holds runnable examples of Rasqal including returned value, arguments, and custom backends. | ||
Source for most examples can be found in `src/tests/qsharp`. | ||
|
||
**Sandbox.py** runs the sandbox Q# project in `qsharp/src`. This uses the new Q# compiler so instruction set is limited. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[project] | ||
name = "rasqal_examples" | ||
[tool.poetry] | ||
name = "rasqal-examples" | ||
version = "0.0.1" | ||
requires-python = ">=3.10" | ||
description = "A hybrid quantum-classical analysis/solving runtime." | ||
description = "Code examples for Rasqal." | ||
authors = [] | ||
|
||
dependencies = [ | ||
"rasqal>=1.6" | ||
] | ||
[tool.poetry.dependencies] | ||
python = "~=3.10" | ||
rasqal = "~=0.1.6" | ||
qsharp = "~=1.9.0" | ||
|
||
[project.urls] | ||
Repository = "https://github.com/oqc-community/rasqal.git" | ||
Issues = "https://github.com/oqc-community/rasqal/issues" | ||
[[tool.poetry.source]] | ||
name = "PyPI" | ||
priority = "primary" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.