|
Cytnx 1.1.2.dev761+ge28145acd
|
Benefit from both side. One can do simple prototype on python side and easy transfer to C++ with small effort!
Avaliable types are : (please refer to Type )
| cytnx type | c++ type | Type object |
|---|---|---|
| cytnx_double | double | Type.Double |
| cytnx_float | float | Type.Float |
| cytnx_uint64 | uint64_t | Type.Uint64 |
| cytnx_uint32 | uint32_t | Type.Uint32 |
| cytnx_uint16 | uint16_t | Type.Uint16 |
| cytnx_int64 | int64_t | Type.Int64 |
| cytnx_int32 | int32_t | Type.Int32 |
| cytnx_int16 | int16_t | Type.Int16 |
| cytnx_complex128 | std::complex<double> | Type.ComplexDouble |
| cytnx_complex64 | std::complex<float> | Type.ComplexFloat |
| cytnx_bool | bool | Type.Bool |
See cytnx::linalg for further details
| func | inplace | CPU | GPU | callby Tensor | Tensor | UniTensor |
|---|---|---|---|---|---|---|
| Add | Add_ | ✓ | ✓ | Add | Add | Add |
| Sub | Sub_ | ✓ | ✓ | Sub | Sub | Sub |
| Mul | Mul_ | ✓ | ✓ | Mul | Mul | Mul |
| Div | Div_ | ✓ | ✓ | Div | Div | Div |
| Mod | x | ✓ | ✓ | Mod | Mod | Mod |
| Cpr | x | ✓ | ✓ | Cpr | Cpr | x |
| +,+= | += | ✓ | ✓ | += | +,+= | +,+= |
| -,-= | -= | ✓ | ✓ | -= | -,-= | -,-= |
| ,= | *= | ✓ | ✓ | *= | *,*= | *,*= |
| /,/= | /= | ✓ | ✓ | /= | /,/= | /,/= |
| Svd | x | ✓ | ✓ | Svd | Svd | Svd |
| Gesvd | x | ✓ | ✓ | x | Gesvd | Gesvd |
| Svd_truncate | x | ✓ | ✓ | x | Svd_truncate | Svd_truncate |
| Gesvd_truncate | x | ✓ | ✓ | x | Gesvd_truncate | Gesvd_truncate |
| InvM | InvM_ | ✓ | ✓ | InvM | InvM | InvM |
| Inv | Inv_ | ✓ | ✓ | Inv | Inv | x |
| Conj | Conj_ | ✓ | ✓ | Conj | Conj | Conj |
| Exp | Exp_ | ✓ | ✓ | Exp | Exp | x |
| Expf | Expf_ | ✓ | ✓ | x | Expf | x |
| Eigh | x | ✓ | ✓ | Eigh | Eigh | Eigh |
| ExpH | x | ✓ | ✓ | x | ExpH | ExpH |
| ExpM | x | ✓ | x | x | ExpM | ExpM |
| Matmul | x | ✓ | ✓ | x | Matmul | x |
| Diag | x | ✓ | ✓ | x | Diag | x |
| Tensordot | x | ✓ | ✓ | x | Tensordot | x |
| Outer | x | ✓ | ✓ | x | Outer | x |
| Vectordot | x | ✓ | ✓ | x | Vectordot | x |
| Tridiag | x | ✓ | ✓ | x | Tridiag | x |
| Kron | x | ✓ | ✓ | x | Kron | x |
| Norm | x | ✓ | ✓ | Norm | Norm | Norm |
| Dot | x | ✓ | ✓ | x | Dot | x |
| Eig | x | ✓ | x | x | Eig | Eig |
| Pow | Pow_ | ✓ | ✓ | Pow | Pow | Pow |
| Abs | Abs_ | ✓ | ✓ | Abs | Abs | x |
| Qr | x | ✓ | ✓ | x | Qr | Qr |
| Qdr | x | ✓ | x | x | Qdr | Qdr |
| Det | x | ✓ | ✓ | x | Det | x |
| Min | x | ✓ | ✓ | Min | Min | x |
| Max | x | ✓ | ✓ | Max | Max | x |
| Sum | x | ✓ | ✓ | x | Sum | x |
| Trace | x | ✓ | x | Trace | Trace | Trace |
| Matmul_dg | x | ✓ | ✓ | x | Matmul_dg | x |
| Tensordot_dg | x | ✓ | x | x | Tensordot_dg | x |
| Lstsq | x | ✓ | x | x | Lstsq | x |
| Ger | x | ✓ | ✓ | x | Ger | x |
| Gemm | Gemm_ | ✓ | ✓ | x | Gemm | x |
| Gemm_Batch | x | ✓ | ✓ | x | Gemm_Batch | x |
iterative solver:
| func | CPU | GPU | Tensor | UniTensor |
|---|---|---|---|---|
| Lanczos | ✓ | ✓ | Lanczos | Lanczos |
| Lanczos_Exp | ✓ | x | x | Lanczos_Exp |
| Arnoldi | ✓ | x | Arnoli | Arnoli |
Tensor: zeros(), ones(), arange(), identity(), eye(),
See cytnx::random for further details
| func | UniTensor | Tensor | Storage | CPU | GPU |
|---|---|---|---|---|---|
| ^normal | x | normal | x | ✓ | ✓ |
| ^uniform | x | uniform | x | ✓ | ✓ |
| *normal_ | normal_ | normal_ | normal_ | ✓ | ✓ |
| *uniform_ | uniform_ | uniform_ | uniform_ | ✓ | ✓ |
* this is initializer
^ this is generator
Cytnx publishes prebuilt Python wheels for CPython 3.9-3.14 on Linux (x86_64, aarch64) and macOS (Apple silicon and Intel). There is no native Windows wheel; use WSL.
with Pixi, which is what we recommend. Pin a Python version Cytnx has wheels for; a bare pixi add python takes a newer CPython than the wheels cover and the resolve fails
with pip, inside a virtual environment created from one of those Python versions
The CUDA build is a separate cytnx-cuda package, currently published on the nightly index for Linux x86_64 only:
The wheels carry only the Python extension. For the C++ API, build the library with CMake and consume it via find_package(Cytnx). See the installation guide for the full instructions.
| Creator and Project manager | Affiliation | |
|---|---|---|
| Kai-Hsin Wu | Boston Univ., USA | kaihs.nosp@m.inwu.nosp@m.@gmai.nosp@m.l.co.nosp@m.m |
| Developers | Affiliation | Roles |
|---|---|---|
| Chang-Teng Lin | NTU, Taiwan | major maintainer and developer |
| Ke Hsu | NTU, Taiwan | major maintainer and developer |
| Ivana Gyro | NTU, Taiwan | major maintainer and developer |
| Hao-Ti Hung | NTU, Taiwan | documentation and linalg |
| Ying-Jer Kao | NTU, Taiwan | setuptool, cmake |
| Manuel Schneider | NYCU, Taiwan | developer |
| Contributors | Affiliation |
|---|---|
| PoChung Chen | NTHU, Taiwan |
| Chia-Min Chung | NYCU, Taiwan |
| Ian McCulloch | NTHU, Taiwan |
| Yen-Hsin Wu | NTU, Taiwan |
| Po-Kwan Wu | OSU, USA |
| Wen-Han Kao | UMN, USA |
| Yu-Hsueh Chen | NTU, Taiwan |
| Yu-Cheng Lin | NTU, Taiwan |