Unlocking an iphone?

<p>Has anyone here unlocked an iphone for use on t-mobile? If so, was it difficult to do and is it permanent in that it will remain unlocked after updating?</p>