We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When gate is controlled by classical register, measurement gives correct results, but probabilities and state vector are not correct.
Example circuit:
OPENQASM 2.0; include "qelib1.inc"; qreg q[2]; creg c[1]; h q[0]; measure q[0] -> c[0]; if(c==1) x q[1];
Result of measurement is correct: [0, 0] or [1, 1]
[0, 0]
[1, 1]
Probabilities are wrong:
[0.5, 0] or [0.5, 1]
[0.5, 0]
[0.5, 1]
Expected is:
[0, 0] or [1, 1]
State is wrong. It returns:
0.70710680+0.00000000i|00> 50.00000% 0.70710680+0.00000000i|10> 50.00000%
OR
0.70710680+0.00000000i|11> 50.00000% 0.70710680+0.00000000i|10> 50.00000%
But expected is:
0.70710680+0.00000000i|00> 100.00000%
0.70710680+0.00000000i|11> 100.00000%
The text was updated successfully, but these errors were encountered:
aa346d0
Merge pull request #5 from dmvjs/ke/fix-errors-and-warnings
62ecb4d
fix errors and warnings and apply formatting
No branches or pull requests
When gate is controlled by classical register, measurement gives correct results, but probabilities and state vector are not correct.
Example circuit:
Result of measurement is correct:
[0, 0]
or[1, 1]
Probabilities are wrong:
[0.5, 0]
or[0.5, 1]
Expected is:
[0, 0]
or[1, 1]
State is wrong. It returns:
OR
But expected is:
OR
The text was updated successfully, but these errors were encountered: