message: Added a simple test to use the XACC's noise model with Aer
diff: @@ -18,6 +18,40 @@ TEST(AerNoiseModelTester, checkSimple) {
  }
  }
  +TEST(AerNoiseModelTester, checkNoiseModelJson) {
  + auto noiseModel = xacc::getService<xacc::NoiseModel>("IBM");
  + noiseModel->initialize({{"backend", "ibmq_ourense"}});
  + // There are 5 qubits.
  + EXPECT_EQ(noiseModel->readoutErrors().size(), 5);
  + const std::string noiseJson = noiseModel->toJson();
  + std::cout << "JSON:\n" << noiseJson << "\n";
  +
  + // Load the *toJson()* noise model to Aer
  + auto accelerator = xacc::getAccelerator(
  + "aer", {{"noise-model", noiseJson}, {"shots", 8192}});
  +
  + auto xasmCompiler = xacc::getCompiler("xasm");
  + auto program = xasmCompiler
  + ->compile(R"(__qpu__ void testBell(qbit q) {
  + H(q[0]);
  + CNOT(q[0],q[1]);
  + Measure(q[0]);
  + Measure(q[1]);
  + })",
  + accelerator)
  + ->getComposite("testBell");
  +
  + auto buffer = xacc::qalloc(2);
  + accelerator->execute(buffer, program);
  + buffer->print();
  + // Must have some errors
  + EXPECT_GT(buffer->computeMeasurementProbability("10"), 0.01);
  + EXPECT_GT(buffer->computeMeasurementProbability("01"), 0.01);
  + // Majority is still Bell state:
  + EXPECT_GT(buffer->computeMeasurementProbability("00"), 0.4);
  + EXPECT_GT(buffer->computeMeasurementProbability("11"), 0.4);
  +}
  +
  int main(int argc, char **argv) {
  xacc::Initialize();
  