  A search for new phenomena in events with two same-charge leptons or three
leptons and jets identified as originating from $b$-quarks in a data sample of
36.1 fb$^{-1}$ of $pp$ collisions at $\sqrt{s}= 13$ TeV recorded by the ATLAS
detector at the Large Hadron Collider is reported. No significant excess is
found and limits are set on vector-like quark, four-top-quark, and same-sign
top-quark pair production. The observed (expected) 95% CL mass limits for a
vector-like $T$- and $B$-quark singlet are $m_T > 0.98$ $(0.99)$ TeV and $m_B >
1.00$ $(1.01)$ TeV respectively. Limits on the production of the vector-like
$T_{5/3}$-quark are also derived considering both pair and single production;
in the former case the lower limit on the mass of the $T_{5/3}$-quark is
(expected to be) 1.19 (1.21) TeV. The Standard Model four-top-quark production
cross-section upper limit is (expected to be) 69 (29) fb. Constraints are also
set on exotic four-top-quark production models. Finally, limits are set on
same-sign top-quark pair production. The upper limit on $uu \to tt$ production
is (expected to be) 89 (59) fb for a mediator mass of 1 TeV, and a dark-matter
interpretation is also derived, excluding a mediator of 3 TeV with a
dark-sector coupling of 1.0 and a coupling to ordinary matter above 0.31.
