We study the topologically twisted index of 3d $$ \mathcal{N} $$
N
= 2 supersymmetric gauge theories with unitary gauge groups. We implement a Gröbner basis algorithm for computing the Σg× S1 index explicitly and exactly in terms of the associated Bethe ideal, which is defined as the algebraic ideal associated with the Bethe equations of the corresponding 3d A-model. We then revisit recently discovered infrared dualities for unitary SQCD with gauge group U(Nc)k,k+lNc with l ≠ 0, namely the Nii duality that generalises the Giveon-Kutasov duality, the Amariti-Rota duality that generalises the Aharony duality, and their further generalisations in the case of arbitrary numbers of fundamental and antifundamental chiral multiplets. In particular, we determine all the flavour Chern-Simons contact terms needed to make these dualities work. This allows us to check that the twisted indices of dual theories match exactly. We also initiate the study of the Witten index of unitary SQCD with l ≠ 0.