Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Naphann opened this issue Jan 26, 2023 · 0 comments
Open

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

Naphann opened this issue Jan 26, 2023 · 0 comments
Labels
physical error models, simulation of new hardware elements tomography full tomo, CHSH, etc.

Comments

@Naphann
Copy link
Contributor

Naphann commented Jan 26, 2023

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;
}
@Naphann Naphann added tomography full tomo, CHSH, etc. physical error models, simulation of new hardware elements labels Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
physical error models, simulation of new hardware elements tomography full tomo, CHSH, etc.
Projects
None yet
Development

No branches or pull requests

1 participant