def generate_ground_truth(self, transpiled_result, filename):
    "Generates the expected result into a file.\n\n        Checks if transpiled_result matches self.counts by running in a backend\n        (self.create_backend()). That's saved in a QASM in filename.\n\n        Args:\n            transpiled_result (DAGCircuit): The DAGCircuit to execute.\n            filename (string): Where the QASM is saved.\n        "
    sim_backend = self.create_backend()
    job = execute(transpiled_result, sim_backend, seed_simulator=self.seed_simulator, seed_transpiler=self.seed_transpiler, shots=self.shots)
    self.assertDictAlmostEqual(self.counts, job.result().get_counts(), delta=self.delta)
    transpiled_result.qasm(formatted=False, filename=filename)
Generates the expected result into a file.

Checks if transpiled_result matches self.counts by running in a backend
(self.create_backend()). That's saved in a QASM in filename.

Args:
    transpiled_result (DAGCircuit): The DAGCircuit to execute.
    filename (string): Where the QASM is saved.
def generate_ground_truth(self, transpiled_result, filename):
    "Generates the expected result into a file.\n\n        Checks if transpiled_result matches self.counts by running in a backend\n        (self.create_backend()). That's saved in a QASM in filename.\n\n        Args:\n            transpiled_result (DAGCircuit): The DAGCircuit to execute.\n            filename (string): Where the QASM is saved.\n        "
    sim_backend = self.create_backend()
    job = execute(transpiled_result, sim_backend, seed_simulator=self.seed_simulator, seed_transpiler=self.seed_transpiler, shots=self.shots)
    self.assertDictAlmostEqual(self.counts, job.result().get_counts(), delta=self.delta)
    transpiled_result.qasm(formatted=False, filename=filename)