Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samples/python_interop/cirq_submission_to_azure.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"source": [
"## Prerequisites\n",
"\n",
"Ensure the `qdk` package (with Azure extra) and `cirq` are installed. If not, install dependencies below."
"Ensure the `qdk` package is installed with `azure` and `cirq` extras. If not, install dependencies below."
]
},
{
Expand All @@ -42,7 +42,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install \"qdk[azure]\" cirq"
"%pip install \"qdk[azure,cirq]\""
]
},
{
Expand Down
8 changes: 7 additions & 1 deletion source/qdk_package/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# qdk

The Quantum Development Kit (QDK) provides a single, cohesive Python entry point for compiling, simulating, and estimating resources for quantum programs (Q# and OpenQASM), with optional extras for visualization, cloud workflows, and Qiskit interoperability.
The Quantum Development Kit (QDK) provides a single, cohesive Python entry point for compiling, simulating, and estimating resources for quantum programs (Q# and OpenQASM), with optional extras for visualization, cloud workflows, and interoperability with Qiskit and Cirq.

## Install

Expand Down Expand Up @@ -28,6 +28,12 @@ For Qiskit integration, which exposes Qiskit interop utilities in the `qdk.qiski
pip install "qdk[qiskit]"
```

For Cirq integration, which exposes Cirq interop utilities in the `qdk.azure.cirq` submodule:

```bash
pip install "qdk[cirq]"
```

To easily install all the above extras:

```bash
Expand Down
3 changes: 3 additions & 0 deletions source/qdk_package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ dependencies = ["qsharp==0.0.0"]
jupyter = ["qsharp-widgets==0.0.0", "qsharp-jupyterlab==0.0.0"]
azure = ["azure-quantum>=3.5.0"]
qiskit = ["qiskit>=1.2.2,<3.0.0"]
cirq = ["cirq-core>=1.3.0,<=1.4.1", "cirq-ionq>=1.3.0,<=1.4.1"]
all = [
"qsharp-widgets==0.0.0",
"azure-quantum>=3.5.0",
"qiskit>=1.2.2,<3.0.0",
"cirq-core>=1.3.0,<=1.4.1",
"cirq-ionq>=1.3.0,<=1.4.1",
"qsharp-jupyterlab==0.0.0",
]

Expand Down
18 changes: 18 additions & 0 deletions source/qdk_package/src/qdk/azure/cirq.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""qdk.azure.cirq: re-export of azure.quantum.cirq symbols.

Requires installation: ``pip install \"qdk[azure,cirq]\"``.

Example:
from qdk.azure.cirq import <symbol>

"""

try:
from azure.quantum.cirq import * # pyright: ignore[reportWildcardImportFromLibrary]
except Exception as ex:
raise ImportError(
"qdk.azure.cirq requires the azure and cirq extras. Install with 'pip install \"qdk[azure,cirq]\"'."
) from ex
11 changes: 11 additions & 0 deletions source/qdk_package/src/qdk/azure/target/rigetti.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""Submodule re-export for azure.quantum.target.rigetti as qdk.azure.target.rigetti."""

try:
from azure.quantum.target.rigetti import * # pyright: ignore[reportWildcardImportFromLibrary]
except Exception as ex:
raise ImportError(
"qdk.azure requires the azure extra. Install with 'pip install qdk[azure]'."
) from ex
Loading