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

RB Analysis generated data not consistent #53

Closed
newsma opened this issue Apr 5, 2019 · 10 comments
Closed

RB Analysis generated data not consistent #53

newsma opened this issue Apr 5, 2019 · 10 comments

Comments

@newsma
Copy link

newsma commented Apr 5, 2019

When I tried running "RBAnalysis.ipynb" with "runsims = True", the new RB data that was generated has success counts = 0 for all RB lengths for every iteration. Any ideas why this would be the case? I've attached the "..txt" file for reference.

MySimulatedDRBData.txt

@kmrudin
Copy link
Contributor

kmrudin commented Apr 5, 2019

Thanks for bringing this to our attention! I've reproduced this bug (on the latest version of master). We are looking into this and will get back to you as soon as we have an answer. Our apologies for the inconvenience!

@kmrudin
Copy link
Contributor

kmrudin commented Apr 5, 2019

The problem was in line 302 of packages/pygsti/extras/rb/simulate.py. idealout is a tuple of ints, not a string; I've fixed this in the develop branch. Will try to push this to master ASAP, but in the meantime, the other option is to replace the line referenced above:

scounts.append(outcome.get(idealout,0))

with

scounts.append(outcome.get(''.join(str(idealbit) for idealbit in idealout),0))

@newsma
Copy link
Author

newsma commented Apr 5, 2019

Thank you for your prompt attention. I cloned the develop brunch and made sure the above-mentioned correction is there (which it is) but I still have the same situation, success counts =0 for all RB lengths for every iteration.

@kmrudin
Copy link
Contributor

kmrudin commented Apr 5, 2019

You're very welcome; sorry this hasn't solved the problem yet! When I run the RB notebook now I do get non-zero success counts. Did you restart the Python kernel in the Jupyter notebook (or just start a new Jupyter session) after switching to the develop branch?

@newsma
Copy link
Author

newsma commented Apr 5, 2019

I indeed started a new kernel but this doesn't seem to fix the issue.

@kmrudin
Copy link
Contributor

kmrudin commented Apr 5, 2019

Hmm... okay, interesting! Can you tell me what path is returned when you just type in pygsti in that Jupyter notebook? (I'm wondering if you might have multiple installs of pyGSTi and the wrong one (maybe one installed via pip?) is being accessed.)

@newsma
Copy link
Author

newsma commented Apr 5, 2019

I think you're right. The path is :

<module 'pygsti' from '/Users/swarnadeepmajumder/miniconda3/lib/python3.7/site-packages/pygsti/init.py'>

Is there an easy way to fix this?

@kmrudin
Copy link
Contributor

kmrudin commented Apr 5, 2019

Ah, excellent!

Try the following commands in a terminal session:

cd pyGSTi
pip install -e .[complete]

@newsma
Copy link
Author

newsma commented Apr 5, 2019

It works now. Thank you so much for your help. Have a great day!

@newsma newsma closed this as completed Apr 5, 2019
@kmrudin
Copy link
Contributor

kmrudin commented Apr 5, 2019

Fantastic; glad to be able to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants