2
$\begingroup$

I am trying to run following 6 qubit quantum circuit and I am getting different results under ibmq_qasm_simulator and ibmq_16_melbourne (both involving 8192 shots). What is the reason?

ibmq_qasm_simulator :: ibmq_qasm_simulator

ibmq_16_melbourne :: enter image description here

OPENQASM 2.0;
include "qelib1.inc";

qreg q[6];
creg c[6];

ry(1.57079631679) q[0];
ry(1.57079631679) q[1];
ry(1.57079631679) q[2];
ry(1.57079631679) q[3];
ry(1.57083295585) q[4];
ry(1.98263774407) q[5];
cx q[0],q[1];
ry(-0.00000001000) q[1];
cx q[0],q[1];
cx q[1],q[2];
ry(-0.00000001000) q[2];
cx q[0],q[2];
ry(-0.00000001000) q[2];
cx q[1],q[2];
ry(-0.00000001000) q[2];
cx q[0],q[2];
cx q[2],q[3];
ry(-0.00000001000) q[3];
cx q[1],q[3];
ry(-0.00000001000) q[3];
cx q[2],q[3];
ry(-0.00000001000) q[3];
cx q[0],q[3];
ry(-0.00000001000) q[3];
cx q[2],q[3];
ry(-0.00000001000) q[3];
cx q[1],q[3];
ry(-0.00000001000) q[3];
cx q[2],q[3];
ry(-0.00000001000) q[3];
cx q[0],q[3];
cx q[3],q[4];
ry(0.00003662905) q[4];
cx q[2],q[4];
ry(0.00003662905) q[4];
cx q[3],q[4];
ry(0.00003662905) q[4];
cx q[1],q[4];
ry(0.00003662905) q[4];
cx q[3],q[4];
ry(0.00003662905) q[4];
cx q[2],q[4];
ry(0.00003662905) q[4];
cx q[3],q[4];
ry(0.00003662905) q[4];
cx q[0],q[4];
ry(0.00003662905) q[4];
cx q[3],q[4];
ry(0.00003662905) q[4];
cx q[2],q[4];
ry(-0.78523504324) q[4];
cx q[3],q[4];
ry(-0.78523504324) q[4];
cx q[1],q[4];
ry(0.78530830134) q[4];
cx q[3],q[4];
ry(-0.78523504324) q[4];
cx q[2],q[4];
ry(0.00003662905) q[4];
cx q[3],q[4];
ry(0.00003662905) q[4];
cx q[0],q[4];
cx q[4],q[5];
ry(0.17720720528) q[5];
cx q[3],q[5];
ry(0.17720720528) q[5];
cx q[4],q[5];
ry(0.01914233557) q[5];
cx q[2],q[5];
ry(0.01914233557) q[5];
cx q[4],q[5];
ry(-0.21549187642) q[5];
cx q[3],q[5];
ry(0.17720720528) q[5];
cx q[4],q[5];
ry(0.01914233557) q[5];
cx q[1],q[5];
ry(0.01914233557) q[5];
cx q[4],q[5];
ry(0.17720720528) q[5];
cx q[3],q[5];
ry(-0.21549187642) q[5];
cx q[4],q[5];
ry(0.01914233557) q[5];
cx q[2],q[5];
ry(-0.76625582782) q[5];
cx q[4],q[5];
ry(0.17720720528) q[5];
cx q[3],q[5];
ry(0.17720720528) q[5];
cx q[4],q[5];
ry(-0.37355674613) q[5];
cx q[0],q[5];
ry(0.21549187642) q[5];
cx q[4],q[5];
ry(-0.01914233557) q[5];
cx q[3],q[5];
ry(-0.01914233557) q[5];
cx q[4],q[5];
ry(-0.17720720528) q[5];
cx q[2],q[5];
ry(-0.17720720528) q[5];
cx q[4],q[5];
ry(0.37355674613) q[5];
cx q[3],q[5];
ry(-0.80454049897) q[5];
cx q[4],q[5];
ry(-0.17720720528) q[5];
cx q[1],q[5];
ry(-0.17720720528) q[5];
cx q[4],q[5];
ry(-0.01914233557) q[5];
cx q[3],q[5];
ry(-0.41184141727) q[5];
cx q[4],q[5];
ry(-0.17720720528) q[5];
cx q[2],q[5];
ry(-0.17720720528) q[5];
cx q[4],q[5];
ry(-0.01914233557) q[5];
cx q[3],q[5];
ry(-0.01914233557) q[5];
cx q[4],q[5];
ry(0.21549187642) q[5];
cx q[0],q[5];
measure q[0] -> c[5];
measure q[1] -> c[4];
measure q[2] -> c[3];
measure q[3] -> c[2];
measure q[4] -> c[1];
measure q[5] -> c[0];
$\endgroup$

2 Answers 2

6
$\begingroup$

The problem is caused by depth of the circuit. Current quantum hardware is not as developed as would be needed to run your algorihtm. Try to implement 2 or 3 qubits state preparation and you will se that results are more similar to the simulator ones.

Moreover, qubits are not connected each other (this is not the case on the simulator), therefore, a transpiler have to apply qubit swaps (additional 3 CNOT gates) to implement the circuit on real hardware. This increases depth of the circuit as well and leads to further decoherence.

$\endgroup$
2
$\begingroup$

The brief answer would be, due to the introduced noise on a real quantum device.

Simulators are nothing but a classical implementation/simulation of a quantum device. On a simulator, you can define arbitrary qubit connectivity, noise model, and adjust the noise strength. But by default, a simulator runs without noise.

Typically the two main sources of noise, on a real device, are gate-infidelity and decoherence.

On a real device, over time the effect of decoherence gets higher. So the depth of the circuit plays always a role. Higher depth, higher noise! In addition, each qubit has its own decoherence rate, so depending on which combination of qubits you've used, you'll get different measurement results.

In order to understand gate fidelity, you have to know the difference between a physical(native) gate and a logical (software-visible) gate. When you are implementing on an IBM device, you'd have the following gate set to use in your circuit: {I,X,Y,Z,H,S,S†,T,T†,U1(λ),U2(λ,φ),U3(λ,φ,θ),CNOT}. Any gate you use, will be translated into products of three physical gates,{U1(λ), RX (π/2), CNOT} in the hardware level. So gate infidelity refers to the fact that the software gate does not precisely map (implement) to the physically implemented gate.

It is worth mentioning, that even running the same circuit on different IBM Q topologies (real device topologies) would result in different readout errors!

You can find some details in this article: Full-Stack, Real-System Quantum Computer Studies: Architectural Comparisons and Design Insights

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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