Skip to content

Fix issues with numpy in circuit string evaluation#322

Open
BGerwe wants to merge 1 commit intoECSHackWeek:mainfrom
BGerwe:numpy_v2_fix
Open

Fix issues with numpy in circuit string evaluation#322
BGerwe wants to merge 1 commit intoECSHackWeek:mainfrom
BGerwe:numpy_v2_fix

Conversation

@BGerwe
Copy link
Collaborator

@BGerwe BGerwe commented Feb 27, 2026

My previous attempt at fixing in #298 wasn't sufficient because it relied on an implicit evaluation of @element decorators at import time. This fix converts all scalars to pure Python floats before evaluation, removing any type prefix associated with numpy.

This should fix what was originally brought up in #296, and later brought up in #318 and #319. It will supersede what is down in #313 and #317.

Hopefully this lays the issue to rest, and sorry for all the problems and delay in actually addressing this.

…bust fix converting numpy array to scalars with .tolist() so element values appear without the type prefix in circtuit string
@BGerwe BGerwe requested a review from mdmurbach February 27, 2026 20:07
@BGerwe BGerwe changed the title Fix issues with numpy is circuit string evaluation Fix issues with numpy in circuit string evaluation Feb 27, 2026
@coveralls
Copy link

Pull Request Test Coverage Report for Build 22501956092

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.883%

Totals Coverage Status
Change from base Build 10823700912: 0.0%
Covered Lines: 856
Relevant Lines: 857

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants