Comments (2)
The error is being thrown because the way norm
is being called in this example causes it to set its vmin
and vmax
to the same value (11). This causes it to return NaN
since there are divisions by vmax - vmin
when called on data, which is what the error is all about.
In color_boxplot
, norm
is called on a set of data rather than a single point, so unless the data are identical a different vmin
and vmax
are set and you don't get this error. In your example, you can also manually set vmin
and vmax
when you define norm
linlog_trans = 11
vmin = 0
vmax = 20
norm = pygsti.report.plotting.LinLogNorm(vmin=vmin, vmax=vmax, trans=linlog_trans)
and you won't experience any errors.
For our purposes, the defaults of splice_cmap
are set up so you shouldn't have to mess with them. LinLogNorm
is designed to linearly map all values below trans
to the interval [0, 0.5], and logarithmically map all values above trans
to the interval [0.5, 1]. This means that when you have vmin
and vmax
set sensibly, norm(linlog_trans)
will always be 0.5. splice_cmaps
is set to default to assigning the different cmap
s to equal intervals, so when joining two cmap
s the transition from one to the other will occur at 0.5, matching the behavior of LinLogNorm
.
from pygsti.
This makes sense, and for now, we should rely on this default behavior. In the future, if we mess around more with the colormaps, we may need to revisit this.
Closing the issue for now.
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.