A balanced ternary 2-9 decoder based on terahertz metasurface and its sensing applications | Synapse