move gates into their own directory

fix associated tests
fix broken measure quantum circuit test