> ## Documentation Index
> Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hubbard Model

### haiqu.sdk.skqd.hubbard\_hamiltonian(norb, t, U, periodic=False)

Build 1D Fermi-Hubbard Hamiltonian tensors in site basis.

```text theme={null}
H = -t * sum_{<i,j>,sigma} (c^dag_i c_j + h.c.) + U * sum_i n_up_i n_down_i
```

* **Parameters:**
  * **norb** (*int*) -- Number of spatial orbitals (lattice sites). Must be >= 2.
  * **t** (*float*) -- Hopping parameter (kinetic energy).
  * **U** (*float*) -- On-site interaction strength (potential energy).
  * **periodic** (*bool*) -- Whether to use periodic boundary conditions.
* **Returns:**
  (h1e, h2e) — one-body tensor shape (norb, norb) and
  two-body tensor shape (norb, norb, norb, norb).
* **Return type:**
  tuple\[*ndarray*, *ndarray*]

### haiqu.sdk.skqd.build\_hubbard\_site\_basis\_krylov\_circuits(norb, krylov\_dim, dt, h1e, h2e)

Build Krylov subspace circuits for the Hubbard model in site basis.

Generates `{|psi0>, e^{-iHdt}|psi0>, e^{-2iHdt}|psi0>, ...}` where
`|psi0>` is the antiferromagnetic Neel state and time evolution uses
a second-order Trotter decomposition with CPhase gates on all orbitals.

* **Parameters:**
  * **norb** (*int*) -- Number of spatial orbitals.
  * **krylov\_dim** (*int*) -- Dimension of the Krylov subspace
    (number of time-evolution steps + 1).
  * **dt** (*float*) -- Time step for Trotter evolution.
  * **h1e** (*ndarray*) -- One-body Hamiltonian tensor, shape (norb, norb).
  * **h2e** (*ndarray*) -- Two-body Hamiltonian tensor, shape (norb, norb, norb, norb).
* **Returns:**
  List of quantum circuits representing the Krylov subspace.
* **Return type:**
  list\[*QuantumCircuit*]
