TransWikia.com

Why I am not getting approximate equiprobable states in the following circuit on IBM Q simulator?

Quantum Computing Asked on January 1, 2022

I have the following circuit which consists of symmetric modules. I compiled the circuit in IBM Quantum experience backend – ibmq_qasm_simulator, 8192 shots. The result is not equiprobable. Why? Since this is not a real machine ideally I should get same probability of 16.67%.

figure
results

OPENQASM 2.0;
include "qelib1.inc";

qreg qA[8];
qreg qB[8];
qreg qC[6];
qreg qD[6];
creg c[4];

h qA[2];
h qA[4];
x qA[6];
x qA[7];
x qB[1];
h qB[2];
h qB[4];
x qB[6];
x qB[7];
h qC[0];
h qC[2];
x qC[4];
x qC[5];
h qD[0];
h qD[2];
x qD[4];
x qD[5];
cx qA[2],qA[3];
cx qA[4],qA[5];
h qA[6];
cx qB[2],qB[3];
cx qB[4],qB[5];
h qB[6];
cx qC[0],qC[1];
cx qC[2],qC[3];
h qC[4];
cx qD[0],qD[1];
cx qD[2],qD[3];
h qD[4];
cx qA[6],qA[7];
cx qB[6],qB[7];
cx qC[4],qC[5];
cx qD[4],qD[5];
x qA[0];
ccx qA[6],qA[0],qA[4];
ccx qB[6],qB[0],qB[4];
ccx qA[7],qA[1],qA[5];
ccx qB[7],qB[1],qB[5];
x qA[6];
x qA[7];
x qB[6];
x qB[7];
ccx qA[6],qA[0],qA[2];
ccx qB[6],qB[0],qB[2];
ccx qA[7],qA[1],qA[3];
ccx qB[7],qB[1],qB[3];
cx qA[2],qA[3];
cx qA[4],qA[5];
cx qB[2],qB[3];
cx qB[4],qB[5];
ccx qA[3],qC[4],qC[2];
ccx qB[3],qC[5],qC[3];
x qC[4];
x qC[5];
ccx qA[3],qC[4],qC[0];
id qA[5];
ccx qB[3],qC[5],qC[1];
id qA[5];
cx qC[0],qC[1];
cx qC[2],qC[3];
ccx qA[5],qD[4],qD[2];
ccx qB[5],qD[5],qD[3];
x qD[4];
x qD[5];
ccx qA[5],qD[4],qD[0];
ccx qB[5],qD[5],qD[1];
cx qD[0],qD[1];
cx qD[2],qD[3];
measure qC[1] -> c[3];
measure qC[3] -> c[2];
measure qD[1] -> c[1];
measure qD[3] -> c[0];

One Answer

enter image description hereYou might have an issue in your circuit. I believe the first X gate on line qB1 should actually be on line qB0 to be symmetric with the upper block.

Maybe you can also try to move those X gates just before the two controlled gates as they act on the first and third qubit you measure but not on the second and fourth ones (in descending order).

Answered by nathan raynal on January 1, 2022

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP