An example minimal project that compiles bindings using nanobind and scikit-build
Project description
Wick&d
Wick&d is a Python library for the algebra of second quantization for fermionic systems. It implements Wick's contraction theorem for general Fermi vacua, making it well-suited for deriving equations in quantum chemistry methods such as coupled cluster, MBPT, and multireference theories.
Quick start
# Define a Slater determinant reference with occupied (o) and virtual (v) spaces
w.reset_space()
w.add_space("o", "fermion", "occupied", ["i", "j", "k", "l"])
w.add_space("v", "fermion", "unoccupied", ["a", "b", "c", "d"])
# Build the operators F
F = w.utils.gen_op("f", 1, "ov", "ov")
# Build the one-body operator T1 (occupied to virtual)
T1 = w.op("t", ["v+ o"])
# Build the product of F and T1
F_T1 = F @ T1
# Apply Wick's theorem and collect all fully contracted terms
wt = w.WickTheorem()
expr = wt.contract(F_T1, minrank=0, maxrank=4)
print(f"F T_{{1}} = {expr.latex()}")
Installation
From PyPI:
pip install wickd
Development version:
git clone https://github.com/fevangelista/wickd.git
cd wickd
pip install nanobind scikit-build-core[pyproject]
pip install --no-build-isolation -ve .
Requirements
- Python ≥ 3.9
- macOS or Linux
- Boost (optional) — enables 1024-bit integer arithmetic for large prefactors; the library builds and runs without it
Testing
pip install pytest
pytest
Learning resources
- Jupyter tutorials — step-by-step introduction to the library
- Examples — worked derivations (e.g. coupled cluster equations)
Citation
If you use Wick&d in your research, please cite:
@article{Evangelista2022,
author = {Evangelista, Francesco A.},
title = {Automatic derivation of many-body theories based on general {Fermi} vacua},
journal = {J. Chem. Phys.},
volume = {157},
pages = {064111},
year = {2022},
doi = {10.1063/5.0097858},
url = {https://doi.org/10.1063/5.0097858},
}
Contributing
Bug reports and pull requests are welcome via GitHub Issues.
License
Wick&d is released under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file wickd-1.2.2.tar.gz.
File metadata
- Download URL: wickd-1.2.2.tar.gz
- Upload date:
- Size: 38.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6207750f44a8986b9222aec122f77ef386179644fc9c3621c0153e8c312ad1b3
|
|
| MD5 |
2565175f408d38231c5e019298c58fec
|
|
| BLAKE2b-256 |
a80003405b080b3f05612f410d87f74caa8307b88fe2036bbad67b009e09938d
|
Provenance
The following attestation bundles were made for wickd-1.2.2.tar.gz:
Publisher:
wheels.yml on fevangelista/wickd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wickd-1.2.2.tar.gz -
Subject digest:
6207750f44a8986b9222aec122f77ef386179644fc9c3621c0153e8c312ad1b3 - Sigstore transparency entry: 1371077040
- Sigstore integration time:
-
Permalink:
fevangelista/wickd@a3980b3c3850bc76c80dfce81df793c0ccd2c541 -
Branch / Tag:
refs/tags/v1.2.2 - Owner: https://github.com/fevangelista
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@a3980b3c3850bc76c80dfce81df793c0ccd2c541 -
Trigger Event:
release
-
Statement type: