Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create separate runtime for per-tuple measurements #4

Merged
merged 2 commits into from
Jul 31, 2024

Conversation

ausbin
Copy link
Collaborator

@ausbin ausbin commented Jun 30, 2024

Third time's the charm!

(For context for future readers: it is useful to have statistics on a per-tuple level versus a per-qubit level)

Testing

ctest and manual testing with qir-xacc:

$ build/bin/qir-xacc -i examples/qwerty/bv1101.ll --group-tuples --no-print-accelbuf -a qpp
tuple ret length 4 distinct results 1
tuple ret result 1101 count 1024
tuple discarded length 0 distinct results 0
$ build/bin/qir-xacc -i examples/qwerty/bv1101.ll --group-tuples -a qpp
{
    "AcceleratorBuffer": {
        "name": "qreg_0x5633ea6eb6e0",
        "size": 4,
        "Information": {},
        "Measurements": {
            "1101": 1024
        }
    }
}
tuple ret length 4 distinct results 1
tuple ret result 1101 count 1024
tuple discarded length 0 distinct results 0
$ build/bin/qir-xacc -i examples/qwerty/ghz5.ll --group-tuples --no-print-accelbuf -a qpp
tuple ret length 5 distinct results 2
tuple ret result 00000 count 493
tuple ret result 11111 count 531
tuple discarded length 0 distinct results 0
$ build/bin/qir-xacc -i examples/qwerty/ghz5.ll --no-print-accelbuf -a qpp
tuple ret length 5
qubit 0 experiment <null>: {0: 518, 1: 506}
qubit 1 experiment <null>: {0: 518, 1: 506}
qubit 2 experiment <null>: {0: 518, 1: 506}
qubit 3 experiment <null>: {0: 518, 1: 506}
qubit 4 experiment <null>: {0: 518, 1: 506}
tuple discarded length 0

I have not tested Qwerty end-to-end yet because there are 2-3 more PRs needed to upstream all my changes, some of which may take a while. But the (tuple-grouped) output is the same as it expects

@ausbin
Copy link
Collaborator Author

ausbin commented Jun 30, 2024

The build appears to be broken in main, since code in main refers to things this PR defines:

#include "qirxacc/XaccDefaultRuntime.hh"

Merging this PR will fix this.

@sethrj
Copy link
Member

sethrj commented Jul 19, 2024

@ausbin sorry for the long time it took to get this... we've finally now got the ability to build xacc for testing. Once #8 is merged you can revert def9076 and rebase this on main. Thanks!

@sethrj sethrj force-pushed the feature/tuple-runtime branch from a30ca35 to b856ffe Compare July 30, 2024 16:13
Copy link
Member

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

Looks reasonable. Sorry for the delay in reviewing!

@sethrj sethrj merged commit a2b39f5 into ORNL-QCI:main Jul 31, 2024
3 checks passed
@sethrj sethrj mentioned this pull request Aug 7, 2024
sethrj added a commit to sethrj/qiree that referenced this pull request Nov 22, 2024
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