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

Qiskit / qiskit-terra / 5247473935
87%

Build:
DEFAULT BRANCH: main
Ran 12 Jun 2023 07:30PM UTC
Jobs 1
Files 1245
Run time 23s
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
5247473935

push

github

web-flow
Improve casting and error message for `ParameterExpression` (#10244)

* Improve casting and error message for `ParameterExpression`

Previously, we assumed that the only reason a cast of
`ParameterExpression` to `complex`/`float`/`int` could fail was because
of unbound parameters, and emitted an error accordingly.  This is not
the case; a fully bound complex value will still fail to convert to
`float`.

This PR improves the error messages in these cases, and works around a
difference of Sympy and Symengine, where the latter will fail to convert
real-valued expressions that were symbollically complex at some point in
their binding history to `float`.  Sympy more reliably reduces values
down to real-only values when the imaginary part is exactly cancelled,
which is a use-case our users tend to expect.

* Fix typo in test

* Update releasenotes/notes/parameter-float-cast-48f3731fec5e47cd.yaml

Co-authored-by: Kevin Hartman <kevin@hart.mn>

---------

Co-authored-by: Kevin Hartman <kevin@hart.mn>

17 of 17 new or added lines in 2 files covered. (100.0%)

71303 of 82991 relevant lines covered (85.92%)

32872.22 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5247473935.1 12 Jun 2023 07:30PM UTC 0
85.92
GitHub Action Run
Source Files on build 5247473935
Detailed source file information is not available for this build.
  • Back to Repo
  • 86df15d3 on github
  • Prev Build on main (#5246579476)
  • Next Build on main (#5256241220)
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