About

Me

Email LinkedIn GitHub

My name is Sergio García Heredia. I am a theoretical physicist and data scientist, specialized in machine and deep learning. I have a great interest in science, mathematics, programming and computational methods, especially machine learning and quantum computing. In general, I am an enthusiast of scientific and technological progress. My projects focus on the development of new deep learning algorithms and applications in these two areas.

In the past, I have worked as a generative and agentic AI engineer. Currently, I am a PhD student at Leiden University (LION and aQa), where I am working on the intersection of machine learning and quantum physics. My current research focuses on understanding the origin of discrepancies between the theoretical capacity of artificial neural networks to represent quantum states (Neural Quantum States) in Quantum Many-Body Physics and their effective, practical performance.

I am strongly convinced that the relationship between Physics and Machine Learning forms a virtuous cycle: learning algorithms can expand our ability to study complex phenomena, while physical principles can guide the development of better learning methods. For this reason, I maintain a broad interest in areas such as Physics-Informed Machine Learning, Geometric Deep Learning, and Scientific Machine Learning more generally.

The blog

SciBits.blog is a blog with hands-on tutorials on cutting-edge topics in scientific computing and machine and deep learning, from both a classical and a quantum point of view. It is a personal project with a twofold objective. For me, it is an exercise and a motivation to continue learning and stay up-to-date on the latest advances in scientific computing. On the other hand, it is an excellent opportunity to share that knowledge and help researchers, students, and enthusiasts in these fields make use of it.

Content License

Unless otherwise stated:

  • The textual content (explanations, theory, narrative) on this site is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
  • The source code included in tutorials is licensed under the MIT License.
  • Images, diagrams, and visualizations created by the author are licensed under CC BY 4.0 unless otherwise noted.
  • Sample datasets provided in tutorials are licensed under CC BY 4.0 unless they originate from third-party sources (in which case their original licenses apply).

This means you are free to copy, modify, redistribute, and use both the text and code — including for commercial purposes — as long as you give appropriate credit to the original author and retain any license notices.

Attribution

When using content from SciBits.blog, please provide attribution in one of these formats:

For academic/research use:

García Heredia, S. (2026). [Tutorial Title]. SciBits.blog. https://scibits.blog/[url]

For general use:

Source: Sergio García Heredia, SciBits.blog (https://scibits.blog)

Third-Party Content

External libraries, frameworks, and resources referenced or embedded in tutorials maintain their original licenses. When using code that includes third-party dependencies, please respect their individual licensing terms.

Disclaimer

The code and information provided on this site are offered for educational purposes. While every effort is made to ensure accuracy, users should test and validate any code in their own environments before production use.

© 2025 Sergio García Heredia - SciBits.blog

Code Dependencies

The following .toml files include the dependencies for each programming language that can be used to run the code in any of the posts:

[project]
name = "scibits.blog"
version = "0.1.0"
description = "Scientific computing and machine learning blog"
requires-python = "==3.11.13"

# Use >= by default; uv.lock pins exact versions for reproducibility.
# Run `uv lock --upgrade` to bump versions.
dependencies = [
    # Jupyter
    "jupyter",
    "ipywidgets",

    # Utilities
    "tabulate>=0.9.0",

    # Core Scientific Computing
    "numpy>=2.0.2",
    "scipy>=1.16.0",
    "pandas>=2.2.2",
    "numba>=0.60.0",
    "networkx>=3.5",
    "sympy>=1.13.1",
    "tqdm>=4.60",

    # Data Visualization
    "matplotlib>=3.10.0",
    "seaborn>=0.13.2",
    "plotly>=5.24.1",
    "py3Dmol>=2.5.2",

    # Machine Learning
    "scikit-learn>=1.6.1",

    # PyTorch (PyPI serves CPU wheels on macOS/Windows, CUDA on Linux)
    "torch>=2.6.0",
    "torchaudio>=2.6.0",
    "torchvision>=0.21.0",

    # PyTorch Geometric (core works without C++ extensions since PyG 2.3+)
    "torch-geometric>=2.6.1",
    # DISABLED: pulls in torch-scatter/torch-sparse (no aarch64 wheels).
    # Only used in posts/temporal_gnn — re-enable on x86_64.
    # "torch_geometric_temporal>=0.56.2",

    # TensorFlow
    "tensorflow>=2.18.0",

    # JAX (CPU/GPU variant installed via extras — see [project.optional-dependencies])
    "flax>=0.10.6",
    "optax>=0.2.5",

    # Netket
    "netket>=3.13",

    # Quantum
    "qiskit>=2.1.2",
    "qiskit-aer>=0.17.1",
    "pylatexenc>=2.10",
]

[project.optional-dependencies]

# PyG native C++ extensions for accelerated scatter/sparse/cluster operations.
# These are OPTIONAL since PyG 2.3+ — core functionality works without them.
# No linux/aarch64 wheels exist on data.pyg.org, so only usable on x86_64.
# To enable: uncomment this extra AND the find-links in [tool.uv] below.
# pyg-native = [
#     "pyg-lib",
#     "torch_scatter",
#     "torch_sparse",
#     "torch_cluster",
#     "torch_spline_conv",
# ]

# Development tools (not needed for running experiments)
# Install with: uv sync --extra dev
dev = [
    "pre-commit>=4.0", # Git hooks for code quality
]

# JAX variants — mutually exclusive, select one when syncing:
#   CPU container : uv sync --extra dev --extra cpu
#   GPU container : uv sync --extra dev --extra gpu
cpu = [
    "jax>=0.5.2",
]
gpu = [
    "jax[cuda12]>=0.5.2",
]

# ============================================================================
# [tool.uv] - UV-Specific Configuration
# ============================================================================
# UV is a fast Python package manager (10-100x faster than pip).
# This section configures UV-specific behavior.
#
# PyTorch is installed from PyPI (default index). On Linux, PyPI serves
# CUDA-bundled wheels; on macOS/Windows, CPU-only wheels. No extra
# index configuration is needed for PyTorch.
#
# If you re-enable the pyg-native extra above, uncomment the find-links
# below so UV can find the pre-built PyG C++ extension wheels.
[tool.uv]

# Pre-built PyG C++ extension wheels. Uncomment if you re-enable
# torch_geometric_temporal (above) and run on x86_64 where wheels exist.
# find-links = [
#     "https://data.pyg.org/whl/torch-2.6.0+cpu.html",
#     "https://data.pyg.org/whl/torch-2.6.0+cu124.html",
# ]
[deps]
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

[compat]
julia = "1.11"
Distributions = "0.25"
Plots = "1"

Contact

Suggestions, corrections and feedback of any kind are greatly appreciated. I look forward to hearing from you through the following channels: