  We describe a space-time optimized circuit for the table lookup subroutine
from lattice-surgery surface code primitives respecting 2D grid connectivity.
Table lookup circuits are ubiquitous in quantum computing, allowing the
presented circuit to be used for applications ranging from cryptography to
quantum chemistry. Surface code is the leading approach to scalable
fault-tolerant quantum computing pursued by industry and academia. We abstract
away surface code implementation details by using a minimal set of operations
supported by the surface code via lattice-surgery. Our exposition is accessible
to a reader not familiar with surface codes and fault-tolerant quantum
computing.
