Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.ignis.verification.calculate_1q_epc

calculate_1q_epc(gate_per_cliff, epg_1q, qubit)

GitHub

Convert error per gate (EPG) into error per Clifford (EPC) of single qubit basis gates.

Given that we know the number of gates per Clifford NiN_i and those EPGs, we can predict EPC of that RB sequence:

EPC=1i(1EPGi)NiEPC = 1 - \prod_i \left( 1 - EPG_i \right)^{N_i}

To run this function, you need to know EPG of every single qubit basis gates. For example, when you prepare 1Q RB experiment with appropriate error model, you can define EPG of those basis gate set. Then you can estimate the EPC of prepared RB sequence without running experiment.

import qiskit.ignis.verification.randomized_benchmarking as rb
 
# gate counts of your 1Q RB experiment
gpc = {0: {'cx': 0, 'u1': 0.13, 'u2': 0.31, 'u3': 0.51}}
 
# EPGs from error model
epgs_q0 = {'u1': 0, 'u2': 0.001, 'u3': 0.002}
 
# calculate 1Q EPC
epc = rb.rb_utils.calculate_1q_epc(
    gate_per_cliff=gpc,
    epg_1q=epgs_q0,
    qubit=0)
 
print(epc)
0.0013302908430798954

Parameters

  • gate_per_cliff (Dict[int, Dict[str, float]]) – dictionary of gate per Clifford. see gates_per_clifford().
  • epg_1q (Dict[str, float]) – EPG of single qubit gates estimated by error model.
  • qubit (int) – index of qubit to calculate EPC.

Return type

float

Returns

EPG of 2Q gate.

Raises

QiskitError – when specified qubit is not included in the gate count dictionary

Was this page helpful?
Report a bug or request content on GitHub.