Skip to content

Count number of incorrect results in the graph state backend #481

Open
@Naphann

Description

@Naphann

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.

tomography_stats << this_node->getFullName() << "<-->QuantumChannel{cost=" << link_cost << ";distance=" << dis << "km;fidelity=" << fidelity
<< ";bellpair_per_sec=" << tomography_runningtime_holder[qnic][partner_address].Bellpair_per_sec
<< ";tomography_time=" << tomography_runningtime_holder[qnic][partner_address].tomography_time
<< ";tomography_measurements=" << tomography_runningtime_holder[qnic][partner_address].tomography_measurements << ";actual_meas=" << meas_total
<< "; GOD_clean_pair_total=" << GOD_clean_pair_total << "; GOD_X_pair_total=" << GOD_X_pair_total << "; GOD_Y_pair_total=" << GOD_Y_pair_total
<< "; GOD_Z_pair_total=" << GOD_Z_pair_total << ";}<-->" << partner_node->getFullName() << "; F=" << fidelity << "; X=" << Xerr_rate << "; Z=" << Zerr_rate
<< "; Y=" << Yerr_rate << endl;
// this is a temporary implementation so that the e2e-test can read fidelity and error rates
std::cout << this_node->getFullName() << "<-->QuantumChannel{cost=" << link_cost << ";distance=" << dis << "km;fidelity=" << fidelity
<< ";bellpair_per_sec=" << tomography_runningtime_holder[qnic][partner_address].Bellpair_per_sec << ";}<-->" << partner_node->getFullName()
<< "; Fidelity=" << fidelity << "; Xerror=" << Xerr_rate << "; Zerror=" << Zerr_rate << "; Yerror=" << Yerr_rate << endl;

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    physicalerror models, simulation of new hardware elementstomographyfull tomo, CHSH, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions