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

Qiskit / qiskit-terra / 5549427939
87%

Build:
DEFAULT BRANCH: main
Ran 14 Jul 2023 01:43AM UTC
Jobs 1
Files 1266
Run time 15s
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

pending completion
5549427939

push

github

web-flow
Add initial representation of classical expressions (#10332)

* Add initial representation of classical expressions

This adds a method of representing a classical type system and
expression tree in Qiskit.  This initial version contains only simple
bitwise, logical and relational operations on Booleans and sized
unsigned integers.  This is largely in line with

    https://github.com/Qiskit/RFCs/blob/0dd13344/0010-simple-classical-representations.md

Some of the details surrounding construction and representation have
been changed slightly from that design, but the type system described is
the same.

Perhaps the largest forwards-facing change is that there is a split
between `Var` and `Value`.  The intention here is that `Var` will become
the type for a general variable with defined storage, while `Value` is
for (currently) literal-like values.

This commit slightly modifies the representation of the
tree; instead of individual tree items for each unary and binary
operation, they are part of the `Unary` and `Binary` nodes with a
respective enumeration discriminator in the node.  This was done to make
visitors to the expression tree require less boilerplate and be easier
to maintain by exploiting the natural similarities between all these
operations of the same type.  One can still discriminate on the
particular operations by using a jump table based on the enumeration
values, if desired.

Secondly, a series of constructor functions was added that is separate
to the representation form.  This is for both efficiency and user
convenience.  The tree form is _purely_ a data format; it does no
type-checking on creation so that manipulations of the tree do not need
to pay runtime costs when the manipulators are the ones who will be
ensuring that the type system is fulfilled anyway.  The more user
friendly constructors _do_ resolve all this type information as part of
their construction.  They also infer typing information for Qiskit
scalar values, and inser... (continued)

72185 of 83900 relevant lines covered (86.04%)

45774.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5549427939.1 14 Jul 2023 01:43AM UTC 0
86.04
GitHub Action Run
Source Files on build 5549427939
Detailed source file information is not available for this build.
  • Back to Repo
  • 93500140 on github
  • Prev Build on main (#5548967359)
  • Next Build on main (#5549582782)
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