If i unlock a virgin mobile iphone 4s and take it to tmobile would they accept it?

Or is it illegal to unlock it my whole family wants to switch to tmobile and my mom would not switch me unless they accept the iphone 4s i have wich is virgin mobile

Unless you perform the unlock completely by yourself (manually programming the phone), it is currently illegal to unlock a phone without going through the carrier that the phone is locked to. Virgin Mobile will not unlock any of their phones, so, going to a third party (or using a third party kit) to unlock the phone is illegal, under the federal DMCA laws.