## Learn to Use ITensor

# Code Formulas

Below are code "formulas" for common tasks that come up when using ITensor. Please email us to suggest a formula you would like to see, or contribute one by submitting a pull request to our website Github repo.

## ITensor Formulas

## MPS and MPO Formulas

Formulas involving matrix product states (MPS), matrix product operators (MPO), and algorithms such as DMRG.

### MPS Basics

- Apply a one-site operator to an MPS
- Apply a two-site operator to an MPS
- Measure local properties of an MPS
- Compute the entanglement entropy of an MPS
- Write and Read an MPS or MPO to Disk with HDF5

### DMRG Formulas

- Perform a basic DMRG calculation
- DMRG calculation with mixed local Hilbert spaces
- Make a 2D Hamiltonian for DMRG

## Physics Formulas

Formulas involving physics-specific features of ITensor.

- Custom local Hilbert space
- Custom local Hilbert space with QNs
- Extending existing Hilbert space definitions

Back to Main