It's unlocked, but the radio only supports the ATT 3G frequencies in the US, so it's effectively locked in to ATT unless you want to use EDGE for everything on T-Mobile.
Keep in mind that T-Mobile's 3G frequencies are the 'standard' ones internationally. Though, IIRC Telus (Canada) and maybe Rogers (also Canada) share the same non-standard 3G frequency as AT&T.