Metadata-Version: 2.5
Name: mandacaru
Version: 26.10.39
Summary: Everything you need for fermionic quantum simulation.
Project-URL: Homepage, https://github.com/seixas-research/mandacaru
Project-URL: Documentation, https://mandacaru.readthedocs.io/en/latest/
Author-email: Leandro Seixas Rocha <leandro.rocha@ilum.cnpem.br>
License: MIT License
        
        Copyright (c) 2026 Leandro Seixas Rocha 
        
        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.
License-File: LICENSE
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.14
Requires-Dist: numpy>=2.0.0
Provides-Extra: ase
Requires-Dist: ase; extra == 'ase'
Provides-Extra: braket
Requires-Dist: amazon-braket-sdk; extra == 'braket'
Provides-Extra: cirq
Requires-Dist: cirq; extra == 'cirq'
Provides-Extra: columnar
Requires-Dist: fastparquet; extra == 'columnar'
Requires-Dist: pandas; extra == 'columnar'
Provides-Extra: coverage
Requires-Dist: pytest-cov; extra == 'coverage'
Provides-Extra: dev
Requires-Dist: ase; extra == 'dev'
Requires-Dist: fastparquet; extra == 'dev'
Requires-Dist: furo>=2024.8.6; extra == 'dev'
Requires-Dist: matplotlib; extra == 'dev'
Requires-Dist: myst-parser<6,>=4; extra == 'dev'
Requires-Dist: pandas; extra == 'dev'
Requires-Dist: psutil; extra == 'dev'
Requires-Dist: pyarrow; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: scipy; extra == 'dev'
Requires-Dist: spglib; extra == 'dev'
Requires-Dist: sphinx<10,>=8; extra == 'dev'
Provides-Extra: docs
Requires-Dist: furo>=2024.8.6; extra == 'docs'
Requires-Dist: myst-parser<6,>=4; extra == 'docs'
Requires-Dist: sphinx<10,>=8; extra == 'docs'
Provides-Extra: periodic
Requires-Dist: ase; extra == 'periodic'
Requires-Dist: fastparquet; extra == 'periodic'
Requires-Dist: pandas; extra == 'periodic'
Requires-Dist: scipy; extra == 'periodic'
Requires-Dist: spglib; extra == 'periodic'
Provides-Extra: qiskit
Requires-Dist: qiskit; extra == 'qiskit'
Requires-Dist: qiskit-ibm-runtime; extra == 'qiskit'
Provides-Extra: visualization
Requires-Dist: matplotlib; extra == 'visualization'
Description-Content-Type: text/markdown

<h1 align="center" style="margin-top:20px; margin-bottom:50px;">

<img src="https://raw.githubusercontent.com/seixas-research/mandacaru/refs/heads/main/logo/logo_light.png" alt="Mandacaru logo" height="200">
</h1>

<div align="center">

[![License: MIT](https://img.shields.io/badge/License-MIT-red?style=for-the-badge&logo=opensourceinitiative&logoColor=white)](https://github.com/seixas-research/mandacaru/blob/main/LICENSE)
[![Python 3.14](https://img.shields.io/badge/Python-3.14+-fcbc2c.svg?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/)
[![PyPI version](https://img.shields.io/pypi/v/mandacaru.svg?style=for-the-badge&logo=pypi&logoColor=white)](https://pypi.org/project/mandacaru/)
[![Documentation Status](https://img.shields.io/readthedocs/mandacaru?style=for-the-badge&logo=readthedocs&logoColor=white&label=Docs)](https://mandacaru.readthedocs.io/en/latest/)
[![GitHub](https://img.shields.io/badge/GitHub-mandacaru-181717?style=for-the-badge&logo=github)](https://github.com/seixas-research/mandacaru)

</div>

# Mandacaru

Mandacaru provides a Rust scientific core with a Python interface for electronic
structure and fermionic quantum simulation. Rust owns molecular HF/DFT,
variational optimization, scientific buffers and numerical kernels. Python
provides input values, result views, ASE integration and external service adapters.
There is no Python calculation engine or execution-engine selector.

## Install and run

The base package requires Python 3.14 and NumPy. Platform wheels include the
native extension. Building from source also requires Rust/Cargo.

```bash
python -m pip install mandacaru
```

```python
import numpy as np
from mandacaru import Geometry, Mandacaru

geometry = Geometry((1, 1), np.array([[2.5,2.5,2.13], [2.5,2.5,2.87]]), np.eye(3)*5)
with Mandacaru(method="dft", xc="pbe", grid_spacing=.35,
               resources={"threads": 2}) as calculation:
    result = calculation.run(geometry)
    print(result.optimal_energy)  # eV
    print(result.forces())       # eV/angstrom
```

Install `mandacaru[ase]` for the optional
`mandacaru.integrations.ase.ASECalculator` adapter. Molecular calculations
accept standalone geometry values and do not require ASE.

Four-index Hamiltonians are built only when explicitly requested through
`result.hamiltonian`, Hamiltonian export or a quantum calculation. HF and
screened hybrid exchange use native Cholesky factors.

## Source layout

| Location | Responsibility |
| --- | --- |
| `Cargo.toml`, `Cargo.lock` | Native workspace and locked dependencies |
| `crates/mandacaru-core` | Basis, models, molecular/periodic solvers, PAW and quantum algorithms |
| `crates/mandacaru-kernels` | Low-level numerical kernels |
| `crates/mandacaru-python` | PyO3 bindings and checked NumPy transfers |
| `src/mandacaru` | Python interface, workflows, result views and integrations |
| `build_hooks/native.py` | Native extension build hook |
| `scripts` | Local architectural and installation checks |
| `docs` | Sphinx manual |

There are no Rust sources inside the Python package. No GitHub workflows are used.

## Local checks

```bash
python scripts/check_architecture.py
cargo test --release --workspace
python -m pytest test/architecture
python -m sphinx -W --keep-going -b html docs/source /tmp/mandacaru-docs
```

Rebuild the editable extension after changing Rust:

```bash
python -m pip install --no-deps -e .
```

The [manual](https://mandacaru.readthedocs.io/en/latest/) describes native
coverage, scientific conventions and remaining migration work. Unsupported
models raise errors and do not select a Python numerical fallback.
