simulate quantum circuits