{"id":13689146,"url":"https://github.com/xitorch/xitorch","last_synced_at":"2025-10-21T19:50:21.734Z","repository":{"id":46091141,"uuid":"298564418","full_name":"xitorch/xitorch","owner":"xitorch","description":"Differentiable scientific computing library","archived":false,"fork":false,"pushed_at":"2024-05-22T16:37:22.000Z","size":2339,"stargazers_count":129,"open_issues_count":13,"forks_count":18,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-22T17:42:14.863Z","etag":null,"topics":["linear-algebra","machine-learning","numerical-calculations","pytorch","scientific-computing"],"latest_commit_sha":null,"homepage":"https://xitorch.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xitorch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-25T12:19:45.000Z","updated_at":"2024-06-19T01:31:17.950Z","dependencies_parsed_at":"2023-02-13T00:01:21.391Z","dependency_job_id":"943fffdd-ca6b-4042-9edc-976a34b2290d","html_url":"https://github.com/xitorch/xitorch","commit_stats":{"total_commits":799,"total_committers":5,"mean_commits":159.8,"dds":0.0550688360450563,"last_synced_commit":"aaee1ed17de65b614484cf51a312e1530a705ace"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xitorch%2Fxitorch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xitorch%2Fxitorch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xitorch%2Fxitorch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xitorch%2Fxitorch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xitorch","download_url":"https://codeload.github.com/xitorch/xitorch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224282140,"owners_count":17285777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linear-algebra","machine-learning","numerical-calculations","pytorch","scientific-computing"],"created_at":"2024-08-02T15:01:35.444Z","updated_at":"2025-10-21T19:50:16.702Z","avatar_url":"https://github.com/xitorch.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# `xitorch`: differentiable scientific computing library\n\n![Build](https://img.shields.io/github/workflow/status/xitorch/xitorch/CI)\n[![Docs](https://img.shields.io/readthedocs/xitorch)](https://xitorch.readthedocs.io/)\n[![Code coverage](https://img.shields.io/codecov/c/github/xitorch/xitorch)](https://codecov.io/gh/xitorch/xitorch)\n\n`xitorch` is a PyTorch-based library of differentiable functions and functionals that\ncan be widely used in scientific computing applications as well as deep learning.\n\nThe documentation can be found at: https://xitorch.readthedocs.io/\n\n## Example\n\nFinding root of a function:\n\n```python\nimport torch\nfrom xitorch.optimize import rootfinder\n\ndef func1(y, A):  # example function\n    return torch.tanh(A @ y + 0.1) + y / 2.0\n\n# set up the parameters and the initial guess\nA = torch.tensor([[1.1, 0.4], [0.3, 0.8]]).requires_grad_()\ny0 = torch.zeros((2, 1))  # zeros as the initial guess\n\n# finding a root\nyroot = rootfinder(func1, y0, params=(A,))\n\n# calculate the derivatives\ndydA, = torch.autograd.grad(yroot.sum(), (A,), create_graph=True)\ngrad2A, = torch.autograd.grad(dydA.sum(), (A,), create_graph=True)\n```\n\n## Modules\n\n* [`linalg`](xitorch/linalg/): Linear algebra and sparse linear algebra module\n* [`optimize`](xitorch/optimize/): Optimization and root finder module\n* [`integrate`](xitorch/integrate/): Quadrature and integration module\n* [`interpolate`](xitorch/interpolate/): Interpolation\n\n## Requirements\n\n* python \u003e=3.8.1,\u003c3.12\n* pytorch 1.13.1 or higher (install [here](https://pytorch.org/))\n\n## Getting started\n\nAfter fulfilling all the requirements, type the commands below to install `xitorch`\n\n    python -m pip install xitorch\n\nOr to install from GitHub:\n\n    python -m pip install git+https://github.com/xitorch/xitorch.git\n\nFinally, if you want to make an editable install from source:\n\n    git clone https://github.com/xitorch/xitorch.git\n    cd xitorch\n    python -m pip install -e .\n\nNote that the last option is only available per [PEP 660](https://peps.python.org/pep-0660/), so you will require [pip \u003e= 23.1](https://pip.pypa.io/en/stable/news/#v21-3)\n    \n## Used in\n\n* Differentiable Quantum Chemistry (DQC): https://dqc.readthedocs.io/\n\n## Gallery\n\nNeural mirror design ([example 01](examples/01-mirror-design/)):\n\n![neural mirror design](examples/01-mirror-design/images/mirror.gif)\n\nInitial velocity optimization in molecular dynamics ([example 02](examples/02-molecular-dynamics/)):\n\n![molecular dynamics](examples/02-molecular-dynamics/images/md.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxitorch%2Fxitorch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxitorch%2Fxitorch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxitorch%2Fxitorch/lists"}