• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 11577684486
89%
main: 88%

Build:
Build:
LAST BUILD BRANCH: substitute_pi4_rotations
DEFAULT BRANCH: main
Ran 29 Oct 2024 04:16PM UTC
Jobs 1
Files 895
Run time 5min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Oct 2024 03:55PM UTC coverage: 88.665% (+0.009%) from 88.656%
11577684486

push

github

web-flow
Implement arithmetic on `SparseObservable` (#13298)

* Implement arithmetic on `SparseObservable`

The simple arithmetic operators of addition, subtraction,
multiplication, division and tensor product are in line with other
`quantum_info` objects, including coercion from other objects (though
better behaved on failed coercions, in many cases).

Where appopriate, in-place operations will re-use the existing
allocations.  The tensor product cannot really be done in place, so it
doesn't define a special `__rxor__` operator, but it inherits the
standard Python behaviour of this being derived from `__xor__`.

There are further mathematical operations to add around composition and
evolution, and to apply a `TranspileLayout` to the observable.  All of
these, in the `quantum_info` style either directly deal with a layout,
or take a `qargs` argument that is effectively a sublayout for the
right-hand side of the operation.  These will be added in a follow-up.

* Match `x + x` behaviour to `x += x`

This puts the `self is other` check into the `__add__` and `__sub__`
methods so that the behaviour of `x + x` is consistent with `x += x`,
with regards to the addition being done as a scalar multiplication
instead of concatentation.  Both forms are mathematically correct, but
this makes sure they're aligned.

375 of 410 new or added lines in 1 file covered. (91.46%)

14 existing lines in 3 files now uncovered.

75324 of 84953 relevant lines covered (88.67%)

362517.19 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
35
95.5
-2.42% crates/accelerate/src/sparse_observable.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
92.09
-0.06% crates/accelerate/src/two_qubit_decompose.rs
6
97.62
-0.46% crates/qasm2/src/parse.rs
7
91.73
-1.25% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 11577684486.1 29 Oct 2024 04:16PM UTC 895
88.67
GitHub Action Run
Source Files on build 11577684486
  • Tree
  • List 895
  • Changed 73
  • Source Changed 1
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #11577684486
  • ddf93ab3 on github
  • Prev Build on gh-readonly-queue/main/pr-13375-e7fc5a73ede95acfd3c47f7eba37c47069e24599 (#11577253570)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc