Comments (3)
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.
I had this problem a while ago. It was fixed by @kmrudin. See the following:
#53.
from pygsti.
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)
- legacyio.py contains no executable code. HOT 2
- Model reparameterization changing outcome probabilities
- HTML Report Requests HOT 10
- Replace OrderedDict with standard dictionaries where possible HOT 12
- Removed commented-out function definitions HOT 2
- Audit implementations of functions in ``matrixtools.py``. HOT 1
- Replace instances of ``np.trace(np.dot(...`` when computing the trace inner product or Frobenius norm. HOT 5
- Replace unnecessary calls to ``.flatten()`` with ``.ravel()``. HOT 4
- Selection of the gate set HOT 1
- Constructor documentation duplication HOT 3
- Replace CVXOPT dependency with Clarabel
- densitymx_slow does not work HOT 5
- ECR Gate Compatibility HOT 12
- CloudNoiseModel needs better callable op logic
- Pickles are Bad, JSON is Good
- Deprecation of DenseOperatorInterface
- Investigate benefits of ``__slots__`` for core classes
- Audit code for use of list comprehensions where generators would be faster HOT 2
- Forward Simulator Dprobs Bugs with Instruments
- Audit usage of linalg.inv
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygsti.