  Checking whether two quantum circuits are approximately equivalent is a
common task in quantum computing. We consider a closely related identity check
problem: given a quantum circuit $U$, one has to estimate the diamond-norm
distance between $U$ and the identity channel. We present a classical algorithm
approximating the distance to the identity within a factor $\alpha=D+1$ for
shallow geometrically local $D$-dimensional circuits provided that the circuit
is sufficiently close to the identity. The runtime of the algorithm scales
linearly with the number of qubits for any constant circuit depth and spatial
dimension. We also show that the operator-norm distance to the identity
$\|U-I\|$ can be efficiently approximated within a factor $\alpha=5$ for
shallow 1D circuits and, under a certain technical condition, within a factor
$\alpha=2D+3$ for shallow $D$-dimensional circuits. A numerical implementation
of the identity check algorithm is reported for 1D Trotter circuits with up to
100 qubits.
