  We develop a numerical linked cluster expansion (NLCE) method that can be
applied directly to inhomogeneous systems, for example Hamiltonians with
disorder and dynamics initiated from inhomogeneous initial states. We
demonstrate the method by calculating dynamics for single-spin expectations and
spin correlations in two-dimensional spin models on a square lattice, starting
from a checkerboard state. We show that NLCE can give moderate to dramatic
improvement over an exact diagonalization of comparable computational cost, and
that the advantage in computational resources grows exponentially as the size
of the clusters included grows. Although the method applies to any type of
NLCE, our explicit benchmarks use the rectangle expansion. Besides showing the
capability to treat inhomogeneous systems, these benchmarks demonstrate the
rectangle expansion's utility out of equilibrium.
