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

Qiskit / qiskit / 6567751841 / 1
87%
main: 88%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-15562-f617d0afcca71953581b4085f032cc83b3ecbd21
DEFAULT BRANCH: main
Ran 19 Oct 2023 12:06AM UTC
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.1

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>

73741 of 84796 relevant lines covered (86.96%)

92235.98 hits per line

Source Files on job 6567751841.1
  • Tree
  • List 0
  • Changed 36
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 6567751841
  • a8812159 on github
  • Prev Job for on gh-readonly-queue/main/pr-11040-976d765896d0bd2038112d2bdf24f9b60282731b (#6567222820.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