Advanced analytical applications that will enable the smart grid need to analyze the connectivity of the power grid under multiple different operating scenarios, taking into account time-varying topology of the grid. This paper proposes a highly memory-efficient representation of the power grid that enables efficient construction of multiple topological and operational states in memory for high-performance graph analysis. The proposed representation exploits repeating patterns in the grid and uses a hierarchical graph as the core model. Time-varying topology and operational conditions are modeled as mapping functions on this hierarchical graph, so as to avoid construction of multiple graphs to represent multiple topologies. The efficiency and performance of the proposed representation is demonstrated on a large real-world distribution electrical grid.