You may not be able to get your hands on a Sony Xperia Z quite yet as it is just starting to trickle out to some international markets, but when you do, instructions are already available for those who want to root their new device before doing anything else. Gaining root access has been accomplished by XDA forum member DoomLoRD using a modified root file he had for a Google Nexus 4. After some modifications, and with the assistance of some other developers, the new file for the Xperia Z is ready. If you hit the source link for access to the necessary files and instructions, you might note that DoomLoRD achieved this remotely as he does not yet have the device himself.
If you do get an Xperia Z and want to go down the root path, keep in mind you are taking some risks in unlocking the bootloader and flashing a new kernel on your device.
source: XDA Developers Forum