Lewis Hamilton will start from the front of the grid for the first time as a Ferrari driver after topping Sprint Qualifying at the Chinese Grand Prix.