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

Qiskit / qiskit / 11577684486 / 1
89%
main: 88%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-15510-a412ed4826f99e9b1a12b524f06fb5bc08f56944
DEFAULT BRANCH: main
Ran 29 Oct 2024 04:16PM UTC
Files 895
Run time 1min
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.1

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.

75324 of 84953 relevant lines covered (88.67%)

362517.19 hits per line

Source Files on job 11577684486.1
  • Tree
  • List 895
  • Changed 73
  • Source Changed 1
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 11577684486
  • ddf93ab3 on github
  • Prev Job for on gh-readonly-queue/main/pr-13298-01642a8eecd50103d513241ddccc9d1e7c249642 (#11577253570.1)
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

© 2026 Coveralls, Inc