I have run a program on an IBM quantum experience machine which involves 5 qubits. Obviously when I measure the whole system I have 32 results but the machine only represents 20 in the histogram. In this situation the program tells you to download the results. The problem is that when I pick "Download PNG" or "Download SVG" it continues to show me a 20 results histogram. There is another option that is to pick "Download results" but it downloads two .json documents which I'm not sure I know how to change into a histogram.


1 Answer 1


By clicking on Downloand you get two .json files as you mentioned. The results are saved in the file with suffix results.

When you open the file in Notepad or any other text editor, you can find results in this form:


States which are described by binary numbers in the graph on the result page in IBM Q interface are here described by hexadecimal numbers and showed together with number of occurences, for example:


This means that value $13_{16}=19_{10}=10011_2$ occured 32 times.

You can extract these data from .json file manually, change hexadecimal numbers to binary and plot a histogram. For example, you can do it in Excel - hexadecimal numbers can be converted to binary ones with function HEX2BIN and then you can use bar graph instead of histogram.

  • 3
    $\begingroup$ It's much easier to convert hexadecimal directly to binary rather than going through decimal. Each hexadecimal digit expands into four binary digits, e.g. 3 becomes 0011. $\endgroup$
    – CJ Dennis
    Feb 27, 2020 at 22:56
  • $\begingroup$ @CJDennis: Yes, you are right. I have just shown an example and in Excel I used HEX2BIN function, of course. $\endgroup$ Feb 28, 2020 at 5:41

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.