cunqa.result
Contains the Result class, which holds the output of the executions.
Once we have submmited a QJob, for obtaining its results we call for its
property result:
>>> qjob.result
<cunqa.result.Result object at XXXX>
This object has two main attributes of interest: the counts distribution from the simulation and the time that the simulation took in seconds:
>>> result = qjob.result
>>> result.counts
{'000':34, '111':66}
>>> result.time_taken
0.056
- class Result(result, circ_id, registers)
Class to describe the result of a simulation.
There are two main attributes,
Result.countsandResult.time_taken, common to every simulator available on the backends.Nevertheless, depending on the simulator used, more output data is provided. For checking all the information from the simulation as adict, one can access the attributeResult.result.- Parameters:
result (dict)
circ_id (str)
registers (dict)
- counts
Counts distribution from the sampling of the simulation, format is
{"<bit string>":<number of counts as int>}.>>> result.counts {'000':34, '111':66}
Note
If the circuit sent has more than one classical register, bit strings corresponding to each one of them will be separated by blank spaces in the order they were added:
>>> result.counts {'001 11':23, '110 10':77}
- time_taken
Time that the simulation took in seconds, since it is received at the virtual QPU until it is finished.
>>> result.time_taken 0.056
- result
Dictionary with the whole output of the simulation. This output is presented as the raw product of the simulation, and so the
dictformat depends on the simulator used.