fixing plot_histogram when data is sparse
Summary
I have added a new parameter "ignore_under" in the plot_histogram function. It makes the function ignore all the values in the data dictionary that are below this value. Documentation for the parameter is also added. #Resolves #13066
Details and comments
This solves the sparsity problem in the histogram function as mentioned in the issue here.
Thank you for opening a new pull request.
Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.
While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.
One or more of the following people are relevant to this code:
- @enavarro51
-
@Qiskit/terra-core
Pull Request Test Coverage Report for Build 13246875465
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
- For more information on this, see Tracking coverage changes with pull request builds.
- To avoid this issue with future PRs, see these Recommended CI Configurations.
- For a quick fix, rebase this PR at GitHub. Your next report should be accurate.
Details
- 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
- 4233 unchanged lines in 196 files lost coverage.
- Overall coverage decreased (-0.4%) to 88.318%
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| crates/circuit/src/converters.rs | 1 | 95.65% |
| crates/circuit/src/lib.rs | 1 | 94.74% |
| qiskit/primitives/statevector_sampler.py | 1 | 99.07% |
| qiskit/circuit/library/iqp.py | 1 | 96.15% |
| qiskit/transpiler/passes/layout/vf2_post_layout.py | 1 | 85.71% |
| qiskit/primitives/base/base_estimator.py | 1 | 96.97% |
| qiskit/circuit/library/boolean_logic/quantum_or.py | 1 | 98.08% |
| qiskit/circuit/parameter.py | 1 | 98.36% |
| qiskit/converters/circuit_to_instruction.py | 1 | 98.18% |
| crates/accelerate/src/basis/basis_translator/basis_search.rs | 1 | 99.3% |
| <!-- | Total: | 4233 |
| Totals | |
|---|---|
| Change from base Build 11481266566: | -0.4% |
| Covered Lines: | 78800 |
| Relevant Lines: | 89223 |