I believe these trains are only in France (SNCF, not Eurostar) and tickets are bought in conjunction with UA or AA flights. By extrapolation, I assume you also have to take a connecting flight to earn miles.
You can earn UA miles for taking Eurostar, but only in the 'partner' miles category.