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

Qiskit / qiskit / 11578734687
88%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2024 05:16PM UTC
Jobs 1
Files 895
Run time 3min
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.667% (+0.01%) from 88.656%
11578734687

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%)

6 existing lines in 3 files now uncovered.

75325 of 84953 relevant lines covered (88.67%)

363664.47 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.2
0.0% crates/accelerate/src/unitary_synthesis.rs
1
94.02
-0.24% crates/qasm2/src/expr.rs
4
92.48
-0.5% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 11578734687.1 29 Oct 2024 05:16PM UTC 895
88.67
GitHub Action Run
Source Files on build 11578734687
  • Tree
  • List 895
  • Changed 71
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #11578734687
  • ddf93ab3 on github
  • Prev Build on gh-readonly-queue/main/pr-13375-e7fc5a73ede95acfd3c47f7eba37c47069e24599 (#11577253570)
  • Next Build on main (#11579524174)
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