src/framework/operations.hpp
// Raise an exception if qubits list contains duplications
Raise an exception if qubits list contains duplications
Raise an exception if qubits list contains duplications
inline void check_duplicate_qubits(const Op &op) {
  auto cpy = op.qubits;
  std::unique(cpy.begin(), cpy.end());
  if (cpy != op.qubits)
    throw std::invalid_argument("Invalid qobj \"" + op.name + 
                                "\" instruction (\"qubits\" are not unique)");
}
inline void check_duplicate_qubits ( const Op & op ) { auto cpy = op . qubits ; std :: unique ( cpy . begin ( ) , cpy . end ( ) ) ; if ( cpy != op . qubits ) throw std :: invalid_argument ( " \" " + op . name + " \" \" \" " ) ; }
Raise an exception if qubits list contains duplications
Raise an exception if qubits list contains duplications