not via software but your provider may unlock it for you
i am with o2-UK, filled out a form online, and they unlocked my iphone 4 a few days later.
You have to be on a contract but I think thats the only stipulation, as I bought a pay as you go iphone 4, and had a different phone on my contract.
Either way its unlocked and not jailbroken