Instead, I believe you might get some fraction of those exceptional programmers to come to America; but you would probably get many more less-than-exceptional programmers (which pg called competent) competing with less-than-exceptional, but competent Americans (or those who could be trained to be competent).
On balance, I'm unconvinced this would help.
Potentially, instead of having a lottery, the government should just run a dutch auction for the same sized quota. If someone is truly exceptional, it would be worth paying for them. You'd also end up naturally giving American programmers a bit of a home-field advantage; because their cost would not be burdened with the additional cost of winning an auction.