This was done using Linux. There's no reason it won;t work with a Mac, or Windows if the correct driver can be found.
This might just ruin your Nexus Q. Know that before you start.
Install Android SDK
Download fastboot binary for your system
Download the attached unsecure boot image. Unzip it and extract the NQ_insecure_boot.img file
Set up your Nexus Q
Using the app, turn on USB debugging
Plug it into your computer via the USB connection
run adb reboot-bootloader to boot into fastboot
run fastboot devices to make sure you see the NQ
run fastboot oem unlock
count to three, then run fastboot oem unlock_accept
Your Q will erase, then reboot unlocked.
Set it back up wth your Android phone again, and turn debugging back on.