quisp
quisp copied to clipboard
Count number of incorrect results in the graph state backend
In the error tracking backend (tracking deviations from Phi+ state Bell pairs), we have a way to count how many erroneous Bell pairs we got when performing tomography.
https://github.com/sfc-aqua/quisp/blob/79d417f7defe725ec84395e41d86067eb881cdd0/quisp/modules/QRSA/HardwareMonitor/HardwareMonitor.cc#L414-L424
Right now we only return clean_pair
from graph state backend (as shown below)
[[deprecated]] MeasurementOutcome GraphStateQubit::measureDensityIndependent() {
auto rand = backend->dblrand();
MeasurementOutcome o;
if (rand < ((double)1 / (double)3)) {
o.basis = 'X';
o.outcome_is_plus = this->localMeasureX() == EigenvalueResult::PLUS_ONE ? true : false;
} else if (rand < ((double)2 / (double)3)) {
o.basis = 'Z';
o.outcome_is_plus = this->localMeasureZ() == EigenvalueResult::PLUS_ONE ? true : false;
} else {
o.basis = 'Y';
o.outcome_is_plus = this->localMeasureY() == EigenvalueResult::PLUS_ONE ? true : false;
}
// the pi vector should be always [1,0,0,0,0,0], just for compatibility
o.GOD_clean = 'F';
return o;
}