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

Qiskit / qiskit / 6567751841
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: refactor-dag-circuit-use-local-bits
DEFAULT BRANCH: main
Ran 19 Oct 2023 12:06AM UTC
Jobs 1
Files 1261
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

18 Oct 2023 11:29PM UTC coverage: 86.963% (+0.03%) from 86.938%
6567751841

push

github

web-flow
Add singleton lookup-key logic (#11040)

* Add singleton lookup-key logic

This adds overridable logic for singleton classes to define a "key"
function, which takes the same arguments as its `__init__` and returns a
lookup key that is used as a comparison for returning singletons.  This
lets the standard singleton gates easily return the singleton instance
even when `label` is explicitly set to the default, such as happens
using the idiomatic `QuantumCircuit` methods like `x`.

This keying logic has a simple logical extension to allow more than one
singleton to exist for a single base class.  This functionality is not
yet used by the Qiskit standard library, but can easily be used to
make both closed- and open-controlled versions of gates singletons, or
to allow specific hard-coded parameters for (e.g.) `RZGate` singletons.

The decision on which gates to extend this to can be done in follow-up
commits later.

* Fix unnecessary statement

* :us:

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update documentation comments

---------

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

138 of 138 new or added lines in 14 files covered. (100.0%)

73741 of 84796 relevant lines covered (86.96%)

92235.98 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6567751841.1 19 Oct 2023 12:06AM UTC 0
86.96
GitHub Action Run
Source Files on build 6567751841
Detailed source file information is not available for this build.
  • Back to Repo
  • a8812159 on github
  • Prev Build on gh-readonly-queue/main/pr-11003-b18faa3f89ef95ac4b1c1a7daa2029aed979fec7 (#6567222820)
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