Metadata-Version: 2.4
Name: qvmc
Version: 0.1.0
Summary: Quantum variational Monte Carlo tools for research workflows.
Author: Vinit
License: MIT License
        
        Copyright (c) 2026 Vinit
        
        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.
        
Project-URL: Homepage, https://github.com/vinitX/Quantum-Sampling
Project-URL: Repository, https://github.com/vinitX/Quantum-Sampling.git
Project-URL: Issues, https://github.com/vinitX/Quantum-Sampling/issues
Keywords: quantum,variational monte carlo,vmc,rbm,sampling
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.10
Provides-Extra: qiskit
Requires-Dist: qiskit>=1.0; extra == "qiskit"
Requires-Dist: qiskit-aer>=0.14; extra == "qiskit"
Provides-Extra: docs
Requires-Dist: sphinx>=7.0; extra == "docs"
Requires-Dist: furo>=2024.1.29; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Dynamic: license-file

# qvmc

`qvmc` is a research-oriented Python library for quantum variational Monte Carlo workflows.
It packages the reusable core of this repository into an importable library with:

- restricted Boltzmann machine wavefunction models
- classical sampling helpers for spin systems
- Pauli operator construction and connection utilities
- a lightweight NumPy Adam optimizer
- an optional Qiskit backend for quantum-inspired proposal sampling

## Installation

Install the core package:

```bash
pip install qvmc
```

Install the optional Qiskit backend:

```bash
pip install "qvmc[qiskit]"
```

For local development from this repository:

```bash
pip install -e ".[test]"
```

## Quickstart

```python
import numpy as np

from qvmc import RBM, SpinOperator

spin = SpinOperator(n_qubits=2)
hamiltonian = -spin.z(0) * spin.z(1) - 0.5 * spin.x(0) - 0.5 * spin.x(1)

rbm = RBM(N=2, M=2, seed=7)
energy = rbm.energy_exact(hamiltonian)

print(np.real(energy))
```

## Package layout

- `qvmc.models`: RBM-based variational models
- `qvmc.sampling`: classical sampling and probability helpers
- `qvmc.operators`: Pauli algebra and spin-operator utilities
- `qvmc.optim`: optimization helpers
- `qvmc.backends.qiskit`: optional Qiskit integration

## Documentation

Sphinx docs live in `docs/` and are structured around:

- installation and quickstart
- conceptual overview of the core workflow
- API reference
- Qiskit backend guide
- examples that replace the old script-style entrypoints

Build them locally with:

```bash
sphinx-build -b html docs docs/_build/html
```

## Examples

Examples live in `examples/` and are import-first workflows rather than command-line scripts:

- `examples/core_ground_state_workflow.py`
- `examples/qiskit_sampling_demo.py`

## Development validation

Recommended local validation steps:

```bash
python -m pytest
python -m build
```
