Skip to main content

Fusion surrogates

A library of surrogate models for tokamak fusion.

This library provides both inference code and model weights and metadata. It is designed to provide surrogate models for TORAX, but the models should be usable by other fusion simulators.

QLKNN_7_11

Currently, this library only holds the QLKNN_7_11 model. This model is a surrogate of Qualikiz, a quasilinear gyrokinetic code for turbulent transport in tokamaks.

It is based on the original QLKNN10D model by Van de Plassche et al. PoP 2020 (also available on arxiv). It was trained by combining data for the QLKNN11D dataset and QLKNN7D-edge dataset. A paper describing the details of the model is in the works and should be published soon.

The model takes as input:

  • Normalized logarithmic heat and density gradients for electrons and main ions ($$R/L_{Te}$$, $$R/L_{Ti}$$, $$R/L_{ne}$$, $$R/L_{ni}$$)
  • Safety factor ($$q$$)
  • Magnetic shear ($$\hat{s}$$)
  • Local inverse aspect ratio ($$r/R_{maj}$$)
  • ion-electron temperature ratio ($$T_i/T_e$$)
  • Logarithmic ion-electron normalized collisionality ($$\mathrm{log}(\nu^*)$$)
  • Normalized density ($$n_i/n_e$$)

It outputs ion and electron heat and particle fluxes for each transport mode (Ion Temperature Gradient [ITG], Electron Temperature Gradient [ETG], Trapped Electron Modes [TEM]), as well as the the maximum growth rate on ion gyroradius scales. Specifically, we output the leading flux for that mode (ion heat flux for ITG, electron heat flux for TEM and ETG), and ratios of the relevant secondary fluxes to the leading flux of that mode.

More details on the inputs and outputs mentioned above can be found in the Qualikiz documentation.

Installation instructions

Virtual environment

It is recommended to use a virtual environment to install fusion_surrogates.

To install venv:

pip install --upgrade pip
pip install virtualenv

To create and activate a venv:

python3 -m venv .venv
source .venv/bin/activate

Once you are done with your session, you can exit the venv:

deactivate

Installing the library

To install the library:

pip install fusion_surrogates

If you want to run unit tests, install with the testing option:

pip install -e .[testing]
pytest .venv/lib/python*/site-packages/fusion_surrogates

Disclaimer

Copyright 2025 Google LLC

All software is licensed under the Apache License, Version 2.0 (Apache 2.0); you may not use this file except in compliance with the Apache 2.0 license. You may obtain a copy of the Apache 2.0 license at: https://www.apache.org/licenses/LICENSE-2.0

All other materials are licensed under the Creative Commons Attribution 4.0 International License (CC-BY). You may obtain a copy of the CC-BY license at: https://creativecommons.org/licenses/by/4.0/legalcode

Unless required by applicable law or agreed to in writing, all software and materials distributed here under the Apache 2.0 or CC-BY licenses are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the licenses for the specific language governing permissions and limitations under those licenses.

This is not an official Google product.

Metadata

Release files for fusion-surrogates 0.4.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fusion-surrogates 0.4.8
File Size Uploaded Provenance Actions
fusion_surrogates-0.4.8.tar.gz 615.1 kB Without provenance Details for fusion_surrogates-0.4.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fusion-surrogates 0.4.8
File Interpreter ABI Platform Actions
fusion_surrogates-0.4.8-py3-none-any.whl Python 3 none any Details for fusion_surrogates-0.4.8-py3-none-any.whl

Total release size: 1.2 MB

Release files / fusion_surrogates-0.4.8.tar.gz

Download URL fusion_surrogates-0.4.8.tar.gz
Size 615.1 kB
Tags Source
SHA-256 checksum
How to use checksums
59a3055eef380403271b3aab4c8fd88651e6f39b462d106fce7a772675d1ea7f
BLAKE2b-256 checksum
How to use checksums
1e8ef3b6661a11bd1f4f696c54486519f75f7d4591f76917123f1110620ce872
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / fusion_surrogates-0.4.8-py3-none-any.whl

Download URL fusion_surrogates-0.4.8-py3-none-any.whl
Size 624.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa7f9d545c9da4eecf22d6a325bdf095207349afeee6d39f22dc75aecc05c2e9
BLAKE2b-256 checksum
How to use checksums
cbce9224f4c0dcf45d1cb3945120ea3076dcafda1f02eab45550627bc957f4f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for fusion-surrogates 0.4.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page