The 3g can be unlocked 2 ways easily.
1 - turbosim, a little circuit that sits between the sim and phone and allows any sim to work. I've been running this method with t-mobile since jsut after the 3g launch. Never had any problems
2 - yellowsn0w, the iphone dev team recently released a software unlock for v2.2 3g phones. Ive been running the last 3 weeks with just a t-mobile sim and it works fine. Needs to be jailbroken, but thats well documented.
... and the 2.2 firmware is pre-activated so you can use itunes without it complaining about having a non-o2 sim.