# Q# Language Support for Python
Q# is an open-source, high-level programming language for developing and running quantum algorithms.
The `qsharp` package for Python provides interoperability with the Q# interpreter, making it easy
to simulate Q# programs within Python.
## Installation
To install the Q# language package, run:
```bash
pip install qsharp
```
## Usage
First, import the `qsharp` module:
```python
import qsharp
```
Then, use the `%%qsharp` cell magic to run Q# directly in Jupyter notebook cells:
```qsharp
%%qsharp
import Std.Diagnostics.*;
@EntryPoint()
operation BellState() : Unit {
use qs = Qubit[2];
H(qs[0]);
CNOT(qs[0], qs[1]);
DumpMachine();
ResetAll(qs);
}
BellState()
```
## Telemetry
This library sends telemetry. Minimal anonymous data is collected to help measure feature usage and performance.
All telemetry events can be seen in the source file [telemetry_events.py](https://github.com/microsoft/qsharp/tree/main/pip/qsharp/telemetry_events.py).
To disable sending telemetry from this package, set the environment variable `QSHARP_PYTHON_TELEMETRY=none`
## Support
For more information about the Azure Quantum Development Kit, visit [https://aka.ms/AQ/Documentation](https://aka.ms/AQ/Documentation).
## Contributing
Q# welcomes your contributions! Visit the Q# GitHub repository at [https://github.com/microsoft/qsharp] to find out more about the project.
Raw data
{
"_id": null,
"home_page": "https://github.com/microsoft/qsharp",
"name": "qsharp",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Microsoft",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# Q# Language Support for Python\n\nQ# is an open-source, high-level programming language for developing and running quantum algorithms.\nThe `qsharp` package for Python provides interoperability with the Q# interpreter, making it easy\nto simulate Q# programs within Python.\n\n## Installation\n\nTo install the Q# language package, run:\n\n```bash\npip install qsharp\n```\n\n## Usage\n\nFirst, import the `qsharp` module:\n\n```python\nimport qsharp\n```\n\nThen, use the `%%qsharp` cell magic to run Q# directly in Jupyter notebook cells:\n\n```qsharp\n%%qsharp\n\nimport Std.Diagnostics.*;\n\n@EntryPoint()\noperation BellState() : Unit {\n use qs = Qubit[2];\n H(qs[0]);\n CNOT(qs[0], qs[1]);\n DumpMachine();\n ResetAll(qs);\n}\n\nBellState()\n```\n\n## Telemetry\n\nThis library sends telemetry. Minimal anonymous data is collected to help measure feature usage and performance.\nAll telemetry events can be seen in the source file [telemetry_events.py](https://github.com/microsoft/qsharp/tree/main/pip/qsharp/telemetry_events.py).\n\nTo disable sending telemetry from this package, set the environment variable `QSHARP_PYTHON_TELEMETRY=none`\n\n## Support\n\nFor more information about the Azure Quantum Development Kit, visit [https://aka.ms/AQ/Documentation](https://aka.ms/AQ/Documentation).\n\n## Contributing\n\nQ# welcomes your contributions! Visit the Q# GitHub repository at [https://github.com/microsoft/qsharp] to find out more about the project.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Q# Python Bindings",
"version": "1.14.0",
"project_urls": {
"Homepage": "https://github.com/microsoft/qsharp",
"Source Code": "https://github.com/microsoft/qsharp"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2469b541c3fb9b4b73599263d2294c5af84fb09bcabd3c44750b101c052416c4",
"md5": "1ae01fadfdcf5e77544fa4c4a478552b",
"sha256": "869177686d493ac2ebf0c3f04e33bb96e04d762c30e34bf9eb1a9c4556256a1c"
},
"downloads": -1,
"filename": "qsharp-1.14.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl",
"has_sig": false,
"md5_digest": "1ae01fadfdcf5e77544fa4c4a478552b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 4905802,
"upload_time": "2025-02-28T00:21:25",
"upload_time_iso_8601": "2025-02-28T00:21:25.916599Z",
"url": "https://files.pythonhosted.org/packages/24/69/b541c3fb9b4b73599263d2294c5af84fb09bcabd3c44750b101c052416c4/qsharp-1.14.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c8fc2af5f8b53194b45932f32def0167089d6c55ca88fac439373bbb432c95d2",
"md5": "ec2528ff81b84f811bb3f7660e87c592",
"sha256": "6f062ae9bcdff35523400abeb9d57593807fd8642356da245452a26414cf39e4"
},
"downloads": -1,
"filename": "qsharp-1.14.0-cp39-abi3-manylinux_2_35_aarch64.whl",
"has_sig": false,
"md5_digest": "ec2528ff81b84f811bb3f7660e87c592",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 2482999,
"upload_time": "2025-02-28T00:21:28",
"upload_time_iso_8601": "2025-02-28T00:21:28.869417Z",
"url": "https://files.pythonhosted.org/packages/c8/fc/2af5f8b53194b45932f32def0167089d6c55ca88fac439373bbb432c95d2/qsharp-1.14.0-cp39-abi3-manylinux_2_35_aarch64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8d356d3bbcb55fb5a92abf146d07b616a1c8ac69865a48ed787ed4514723989f",
"md5": "fc90675da9f5f2b208d2d7b8c04d9d1d",
"sha256": "53d85cf017e7bf85f926fe07df93561e8201f0bf4b5da77c6843921d2da964c2"
},
"downloads": -1,
"filename": "qsharp-1.14.0-cp39-abi3-manylinux_2_35_x86_64.whl",
"has_sig": false,
"md5_digest": "fc90675da9f5f2b208d2d7b8c04d9d1d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 2741442,
"upload_time": "2025-02-28T00:21:30",
"upload_time_iso_8601": "2025-02-28T00:21:30.689212Z",
"url": "https://files.pythonhosted.org/packages/8d/35/6d3bbcb55fb5a92abf146d07b616a1c8ac69865a48ed787ed4514723989f/qsharp-1.14.0-cp39-abi3-manylinux_2_35_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "775adb506b7eacdaa045232539f4a08832d3acee8342da441464c1d0bd719502",
"md5": "3ca2ec6439712183559acc152e929af6",
"sha256": "4c0aec0afc748e2e2b10614c995e7398541a552e41c62625c4f301641899a86b"
},
"downloads": -1,
"filename": "qsharp-1.14.0-cp39-abi3-win_amd64.whl",
"has_sig": false,
"md5_digest": "3ca2ec6439712183559acc152e929af6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 2715583,
"upload_time": "2025-02-28T00:21:32",
"upload_time_iso_8601": "2025-02-28T00:21:32.870196Z",
"url": "https://files.pythonhosted.org/packages/77/5a/db506b7eacdaa045232539f4a08832d3acee8342da441464c1d0bd719502/qsharp-1.14.0-cp39-abi3-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9798304c0846dd26f387b47c7648fc76bd71a8015b10df7627eb3094675dc073",
"md5": "c2ad7b864aafe8c6a5ec91ed75a0e130",
"sha256": "5fa07e3dcf0f0827640b5d61f7225e334a3a46efc35a4d47b8b7eec51e90cf5e"
},
"downloads": -1,
"filename": "qsharp-1.14.0-cp39-abi3-win_arm64.whl",
"has_sig": false,
"md5_digest": "c2ad7b864aafe8c6a5ec91ed75a0e130",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 2558163,
"upload_time": "2025-02-28T00:21:34",
"upload_time_iso_8601": "2025-02-28T00:21:34.305747Z",
"url": "https://files.pythonhosted.org/packages/97/98/304c0846dd26f387b47c7648fc76bd71a8015b10df7627eb3094675dc073/qsharp-1.14.0-cp39-abi3-win_arm64.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-28 00:21:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "microsoft",
"github_project": "qsharp",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "qsharp"
}