# Mini-compiler for Quantum Inspire's quantum chip(munk)s
```
,;;:;,
;;;;;
,:;;:; ,'=.
;:;:;' .=" ,'_\
':;:;,/ ,__:=@
';;:; =./)_
jgs `"=\_ )_"`
``'"`
```
## Installation
```shell
$ pip install opensquirrel
```
### Editable installation
To perform an editable install, run the following command in the root directory of `OpenSquirrel` with the `-e` flag:
```shell
$ pip install -e .
```
To install the developer specific dependencies, run the command:
```shell
$ pip install -e '.[dev]'
```
## Documentation
OpenSquirrel documentation is hosted through GitHub Pages [here](https://QuTech-Delft.github.io/OpenSquirrel/).
### MkDocs
The documentation is generated using MkDocs. For full documentation visit [mkdocs.org](https://www.mkdocs.org).
mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
In order to build `OpenSquirrel` documentation, run the following command in the root directory of `OpenSquirrel`:
```shell
mkdocs build
```
### Style guide
We use the [Google style guide](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for the docstring format.
## Tools
### Poetry
Project dependencies are specified in the `pyproject.toml` file in the root directory of the project.
Website: <https://python-poetry.org/>
Install dependencies:
```shell
$ poetry install
```
Start a Poetry shell:
```shell
$ poetry shell
```
Within the shell PyTest and MyPy can be run accordingly:
```shell
$ mypy -p opensquirrel
```
```shell
$ pytest
```
## Dev Container
### PyCharm
Open the Dev Container configuration file located at `.devcontainer/devcontainer.json` in the PyCharm editor.
On the left of the editor, in the gutter, you should see the Docker icon:
<img src="docs/_static/devcontainer_docker_icon.png" width="20" height="20"> or
<img src="docs/_static/devcontainer_docker_icon_2.png" width="20" height="20">.
Upon clicking on the Docker icon, the following options appear (depending on the PyCharm version used):
- **Create Dev Container and Mount Sources...**, and
- **Show Dev Containers**.
If no Dev Containers have been created previously,
select the former option and proceed to create a Dev Container,
otherwise select the latter option to list the existing Dev Containers.
#### Create Dev Container and Mount Sources...
1. If you select **Create Dev Container and Mount Sources...**,
a separate window (*Building Dev Container*) will open and
a Dev Container will be built according to the specification in the `devcontainer/Dockerfile`.
2. The system dependencies are installed, a user account (*i.e.* **pydev**) is created,
and additional Python packages and Poetry are installed.
3. Upon completion the status messages should read something like:
*'Dev Container' has been deployed successfully* and *Environment is successfully prepared…*
4. Proceed by choosing your PyCharm installation, from the dropdown menu that appears at the top,
and click **Continue**.
5. A connection is established with the remote host and a new PyCharm window is opened.
6. Skip the following subsection and proceed below.
#### Show Dev Containers
1. If you select **Show Dev Containers**,
a separate window appears where the existing (previously created) Dev Containers are listed by their name and status
(*i.e.* either running or idle). In general, all docker containers (including idle ones) can be listed using:
```bash
docker ps -a
```
2. If they are idle they can be started by clicking on their name or on the play button.
An idle (Dev) Container can also be started from the terminal:
```bash
docker container start <container-name>
```
A running Dev Container can be accessed from the terminal, accordingly:
```bash
docker exec -it <container-name> bash
```
The `-i` flag stands for interactive session and the `-t` stands for running it in the terminal.
Once you have accessed the Dev Container, change to the user **pydev**:
```bash
sudo -u pydev -i
```
And make sure to navigate to the project root folder:
```bash
cd /IdeaProjects/OpenSquirrel/
```
Continue to install the dependencies (if not done already in this container; otherwise you may skip this step):
```bash
poetry install
```
and initiating the Poetry shell environment:
```bash
poetry shell
```
Raw data
{
"_id": null,
"home_page": "https://github.com/QuTech-Delft/OpenSquirrel",
"name": "opensquirrel",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "",
"keywords": "quantum,circuits,compilation",
"author": "Pablo Le Henaff",
"author_email": "p.lehenaff@tudelft.nl",
"download_url": "https://files.pythonhosted.org/packages/71/2d/019f1a90e761926c4dd5bf8eb32d6a5b2f6f53960fac7f01543709853342/opensquirrel-0.0.8.tar.gz",
"platform": null,
"description": "# Mini-compiler for Quantum Inspire's quantum chip(munk)s\n\n```\n ,;;:;,\n ;;;;;\n ,:;;:; ,'=.\n ;:;:;' .=\" ,'_\\\n ':;:;,/ ,__:=@\n ';;:; =./)_\n jgs `\"=\\_ )_\"`\n ``'\"`\n```\n\n## Installation\n\n```shell\n$ pip install opensquirrel\n```\n\n### Editable installation\n\nTo perform an editable install, run the following command in the root directory of `OpenSquirrel` with the `-e` flag:\n\n```shell\n$ pip install -e .\n```\n\nTo install the developer specific dependencies, run the command:\n\n```shell\n$ pip install -e '.[dev]'\n```\n\n## Documentation\n\nOpenSquirrel documentation is hosted through GitHub Pages [here](https://QuTech-Delft.github.io/OpenSquirrel/).\n\n### MkDocs\n\nThe documentation is generated using MkDocs. For full documentation visit [mkdocs.org](https://www.mkdocs.org).\n\n mkdocs.yml # The configuration file.\n docs/\n index.md # The documentation homepage.\n ... # Other markdown pages, images and other files.\n\nIn order to build `OpenSquirrel` documentation, run the following command in the root directory of `OpenSquirrel`:\n\n```shell\nmkdocs build\n```\n\n### Style guide\n\nWe use the [Google style guide](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for the docstring format.\n\n## Tools\n\n### Poetry\n\nProject dependencies are specified in the `pyproject.toml` file in the root directory of the project.\n\nWebsite: <https://python-poetry.org/>\n\nInstall dependencies:\n\n```shell\n$ poetry install\n```\n\nStart a Poetry shell:\n\n```shell\n$ poetry shell\n```\n\nWithin the shell PyTest and MyPy can be run accordingly:\n\n```shell\n$ mypy -p opensquirrel\n```\n\n```shell\n$ pytest\n```\n\n## Dev Container\n\n### PyCharm\n\nOpen the Dev Container configuration file located at `.devcontainer/devcontainer.json` in the PyCharm editor.\n\nOn the left of the editor, in the gutter, you should see the Docker icon:\n<img src=\"docs/_static/devcontainer_docker_icon.png\" width=\"20\" height=\"20\"> or\n<img src=\"docs/_static/devcontainer_docker_icon_2.png\" width=\"20\" height=\"20\">.\n\nUpon clicking on the Docker icon, the following options appear (depending on the PyCharm version used):\n- **Create Dev Container and Mount Sources...**, and\n- **Show Dev Containers**.\n\nIf no Dev Containers have been created previously,\nselect the former option and proceed to create a Dev Container,\notherwise select the latter option to list the existing Dev Containers.\n\n#### Create Dev Container and Mount Sources...\n\n1. If you select **Create Dev Container and Mount Sources...**,\n a separate window (*Building Dev Container*) will open and\n a Dev Container will be built according to the specification in the `devcontainer/Dockerfile`.\n2. The system dependencies are installed, a user account (*i.e.* **pydev**) is created,\n and additional Python packages and Poetry are installed.\n3. Upon completion the status messages should read something like:\n *'Dev Container' has been deployed successfully* and *Environment is successfully prepared\u2026*\n4. Proceed by choosing your PyCharm installation, from the dropdown menu that appears at the top,\n and click **Continue**.\n5. A connection is established with the remote host and a new PyCharm window is opened.\n6. Skip the following subsection and proceed below.\n\n#### Show Dev Containers\n\n1. If you select **Show Dev Containers**,\n a separate window appears where the existing (previously created) Dev Containers are listed by their name and status\n (*i.e.* either running or idle). In general, all docker containers (including idle ones) can be listed using:\n\n ```bash\n docker ps -a\n ```\n\n2. If they are idle they can be started by clicking on their name or on the play button.\n An idle (Dev) Container can also be started from the terminal:\n\n ```bash\n docker container start <container-name>\n ```\n\n A running Dev Container can be accessed from the terminal, accordingly:\n\n ```bash\n docker exec -it <container-name> bash\n ```\n\n The `-i` flag stands for interactive session and the `-t` stands for running it in the terminal.\n\nOnce you have accessed the Dev Container, change to the user **pydev**:\n\n```bash\nsudo -u pydev -i\n```\n\nAnd make sure to navigate to the project root folder:\n\n```bash\ncd /IdeaProjects/OpenSquirrel/\n```\n\nContinue to install the dependencies (if not done already in this container; otherwise you may skip this step):\n\n```bash\npoetry install\n```\n\nand initiating the Poetry shell environment:\n\n```bash\npoetry shell\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A quantum circuit transformation and manipulation tool",
"version": "0.0.8",
"project_urls": {
"Homepage": "https://github.com/QuTech-Delft/OpenSquirrel",
"Repository": "https://github.com/QuTech-Delft/OpenSquirrel"
},
"split_keywords": [
"quantum",
"circuits",
"compilation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "215f709f9ac73c4d9f466e92e0c25ad648e03b7503ca6a6d05449c1e2d597275",
"md5": "56d2aaad20dbffd082d1766504a8d8dc",
"sha256": "a086e882c3c6cf63747217b8908d28e94761bee1489edc47985b6ba1fe1b3c78"
},
"downloads": -1,
"filename": "opensquirrel-0.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "56d2aaad20dbffd082d1766504a8d8dc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 48775,
"upload_time": "2024-02-28T11:13:00",
"upload_time_iso_8601": "2024-02-28T11:13:00.787743Z",
"url": "https://files.pythonhosted.org/packages/21/5f/709f9ac73c4d9f466e92e0c25ad648e03b7503ca6a6d05449c1e2d597275/opensquirrel-0.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "712d019f1a90e761926c4dd5bf8eb32d6a5b2f6f53960fac7f01543709853342",
"md5": "6d3bb3422b73bf6c3b90574c50a3f09d",
"sha256": "6089ae47891a5e55c1bda0a8dd149a3a8b8d9b8014bfe43fcc7caf061713990c"
},
"downloads": -1,
"filename": "opensquirrel-0.0.8.tar.gz",
"has_sig": false,
"md5_digest": "6d3bb3422b73bf6c3b90574c50a3f09d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 36340,
"upload_time": "2024-02-28T11:13:02",
"upload_time_iso_8601": "2024-02-28T11:13:02.575194Z",
"url": "https://files.pythonhosted.org/packages/71/2d/019f1a90e761926c4dd5bf8eb32d6a5b2f6f53960fac7f01543709853342/opensquirrel-0.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-28 11:13:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "QuTech-Delft",
"github_project": "OpenSquirrel",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "opensquirrel"
}