Skip to content

C interface#30

Merged
wongey merged 20 commits intoORNL-QCI:mainfrom
sethrj:cqiree
Jul 18, 2025
Merged

C interface#30
wongey merged 20 commits intoORNL-QCI:mainfrom
sethrj:cqiree

Conversation

@sethrj
Copy link
Copy Markdown
Member

@sethrj sethrj commented Apr 28, 2025

Closes #29

@sethrj sethrj added the enhancement New feature or request label Apr 28, 2025
@wongey wongey self-requested a review April 28, 2025 13:43
@sethrj sethrj marked this pull request as draft April 28, 2025 22:40
@sethrj sethrj mentioned this pull request Jun 23, 2025
@sethrj sethrj force-pushed the cqiree branch 2 times, most recently from 68d34c4 to a3685ce Compare June 24, 2025 14:03
@wongey wongey marked this pull request as ready for review June 24, 2025 15:12
@wongey wongey changed the title WIP: C interface C interface Jun 24, 2025
@sethrj sethrj mentioned this pull request Jul 16, 2025
@sethrj
Copy link
Copy Markdown
Member Author

sethrj commented Jul 17, 2025

@wongey Success! 🎉

@wongey
Copy link
Copy Markdown
Collaborator

wongey commented Jul 18, 2025

@sethrj CQireeTest.Run doesn't pass when qsim is activated. Are we deferring the troubleshooting of the test to another PR, or is it not relevant for the functionality of the APIs and should be ignored for the CIs?

@sethrj
Copy link
Copy Markdown
Member Author

sethrj commented Jul 18, 2025

@wongey It worked locally for me when I had qsim enabled... what result is it showing?

@wongey
Copy link
Copy Markdown
Collaborator

wongey commented Jul 18, 2025

@sethrj Seems like it is a sorting issue maybe. Which is weird because I saw that you did sorted the results in 235. Also, max_count is reporting 1 (is it a std::size_t problem?).

[ RUN      ] CQireeTest.Run
qiree failure: num_shots was nonpositive
$HOME/qiree/test/cqiree/cqiree.test.cc:236: Failure
Expected equality of these values:
  (std::vector<ArrayUint2>{{0, 21}, {1, 32}, {2, 25}, {3, 22}})
    Which is: { { 0, 21 }, { 1, 32 }, { 2, 25 }, { 3, 22 } }
  arr_results
    Which is: { { 3, 22 }, { 0, 21 }, { 1, 32 }, { 2, 25 } }
qiree failure: insufficient capacity 1 for result items: need 4
[  FAILED  ] CQireeTest.Run (22 ms)

@sethrj
Copy link
Copy Markdown
Member Author

sethrj commented Jul 18, 2025

Oh I see the problem; originally I copied the whole array into results but changed it to copy everything but the size. The sort mistakenly skips the first element again. So I'll fix that!

The "error" message you're seeing is just the printout from the test that's supposed to fail: the return code is correctly handled and the error message shoudl be ignored. (It's confusing I know, but trying to redirect the cerr output would require some extra hoops.)

@sethrj sethrj requested a review from wongey July 18, 2025 15:22
Copy link
Copy Markdown
Collaborator

@wongey wongey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I think we are good to go!

@wongey wongey merged commit 10cf0b4 into ORNL-QCI:main Jul 18, 2025
3 checks passed
@sethrj sethrj deleted the cqiree branch July 18, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Q-IRIS API requirements specification

2 participants