Metadata-Version: 2.4
Name: pcam-sampler
Version: 1.0.2
Summary: D-Wave Ocean SDK compatible In-Material Physical Solver for NEOMA P-CAM
Author-email: NEOMA Lab <engineering@neoma-pcam.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/neoma-pcam/pcam-live
Project-URL: Documentation, https://neoma-pcam.github.io/pcam-live/
Project-URL: Gateway, https://rapidapi.com/shs15199702/api/neoma-p-cam-hyper-physical-control
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: dimod>=0.12.0
Requires-Dist: requests>=2.28.0

# pcam-sampler

[![PyPI version](https://img.shields.io/pypi/v/pcam-sampler.svg)](https://pypi.org/project/pcam-sampler/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

D-Wave Ocean SDK (`dimod.Sampler`) compatible In-Material Physical Relaxation Solver for NEOMA P-CAM (authenticated via RapidAPI — **2,000 free solves/month**).

## Installation

```bash
pip install pcam-sampler
```

## Quickstart

```python
import dimod
from pcam_sampler import PCAMSampler

# Define Ising problem (h, J)
h = {0: -0.5, 1: 0.5}
J = {(0, 1): -1.0}
bqm = dimod.BinaryQuadraticModel.from_ising(h, J)

# Sample via P-CAM In-Material Physical Reflex Solver (uses PCAM_RAPIDAPI_KEY or explicit key)
sampler = PCAMSampler(api_key="YOUR_RAPIDAPI_FREE_KEY")
sampleset = sampler.sample(bqm)

print(sampleset.first.sample)
print("Hardware Reflex Latency:", sampleset.info["hardware_reflex_ms"], "ms")
```
