My problem with this question is that it implies that torturing humans is wrong. The problem with that is where do you draw the line?
Is it wrong to torture a terrorist who has hidden the safety key on a device that will kill millions of people if it's not found?
Is it wrong to smack a child who's just been found putting a pillow over the face of his baby sister?
These are not simple questions to answer and require more precision around the difference between torture, punishment, coercion and consequence. This is IMHO the fundamental paradox we have yet to address in the debate on human rights; the people who most benefit from these rules are the ones most willing to violate them. Still I digress...
Let's talk AI instead.
The single biggest misconception around AI is that the concepts of Awareness, Consiousness and Liveness are related. They're not. For the sake of brevity I'll not get into the details and semantics about this but computers aren't alive.
The next biggest misconception is that because a computer prints output on a screen that looks insightful, that the computer is itself insightful. This is largely based on the Turing Test, which is nothing more than a 'double-blind' experiment at its core. The real test of intelligence is not output, it's the thought processes that led to that output.
Finally (for the scope of this discussion at least) torture is not an intellectual activity. It's designed specifically to bypass reason and intellect, and emotion, and attack directly at the instincts of a person. The theory of this is to force a person to descend down the ladder of Maslow's Hierarchy of Needs to a point where the intellectual imperative to protect information or refuse to do something is overridden by the body's more immediate need for survival.
Computers just don't work that way.
I could get into the physiological aspects of this but it would be out of scope. The point is that a computer operates purely on what we would call the rational plane; even if it's aware, even if it's self-aware, even if it's conscious, it doesn't feel pain and it doesn't have a survival 'instinct' that torture would reduce it to in order achieve a sense of duress. In this sense, the question of whether or not torturing an AI is ethical is irrelevant because it can't actually be done.
Why I still think that interacting with an AI in a manner that would simulate torture is a bad idea has nothing to do with the AI and everything to do with the interrogator. This activity could serve to (especially among the lower orders) desensitise people to the torture of real people. If you believe that torturing people is unethical, then 'torturing' an AI must by extension be unethical as it can only serve to train a person to be more resistant to the moral discomfort that doing this to another human being generates within the interrogator.