pytket-offline-display


Namepytket-offline-display JSON
Version 0.0.9 PyPI version JSON
download
home_pageNone
SummaryPython module for displaying pytket circuits when offline.
upload_time2024-10-16 10:02:37
maintainerNone
docs_urlNone
authorTKET development team
requires_python>=3.9
licenseApache 2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pytket-offline-display

This [pytket](https://github.com/CQCL/pytket) extension package provides offline circuit rendering functionality.
To use, first install the package with `pip`:

```shell
pip install pytket-offline-display
```

Then replace the usual `pytket.circuit.display` import with `pytket.extensions.offline_display`. For example:

```python
from pytket.extensions.offline_display import render_circuit_jupyter
from pytket import Circuit

circ = Circuit(2,2)
circ.H(0)
circ.CX(0,1)
circ.measure_all()

render_circuit_jupyter(circ)
```

If you want to control the default options, you can instead load a configurable instance.
(Note that this requires pytket >= 1.15)
```python
from pytket.extensions.offline_display import get_circuit_renderer

circuit_renderer = get_circuit_renderer()
circuit_renderer.set_render_options(zx_style=False)  # set the default options.
circuit_renderer.dark_mode = True  # You can also set them directly.

circuit_renderer.render_circuit_jupyter(circ)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pytket-offline-display",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "TKET development team",
    "author_email": "tket-support@cambridgequantum.com",
    "download_url": "https://files.pythonhosted.org/packages/d1/79/f634c4192a8fe522f2c015918b2df7f0e1ca40450b0f5f6e70e3dfdbc303/pytket_offline_display-0.0.9.tar.gz",
    "platform": null,
    "description": "# Pytket-offline-display\n\nThis [pytket](https://github.com/CQCL/pytket) extension package provides offline circuit rendering functionality.\nTo use, first install the package with `pip`:\n\n```shell\npip install pytket-offline-display\n```\n\nThen replace the usual `pytket.circuit.display` import with `pytket.extensions.offline_display`. For example:\n\n```python\nfrom pytket.extensions.offline_display import render_circuit_jupyter\nfrom pytket import Circuit\n\ncirc = Circuit(2,2)\ncirc.H(0)\ncirc.CX(0,1)\ncirc.measure_all()\n\nrender_circuit_jupyter(circ)\n```\n\nIf you want to control the default options, you can instead load a configurable instance.\n(Note that this requires pytket >= 1.15)\n```python\nfrom pytket.extensions.offline_display import get_circuit_renderer\n\ncircuit_renderer = get_circuit_renderer()\ncircuit_renderer.set_render_options(zx_style=False)  # set the default options.\ncircuit_renderer.dark_mode = True  # You can also set them directly.\n\ncircuit_renderer.render_circuit_jupyter(circ)\n```\n",
    "bugtrack_url": null,
    "license": "Apache 2",
    "summary": "Python module for displaying pytket circuits when offline.",
    "version": "0.0.9",
    "project_urls": {
        "Documentation": "https://cqcl.github.io/tket/pytket/api/index.html",
        "Source": "https://github.com/CQCL/pytket-offline-renderer",
        "Tracker": "https://github.com/CQCL/pytket-offline-renderer/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d6c565aab0ba59abce9b4b854bde89396b593c0b064b1ef8adc36e807cfe095f",
                "md5": "9392c182135699b0b2b9eb38a6b28080",
                "sha256": "cd7f3f4b39e550529d93b138ded924dbdb27724cead85482b13cc2cd4d296c4a"
            },
            "downloads": -1,
            "filename": "pytket_offline_display-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9392c182135699b0b2b9eb38a6b28080",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 202035,
            "upload_time": "2024-10-16T10:02:36",
            "upload_time_iso_8601": "2024-10-16T10:02:36.004240Z",
            "url": "https://files.pythonhosted.org/packages/d6/c5/65aab0ba59abce9b4b854bde89396b593c0b064b1ef8adc36e807cfe095f/pytket_offline_display-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d179f634c4192a8fe522f2c015918b2df7f0e1ca40450b0f5f6e70e3dfdbc303",
                "md5": "d6bdd00dd855241d47df2cffa571e0c5",
                "sha256": "62040cab7fd93a74f162c7ffcda25ad6255b72f2f57cf8567b3d539aabd8e22d"
            },
            "downloads": -1,
            "filename": "pytket_offline_display-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "d6bdd00dd855241d47df2cffa571e0c5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 40905,
            "upload_time": "2024-10-16T10:02:37",
            "upload_time_iso_8601": "2024-10-16T10:02:37.853586Z",
            "url": "https://files.pythonhosted.org/packages/d1/79/f634c4192a8fe522f2c015918b2df7f0e1ca40450b0f5f6e70e3dfdbc303/pytket_offline_display-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 10:02:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CQCL",
    "github_project": "pytket-offline-renderer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytket-offline-display"
}
        
Elapsed time: 0.90361s