Metadata-Version: 2.4
Name: C3L
Version: 0.1.0
Summary: Coupled-cluster solvers for Lindblad steady states and Green functions
License-Expression: MIT
Project-URL: Homepage, https://github.com/haoen2021/C3Lindblad
Project-URL: Documentation, https://github.com/haoen2021/C3Lindblad/blob/main/examples/README.md
Project-URL: Repository, https://github.com/haoen2021/C3Lindblad
Project-URL: Issues, https://github.com/haoen2021/C3Lindblad/issues
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numba>=0.61
Requires-Dist: numpy>=2.0
Requires-Dist: scipy>=1.13
Requires-Dist: jax>=0.9.2
Requires-Dist: jax[cuda13]>=0.9.2; sys_platform == "linux" and (platform_machine == "x86_64" or platform_machine == "aarch64")
Requires-Dist: RealTimeBath==0.1.0
Provides-Extra: benchmark
Requires-Dist: threadpoolctl>=3.0; extra == "benchmark"
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Provides-Extra: jax
Provides-Extra: gpu-jax
Provides-Extra: fitting
Dynamic: license-file

# C³L (Coupled-Cluster Coupled Lindblad)

<p align="center">
  <img src="C3L/c3l.svg" alt="C³L — Coupled-Cluster Coupled Lindblad" width="480">
</p>

C³L (Coupled-Cluster Coupled Lindblad, "C cubed L") applies coupled-cluster theory to non-Markovian impurity dynamics. By representing bath memory with coupled Lindblad pseudomodes, it provides a scalable route to correlated steady states, dynamical Green functions, spectra, and nonequilibrium transport in multiorbital systems with general two-body interactions.

## Install

C³L requires Python 3.11 or newer.

```bash
python -m pip install c3l
```

The installation includes JAX and [RealTimeBath](https://github.com/Hertz4/RealTimeBath) for bath fitting. In Python, use `import c3l`.

CPU and GPU calculations use the same installation. On Linux x86-64 and ARM64, CUDA 13 dependencies are installed automatically. GPU execution requires a compatible NVIDIA GPU and driver; see the [JAX installation guide](https://docs.jax.dev/en/latest/installation.html).

For some examples using additional utilities, install the optional benchmarking tools:

```bash
python -m pip install "c3l[benchmark]"
```

### From source

From the root of a downloaded or cloned source tree:

```bash
python -m pip install .
```

<details>
<summary>For developers</summary>

For development, use `python -m pip install -e ".[test]"`; run the tests with `python -m pytest`.

</details>

## Quick start

This CPU example computes a CCSD steady state and its $\mathcal S_{1,3}$ spectral function for an impurity coupled to two bath orbitals.

<details>
<summary>Show the CCSD and response example</summary>

```python
import numpy as np
from c3l import FermionicLindbladModel
from c3l.cc.factorized import factorized_cc_problem
from c3l.cc.component_tensor import (
    ComponentStaticProblem, ComponentEOMProblem, component_eom_context, component_eom_sources,
)
from c3l.cc.component_solver import solve_component_ccsd
from c3l.cc.eom import eom_ccsd_problem
from c3l.cc.component_response import ComponentSigmaOperator, component_retarded_green

model = FermionicLindbladModel(
    E=np.array([[-0.6, 0.28, 0.28], [0.28, -1.2, 0.0], [0.28, 0.0, 1.2]]),
    gamma_loss=np.diag([0.0, 0.06, 0.48]),
    gamma_gain=np.diag([0.0, 0.48, 0.06]),
    U=1.2,
)
problem = ComponentStaticProblem.compile(
    factorized_cc_problem(model, "CCSD")
)
solution = solve_component_ccsd(problem)
print(f"CCSD residual: {solution.packed_residual_norm:.2e}")

eom = eom_ccsd_problem(problem.oracle)
context = component_eom_context(
    ComponentEOMProblem.compile(eom, problem, charge=1), solution.amplitudes
)
omega = np.linspace(-4.0, 4.0, 81)
response = component_retarded_green(
    ComponentSigmaOperator(context), component_eom_sources(context), omega, eta=0.0
)
np.savez("spectrum.npz", omega=omega, G_R=response.retarded, A=-response.retarded.imag / np.pi)
```

`spectrum.npz` contains the impurity Green function and spectral density $A(\omega)=-\Im G^R(\omega)/\pi$ per spin.

</details>

## Examples

See the [examples guide](examples/README.md) for more examples. These optional scripts are provided in the source repository.

## Citing C³L

If you use C³L in your research, please cite our preprint:

Hao-En Li, Zhen Huang, and Lin Lin, [Efficient simulations of spectra and transport for multiorbital quantum impurities](preprint/Efficient_Multiorbital_Impurities.pdf), 2026.

```bibtex
@misc{LiHuangLin2026,
  title = {Efficient simulations of spectra and transport for multiorbital quantum impurities},
  author = {Li, Hao-En and Huang, Zhen and Lin, Lin},
  year = {2026},
  note = {Preprint},
  url = {https://github.com/haoen2021/C3Lindblad/blob/main/preprint/Efficient_Multiorbital_Impurities.pdf}
}
```

If your calculation employed the bath fitting based on [RealTimeBath](https://github.com/Hertz4/RealTimeBath), cite

Zhen Huang, Gunhee Park, Garnet Kin-Lic Chan, and Lin Lin, [Coupled Lindblad Pseudomode Theory for Simulating Open Quantum Systems](https://journals.aps.org/prl/abstract/10.1103/qfkp-jc7s), **Phys. Rev. Lett. 2026**, 136, 090403

## License

[MIT License](LICENSE). Copyright (c) 2026 Hao-En Li.
