Post-processing
Learn how to implement post-processing and run the quantum Naive Bayes classifier.
We'll cover the following
We need to post-process the results we receive from the pqc
. If we set the hist
-parameter to False
, the pqc
function returns the counts. These are in a Python dictionary with two keys, '0'
and '1'
. The values assigned to these keys are the number of measurements that yielded the respective key. For instance, if we have shots and returned 1
, our result is {'0':209, '1':691}
.
If we have a single one-shot, we will get either {'0': 1}
or {'1': 1}
as counts. When we run our classifier, we want to get a distinct prediction for each passenger, so a single shot is sufficient.
Get hands-on with 1200+ tech skills courses.