Skip to content
New issue

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

Classical bit string in strange format for real device. #5

Closed
quantumjim opened this issue May 11, 2017 · 3 comments · Fixed by #430
Closed

Classical bit string in strange format for real device. #5

quantumjim opened this issue May 11, 2017 · 3 comments · Fixed by #430
Assignees
Labels
bug Something isn't working on hold Can not fix yet

Comments

@quantumjim
Copy link
Member

I have a three bit classical register and receive a 5 bit string as output. This always seems to include two bit that are always 0, but they aren't always in the same place. I cannot determine the logic behind it.

I think it related to, but not exactly the same as, this issue
#2

More info can be found in my post to the QX community
https://quantumexperience.ng.bluemix.net/qstage/#/community/question?questionId=3fde5ace6866eb41eba24fae2ce4dce3

@jaygambetta
Copy link
Member

@decodoku yeah its the same error the real device returns 5 bits and the order is q4,q3,q2,q1,q0 so if your using only the first three the first two bits will be zero.

@jaygambetta
Copy link
Member

jaygambetta commented May 12, 2017

Sorry for not reading your post in full before commenting above.

From the example your posted on the qx community. I see you ran two circuits

OPENQASM 2.0;
include "qelib1.inc";
qreg q[5];
creg c[3];
u3( 1.0 * pi,0,0) q[1];
measure q[1] -> c[0];
measure q[2] -> c[1];
measure q[3] -> c[2];

giving results

{'01011': 61, '01000': 1, '01010': 3, '00001': 72, '00011': 789, '01001': 6, '00000': 3, '00010': 89}

and

OPENQASM 2.0;
include "qelib1.inc";
qreg q[5];
creg c[3];
u3( 0.5 * pi,0,0) q[1];
measure q[0] -> c[0];
measure q[1] -> c[1];
measure q[2] -> c[2];

{'00110': 1, '01010': 251, '01000': 273, '00100': 1, '01100': 1, '00000': 255, '00010': 242}

The current bug is if both of these are run separately then in the first one the qubit 1 and 4 should default to zero and in the second one qubit 3 and 4 should be zero. If run together (in a batch) only qubit 4 will be zero as in the batching we insert measurements that have been declared in any circuit. We have described this somewhere (i forget at the moment). So i agree it is not the same as outline in #2 but its the same bug.

So in summary the bugs in the measurement are

  1. it defaults the classical register to the qubit label.
  2. in a batch all the circuits that have a measurement sets all circuits to measure these qubits.

I think both of these describe your errors and both we are working to fix. Please let me know if you are observing something different to this and once again thanks for using our device.

@jaygambetta jaygambetta added bug Something isn't working duplicate and removed duplicate labels May 12, 2017
@1ucian0 1ucian0 added the on hold Can not fix yet label Feb 5, 2018
@1ucian0
Copy link
Member

1ucian0 commented Feb 5, 2018

This is a limitation of the current architecture backend and depends on the release of 0.5, when qobj is integrated. Therefore, I'm tagging this issue with "on hold".

ajavadia referenced this issue in ajavadia/qiskit Mar 28, 2018
* new dependencies target (make depend) for the qasm-simulator-cpp

(cherry picked from commit 3b25390)

* changed to executable and bug fix

(cherry picked from commit ce8be89)

* assume yes for automatic pkg install

(cherry picked from commit 2cd7607)

* -march not supported on ppc64le. Use -mcpu instead

(cherry picked from commit 7cdab8f)

* bugfix

(cherry picked from commit 831692e)
ajavadia referenced this issue in ajavadia/qiskit Apr 6, 2018
* new dependencies target (make depend) for the qasm-simulator-cpp

(cherry picked from commit 3b25390)

* changed to executable and bug fix

(cherry picked from commit ce8be89)

* assume yes for automatic pkg install

(cherry picked from commit 2cd7607)

* -march not supported on ppc64le. Use -mcpu instead

(cherry picked from commit 7cdab8f)

* bugfix

(cherry picked from commit 831692e)
ajavadia referenced this issue in ajavadia/qiskit Apr 12, 2018
* new dependencies target (make depend) for the qasm-simulator-cpp

(cherry picked from commit 3b25390)

* changed to executable and bug fix

(cherry picked from commit ce8be89)

* assume yes for automatic pkg install

(cherry picked from commit 2cd7607)

* -march not supported on ppc64le. Use -mcpu instead

(cherry picked from commit 7cdab8f)

* bugfix

(cherry picked from commit 831692e)
atilag pushed a commit that referenced this issue Apr 14, 2018
* new dependencies target (make depend) for the qasm-simulator-cpp

(cherry picked from commit 3b25390)

* changed to executable and bug fix

(cherry picked from commit ce8be89)

* assume yes for automatic pkg install

(cherry picked from commit 2cd7607)

* -march not supported on ppc64le. Use -mcpu instead

(cherry picked from commit 7cdab8f)

* bugfix

(cherry picked from commit 831692e)
1ucian0 referenced this issue in 1ucian0/qiskit-terra Nov 29, 2018
taalexander pushed a commit to taalexander/qiskit-terra that referenced this issue Apr 13, 2019
[WIP] update init of qiskit.pulse
alexanderivrii referenced this issue in alexanderivrii/qiskit-terra Oct 10, 2021
adding @Property to funcs in instruction.py related to CircuitElement
anedumla pushed a commit to anedumla/qiskit-terra that referenced this issue Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working on hold Can not fix yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants