[2308.08539] Constant-depth circuits for Boolean functions and quantum memory devices using multi-qubit gates