Metadata-Version: 2.2
Name: qdk-chemistry
Version: 2.2.0
Summary: Quantum Development Kit - Chemistry Library
Author-Email: QDK/Chemistry Development Team <qdk-chemistry@microsoft.com>
License: MIT License
         
         Copyright (c) 2025 - present Microsoft Corporation
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
         
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: C++
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Quantum Computing
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Education
Project-URL: Documentation, https://microsoft.github.io/qdk-chemistry
Project-URL: Homepage, https://github.com/microsoft/qdk-chemistry
Project-URL: Issues, https://github.com/microsoft/qdk-chemistry/issues
Project-URL: Repository, https://github.com/microsoft/qdk-chemistry
Project-URL: Source, https://github.com/microsoft/qdk-chemistry
Project-URL: Changelog, https://github.com/microsoft/qdk-chemistry/releases
Requires-Python: >=3.10
Requires-Dist: numpy<2.4.0,>=2.0.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: matplotlib>=3.10.0
Requires-Dist: argcomplete>=3.0.0
Requires-Dist: ruamel-yaml>=0.18.10
Requires-Dist: qdk[jupyter]>=1.30.0
Requires-Dist: pybind11-stubgen>=2.5.1
Requires-Dist: h5py>=3.0.0
Provides-Extra: all
Requires-Dist: qdk-chemistry[coverage,dev,discovery,docs,jupyter,networkx-extras,openfermion-extras,plugins,qiskit-extras,qre,test]; extra == "all"
Requires-Dist: qdk-chemistry[mcp]; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "all"
Provides-Extra: coverage
Requires-Dist: coverage; extra == "coverage"
Requires-Dist: pytest; extra == "coverage"
Requires-Dist: pytest-cov; extra == "coverage"
Requires-Dist: gcovr; extra == "coverage"
Provides-Extra: discovery
Requires-Dist: azure-ai-discovery==1.0.0; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "discovery"
Requires-Dist: azure-identity<2,>=1.19.0; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "discovery"
Requires-Dist: azure-storage-blob<13,>=12.25.0; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "discovery"
Provides-Extra: dev
Requires-Dist: coverage; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: nbclient; extra == "dev"
Requires-Dist: nbformat; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-env; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Requires-Dist: myst-parser; extra == "docs"
Requires-Dist: breathe; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
Requires-Dist: sphinx-inline-tabs; extra == "docs"
Requires-Dist: sphinxcontrib-napoleon; extra == "docs"
Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
Requires-Dist: sphinx_copybutton; extra == "docs"
Provides-Extra: jupyter
Requires-Dist: ipykernel>=6.0; extra == "jupyter"
Requires-Dist: pandas>=2.0.0; extra == "jupyter"
Requires-Dist: qdk[jupyter]>=1.30.0; extra == "jupyter"
Provides-Extra: mcp
Requires-Dist: mcp<3,>=2; extra == "mcp"
Provides-Extra: networkx-extras
Requires-Dist: networkx>=3.0; python_full_version != "3.14.1" and extra == "networkx-extras"
Provides-Extra: openfermion-extras
Requires-Dist: openfermion>=1.0.0; python_version < "3.14" and extra == "openfermion-extras"
Provides-Extra: plugins
Requires-Dist: geometric>=1.0; extra == "plugins"
Requires-Dist: pyscf<2.12.1,>=2.9.0; sys_platform != "win32" and extra == "plugins"
Provides-Extra: qiskit-extras
Requires-Dist: qiskit[qasm3-import]>=2.2.0; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "qiskit-extras"
Requires-Dist: qiskit-aer; (python_version < "3.14" or platform_machine != "aarch64" or sys_platform != "linux") and (sys_platform != "win32" or platform_machine != "ARM64") and extra == "qiskit-extras"
Requires-Dist: qiskit-ibm-runtime>=0.46.1; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "qiskit-extras"
Requires-Dist: qiskit-nature; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "qiskit-extras"
Requires-Dist: qiskit-qasm3-import; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "qiskit-extras"
Requires-Dist: pylatexenc==2.10; extra == "qiskit-extras"
Requires-Dist: requests>=2.33.0; extra == "qiskit-extras"
Provides-Extra: qre
Requires-Dist: qdk[jupyter,qre]>=1.30.0; extra == "qre"
Provides-Extra: test
Requires-Dist: qdk-chemistry[coverage,discovery,jupyter,networkx-extras,openfermion-extras,plugins,qiskit-extras,qre]; extra == "test"
Requires-Dist: qdk-chemistry[mcp]; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "test"
Requires-Dist: nbclient; extra == "test"
Requires-Dist: nbformat; extra == "test"
Requires-Dist: pennylane; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "test"
Requires-Dist: rdkit; (sys_platform != "win32" or platform_machine != "ARM64") and extra == "test"
Requires-Dist: requests>=2.33.0; extra == "test"
Requires-Dist: setuptools>=64; extra == "test"
Requires-Dist: wheel; extra == "test"
Description-Content-Type: text/markdown

# Microsoft Quantum Development Kit for Chemistry (QDK/Chemistry)

QDK/Chemistry is an open-source C++ and Python package within the [Microsoft Quantum Development Kit (QDK)](https://github.com/microsoft/qdk).
It provides an end-to-end toolkit for quantum chemistry: from molecular setup and classical electronic structure through quantum algorithm execution and simulation.
Designed as both a **development platform** and a **composable framework**, QDK/Chemistry enables researchers to assemble modular quantum–classical pipelines, explore strongly correlated systems, and advance toward practical quantum chemistry applications on near-term and fault-tolerant quantum computers.

## Overview

QDK/Chemistry bridges classical computational chemistry with quantum computing by providing every stage of the quantum applications pipeline in a single, modular toolkit:

- **Quantum algorithms**: a growing collection of chemistry-aware quantum algorithms, with composable building blocks for constructing higher-level quantum workflows
- **Classical electronic structure**: production-quality classical methods that generate the high-quality inputs quantum algorithms require
- **Composable architecture**: a plugin system that lets users assemble custom pipelines from interchangeable components, mixing native high-performance C++ backends with established community packages
- **Multiple quantum backends**: execute circuits on a variety of simulators through a unified interface that decouples algorithm development from backend selection

## Documentation

- **Website**: The full documentation is hosted [online](https://microsoft.github.io/qdk-chemistry/)
- **Quickstart**: A step-by-step walkthrough from installation to a complete end-to-end example is available in the [Quickstart guide](https://microsoft.github.io/qdk-chemistry/user/quickstart.html)
- **C++ API**: Headers in [`cpp/include/`](https://github.com/microsoft/qdk-chemistry/tree/main/cpp/include) contain comprehensive Doxygen documentation, also published in the [C++ API reference](https://microsoft.github.io/qdk-chemistry/api/cpp_api.html)
- **Python API**: All methods include detailed docstrings with Parameters, Returns, Raises, and Examples sections, also published in the [Python API reference](https://microsoft.github.io/qdk-chemistry/api/python_api.html)
- **Examples**: See the [`examples/`](https://github.com/microsoft/qdk-chemistry/tree/main/examples) directory in this repository, or the [Tutorials](https://microsoft.github.io/qdk-chemistry/tutorials/index.html) for guided, end-to-end usage examples
- **Reference data and companion materials**: Curated simulation datasets, molecular benchmarks, and related assets are available at [microsoft/qdk-chemistry-data](https://github.com/microsoft/qdk-chemistry-data)


Files under `.github/skills/` provide development-time guidance for coding
agents working on the repository. They are not part of the installed package or
its runtime behavior.

## Installing

**Linux / macOS:**

```bash
python3 -m venv venv && source venv/bin/activate
python3 -m pip install 'qdk-chemistry[all]'
```

**Windows (PowerShell):**

```powershell
python -m venv venv; .\venv\Scripts\Activate.ps1
python -m pip install "qdk-chemistry[all]"
```

The `[all]` extra pulls in all optional dependencies so that examples and tests work without chasing missing packages. For other installation methods (Dev Container, building from source) and platform-specific notes, see [INSTALL.md](https://github.com/microsoft/qdk-chemistry/blob/main/INSTALL.md).
On Windows arm64, dependencies without native wheels, including MCP, are omitted from `[all]`.

Prebuilt wheels are published for Linux (x86_64, arm64), macOS (Apple Silicon), and Windows (x86_64, arm64). On Windows, [WSL](https://learn.microsoft.com/windows/wsl/install) is supported as well. See [Notes for Windows users](https://github.com/microsoft/qdk-chemistry/blob/main/INSTALL.md#notes-for-windows-users) for Windows-specific caveats.

For a complete, end-to-end walkthrough from installation through a full quantum chemistry pipeline, see the [Quickstart guide](https://microsoft.github.io/qdk-chemistry/user/quickstart.html) and the [examples/](https://github.com/microsoft/qdk-chemistry/blob/main/examples/) directory.

## Copilot Plugin

QDK Chemistry publishes a Copilot plugin containing skills and an MCP server
configuration. Register the repository marketplace, then run the plugin
installer from the virtual environment containing QDK Chemistry:

```bash
python -m pip install 'qdk-chemistry[mcp]'
copilot plugin marketplace add https://github.com/microsoft/qdk-chemistry.git
qc plugin install qdk-chemistry@qdk-chemistry
```

Installing the `mcp` extra automatically activates the server endpoint, tool
registration, workspace middleware, and available MCP Apps visualizations.
The `qc` CLI remains available without this extra.

With no target directory, Copilot installs the plugin for the current user and
QDK Chemistry pins its MCP command to that virtual environment. A local plugin
directory is also accepted; QDK Chemistry registers its ancestor marketplace in
the same Copilot scope before installation. Copilot repository subdirectory
specs are accepted directly:

```bash
qc plugin install ./copilot-plugins/qdk-chemistry
qc plugin install OWNER/REPO:copilot-plugins/qdk-chemistry
```

To configure one workspace instead, pass its root. QDK Chemistry copies the
fetched skills into `.github`, merges its MCP server into
`.vscode/mcp.json` and `.github/mcp.json`, and keeps fetch/update state beneath
the ignored `.qdk_chem` directory:

```bash
qc plugin install ./copilot-plugins/qdk-chemistry \
    --target-dir /path/to/workspace
```

Update through the same CLI so the virtual-environment binding is restored
after Copilot refreshes the plugin files. Pass the same `--target-dir` for a
workspace installation:

```bash
qc plugin update qdk-chemistry
qc plugin update --all
qc plugin rebind qdk-chemistry
```

VS Code discovers user plugins installed by Copilot CLI and workspace assets
written by `--target-dir`. The plugin supplies:

- QDK Chemistry overview, MCP, coding, remote-execution, and visualization skills; and
- the `qdk_chemistry` MCP server configuration.

Plugin MCP processes start in the installed plugin directory. Call
`bind_workspace` before any other QDK Chemistry tool. It uses a single
client-provided file root when available; otherwise pass the active workspace as
an absolute `workspace_root`. Plugin-launched servers reject other tool calls
until binding succeeds and cannot be rebound to another workspace.

**Skills** provide tested domain knowledge: tool references, workflow recipes, parameter guidance, and common pitfalls.

## Telemetry

By default, this library collects anonymous usage and performance data to help improve the user experience and product quality. The telemetry implementation can be found in [telemetry.py](https://github.com/microsoft/qdk-chemistry/blob/main/python/src/qdk_chemistry/utils/telemetry.py) and all telemetry events are defined in [telemetry_events.py](https://github.com/microsoft/qdk-chemistry/blob/main/python/src/qdk_chemistry/utils/telemetry_events.py).

To disable telemetry, set the environment variable `QSHARP_PYTHON_TELEMETRY` to one of the following values: `none`, `disabled`, `false`, or `0`. For example:

```bash
# Linux / macOS
export QSHARP_PYTHON_TELEMETRY='false'
```

```powershell
# Windows (PowerShell)
$env:QSHARP_PYTHON_TELEMETRY = 'false'
```

Alternatively, telemetry can be disabled within a python script by including the following at the top of the `.py` file:

```python
import os
os.environ["QSHARP_PYTHON_TELEMETRY"] = "disabled"
```

If you have any questions about the library's use of Telemetry, please use the [Discussion forum](https://github.com/microsoft/qdk-chemistry/discussions).

## Citing QDK/Chemistry

If you use QDK/Chemistry in your work, please cite the following paper:

> N. A. Baker, B. Bilodeau, C. Chen, Y. Chen, M. Eckhoff, A. Efimovskaya, P. Gasparotto, P. van Gerwen, R. Gong, K. Hoang, Z. Hooshmand, A. J. Jenkins, C. S. N. Johnston, R. R. Li, J. Liang, H. Liu, A. Mills, M. Mörchen, G. Nishibuchi, C. Sun, B. Ticehurst, M. Troyer, J. P. Unsleber, S. Wernli, D. B. Williams-Young, and B. Zhang, "QDK/Chemistry: A Modular Toolkit for Quantum Chemistry Applications," [arXiv:2601.15253](https://arxiv.org/abs/2601.15253) (2026).

## Contributing

There are many ways in which you can participate in this project, for example:

- [Submit bugs and feature requests](https://github.com/microsoft/qdk-chemistry/issues), and help us verify as they are checked in
- Review [source code changes](https://github.com/microsoft/qdk-chemistry/pulls)
- Review the documentation and make pull requests for anything from typos to additional and new content

If you are interested in fixing issues and contributing directly to the code base,
please see the document [How to Contribute](https://github.com/microsoft/qdk-chemistry/blob/main/CONTRIBUTING.md).

## Support

For help and questions about using this project, please see [SUPPORT](https://github.com/microsoft/qdk-chemistry/blob/main/SUPPORT.md).

## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

## License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the [MIT](https://github.com/microsoft/qdk-chemistry/blob/main/LICENSE.txt) license.

## Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft’s Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos is subject to those third-parties’ policies.
