Inverse design of digital nanophotonic devices using the adjoint method | Synapse