Skip to content

Examples

This section provides comprehensive, executable examples demonstrating Nicole's capabilities for symmetry-aware tensor computations. Each example includes live code execution with real outputs, allowing you to see exactly what Nicole produces.

The examples are organized by complexity and topic:

  • Basic: Learn tensor creation, arithmetic, and block access
  • Symmetries: Work with U(1), Z(2), and product groups
  • Operations: Master contractions, decompositions, and manipulations
  • Advanced: Build operators and optimize performance

All code examples use markdown-exec to show both the source code and its actual output, making it easy to understand what each operation does and verify the results.

Getting Started

New to Nicole? Start here:

Symmetries

Learn to work with different symmetry groups:

Operations

Master tensor operations:

Advanced

For experienced users:

Example Format

Each example page includes:

  1. Complete runnable code
  2. Step-by-step explanations
  3. Expected output
  4. Links to API reference

Running Examples

All examples assume Nicole is installed:

pip install nicole

Then copy-paste code directly into Python or Jupyter notebooks.

Contributing Examples

Have an interesting use case? Contributions welcome! See the GitHub repository to submit examples.

See Also