1
$\begingroup$

How can the CNOT gate error between 2 qubits as shown on visual qubit coupling map on the IBMQ Dashboard be retrieved in Qiskit using the BackendProperties.gate_error method ?

I have been able to retrieve the U2 error rates as follows:

properties = backend.properties()
properties.gate_error('u2', 0) # u2 error rate for qubit-0
$\endgroup$
2
$\begingroup$

You can type the following:

provider = IBMQ.get_provider(hub='YOUR-HUB-NAME', group='YOUR-GROUP-NAME', project='YOUR-PROJECT_NAME')
provider.backends.backend

You should see an interactive widget with 5 tabs. Under the Multi-Qubit Gates tab, you can see the CNOT error rate between any two connected qubits on that given backend.

If you don't see the widget, import qiskit.tools.jupyter and then try to run the commands again.

$\endgroup$
0
$\begingroup$

Try this:

provider = IBMQ.get_provider(hub='YOUR-HUB-NAME', group='YOUR-GROUP-NAME', project='YOUR-PROJECT_NAME')
backend = provider.get_backend('ibmq_**your_device**') 
for gate_i in backend.properties().gates:
    print("{} gate on qubits {} error rate is {}{}".format(gate_i.name, gate_i.qubits, gate_i.parameters[0].value, gate_i.parameters[0].unit))

It should print out the list that you got from the Widget.

For instance, if you chose ibmq_quito then you have something like:

id0 gate on qubits [0] error rate is 0.00028412406225121944
id1 gate on qubits [1] error rate is 0.0005023912176917563
id2 gate on qubits [2] error rate is 0.000588676520188442
id3 gate on qubits [3] error rate is 0.000441966521247226
id4 gate on qubits [4] error rate is 0.0015240218468028444
rz0 gate on qubits [0] error rate is 0
rz1 gate on qubits [1] error rate is 0
rz2 gate on qubits [2] error rate is 0
rz3 gate on qubits [3] error rate is 0
rz4 gate on qubits [4] error rate is 0
sx0 gate on qubits [0] error rate is 0.00028412406225121944
sx1 gate on qubits [1] error rate is 0.0005023912176917563
sx2 gate on qubits [2] error rate is 0.000588676520188442
sx3 gate on qubits [3] error rate is 0.000441966521247226
sx4 gate on qubits [4] error rate is 0.0015240218468028444
x0 gate on qubits [0] error rate is 0.00028412406225121944
x1 gate on qubits [1] error rate is 0.0005023912176917563
x2 gate on qubits [2] error rate is 0.000588676520188442
x3 gate on qubits [3] error rate is 0.000441966521247226
x4 gate on qubits [4] error rate is 0.0015240218468028444
cx3_4 gate on qubits [3, 4] error rate is 0.02203610851266083
cx4_3 gate on qubits [4, 3] error rate is 0.02203610851266083
cx1_3 gate on qubits [1, 3] error rate is 0.009826995281347145
cx3_1 gate on qubits [3, 1] error rate is 0.009826995281347145
cx1_2 gate on qubits [1, 2] error rate is 0.01104062453060986
cx2_1 gate on qubits [2, 1] error rate is 0.01104062453060986
cx0_1 gate on qubits [0, 1] error rate is 0.009345544597316624
cx1_0 gate on qubits [1, 0] error rate is 0.009345544597316624
reset0 gate on qubits [0] error rate is 5920ns
reset1 gate on qubits [1] error rate is 5920ns
reset2 gate on qubits [2] error rate is 5920ns
reset3 gate on qubits [3] error rate is 5920ns
reset4 gate on qubits [4] error rate is 5920ns
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.