GithubHelp home page GithubHelp logo

Comments (3)

enielse avatar enielse commented on June 19, 2024

This issue is due to 3 spurious lines added on Jan 28: e84cae0
In v0.9.7.5 these are lines 181-183 of .../extras/rb/simulate.py:

outputasstring = ''
    for s in output: outputasstring += str(s)
    return outputasstring

These lines take the outcome label, described as a tuple (as usual in pyGSTi) and reformat it as a string. This causes the results dictionary returned from circuit_simulator_for_tensored_independent_pauli_errors to have only string-ified outcome labels in it, which is not the format of idealout on line 302:

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

causing outcome.get(idealout,0) to always give 0, hence the problem. It seems like the initial 3 lines were added to facilitate compatibility with some other code - let's look into this.

from pygsti.

newsma avatar newsma commented on June 19, 2024

I had this problem a while ago. It was fixed by @kmrudin. See the following:
#53.

from pygsti.

enielse avatar enielse commented on June 19, 2024

This has been updated (and maybe was before by krudin in another branch?) so that the line (now 308) reads:

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

which should remedy this issue by converting idealout from a tuple to a string. This is fixed in version 0.9.8.

from pygsti.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.