  Electron spins in semiconductor devices are highly promising building blocks
for quantum processors (QPs). Commercial semiconductor foundries can create QPs
using the same processes employed for conventional chips, once the QP design is
suitably specified. There is a vast accessible design space; to identify the
most promising options for fabrication, one requires predictive modeling of
interacting electrons in real geometries and complex non-ideal environments. In
this work we explore a modelling method based on real-space grids, an ab initio
approach without assumptions relating to device topology and therefore with
wide applicability. Given an electrode geometry, we determine the exchange
coupling between quantum dot qubits, and model the full evolution of a
$\sqrt{\text{SWAP}}$ gate to predict qubit loss and infidelity rates for
various voltage profiles. Moreover we explore the impact of unwanted charge
defects (static and dynamic) in the environment, and test robust pulse
sequences. As an example we exhibit a sequence correcting both systematic
errors and (unknown) charge defects, observing an order of magnitude boost in
fidelity. The technique can thus identify the most promising device designs for
fabrication, as well as bespoke control sequences for each such device.
