  We construct a model of quantum gravity in which dimension, topology and
geometry of spacetime are dynamical. The microscopic degree of freedom is a
real rectangular matrix whose rows label internal flavours, and columns label
spatial sites. In the limit that the size of the matrix is large, the sites can
collectively form a spatial manifold. The manifold is determined from the
pattern of entanglement present across local Hilbert spaces associated with
column vectors of the matrix. With no structure of manifold fixed in the
background, the spacetime gauge symmetry is generalized to a group that
includes diffeomorphism in arbitrary dimensions. The momentum and Hamiltonian
that generate the generalized diffeomorphism obey a first-class constraint
algebra at the quantum level. In the classical limit, the constraint algebra of
the general relativity is reproduced as a special case. The first-class nature
of the algebra allows one to express the projection of a quantum state of the
matrix to a gauge-invariant state as a path integration of dynamical variables
that describe collective fluctuations of the matrix. The collective variables
describe dynamics of emergent spacetime, where multi-fingered times arise as
Lagrangian multipliers that enforce the gauge constraints. If the quantum state
has a local structure of entanglement, a smooth spacetime with well-defined
dimension, topology, signature and geometry emerges at the saddle-point, and
the spin two mode that determines the geometry can be identified. We find a
saddle-point solution that describes a series of (3+1)-dimensional de
Sitter-like spacetimes with the Lorentzian signature bridged by Euclidean
spaces in between. Fluctuations of the collective variables are described by
bi-local fields that propagate in the spacetime set up by the saddle-point
solution.
