Have you gotten the quest to rescue Zandalor from Arhu the cat? If so the door to the room with the gems should be open. If not, you should be able to leave the way you came in.
Did you get 2 cut scenes when you entered, one with someone saying the trap worked, and the other with the door being sealed? You can by bypass the locked door;
Teleporting Anywhere, via hex editor