A quantum computer emulator