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

added state initialisers #374

Merged
merged 5 commits into from
Aug 24, 2023
Merged

added state initialisers #374

merged 5 commits into from
Aug 24, 2023

Conversation

TysonRayJones
Copy link
Member

No description provided.

note it's not presently clear how using cuStateVec's Accessor functionality (for modifying amplitudes) is compares (performance-wise) to direct CUDA writes (like memcpy).

So far, we have avoided using cuStateVec's Accessor functions to be explicit about, and fully aware of, the involved temporary memory
It's likely that initialisations statevec_setWeightedQureg(), statevec_initStateOfSingleQubit() (and potentially the substantially more complicated densmatr_initPureState()) can also be done concisely with Thrust.
Alas, my evening was derailed by the stream-ordered memory pool tanking for >=1 MiB allocs :(
and a patch to a previous issue in our use of thrust, where we were defining complex operator overloads as (implicitly) host-only
although we are missing imports to avoid git conflict:

# include <thrust/sequence.h>
# include <thrust/iterator/zip_iterator.h>
# include <thrust/for_each.h>
@TysonRayJones TysonRayJones merged commit 564851e into cuquantum Aug 24, 2023
6 checks passed
@TysonRayJones TysonRayJones deleted the cuquantum-initialisers branch August 24, 2023 21:35
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.

1 participant