0
$\begingroup$

I have downloaded a job from the COMPOSER JOBS but I get a folder containing three files.

  1. 632867a95ccea778be9446fb-info.json
  2. 632867a95ccea778be9446fb-input.json
  3. 632867a95ccea778be9446fb-output.json

Is there any python code to load my job (from one of these files) and extract my result from it?

$\endgroup$

1 Answer 1

1
$\begingroup$

Result class supports loading experiment result data from a dictionary. So, all what you need is to load the output file as any json file then pass its contents to Result.from_dict() method:

import json
from qiskit.result import Result

f = open('path/to/output-file.json')
data = json.load(f)

result = Result.from_dict(data)
print(result.get_counts())
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.