Qatar Petroleum has signed a deal with TotalEnergies to come on board three deep-water exploration blocks offshore South Africa.