-
Notifications
You must be signed in to change notification settings - Fork 175
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
[feature] Support custom unitary operations in simulation #1462
[feature] Support custom unitary operations in simulation #1462
Conversation
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
2b854f9
to
afb5e68
Compare
59e3ab6
to
3ae6fe9
Compare
3ae6fe9
to
524bdf1
Compare
524bdf1
to
280dac2
Compare
280dac2
to
4d59e0d
Compare
d91eca4
to
1e64a68
Compare
1e64a68
to
12ae120
Compare
91d4274
to
1d6f7d7
Compare
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
1d6f7d7
to
72a9619
Compare
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
c3d7bbc
to
779b87f
Compare
* Streamlined codegen for simulation. Implement a codegen path from quake to the execution manager. This does not implement all CUDA-Q features. It does implement most of the "obvious" execution manager interface however. The strategy is to lower all quake references and veqs to "qubit spans" which are stack allocated structs which contain a pointer and length pair (a.k.a. a span). A qubit is a long integer index (per the execution manager). We use spans to collect ranges of these qubits to pass to the execution manager. A C ABI of adaptors is provided to convert the span structures to `std::vector` data types, which again are the execution manager interface. This glue code lets the C++ compiler supply a C++ version agnostic implementation to support our nvq++ calls. The scheme is stack space intensive, but I expect LLVM's optimizer will be able to fold much of the patterns with lifetime analysis. This may need some further tuning. - Add test for this new codegen lowering. - Add registered pipeline. (cudaq-opt -lower-quake) - Use canonicalizer to fixup alloca on arrays. This lets us insert a cast operation to prevent type checking failures. - Add other canonicalization patterns to eliminate unneeded casts. - Fix tests to deal with new canonicalization patterns. * clang-format * Fix the python test failures. * Silence warning. * Attempt to work around bugs in build compiler.
…epradnya/cuda-quantum into feature/unitary-synthesis
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
1 similar comment
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
* Saving WIP
c78e5d5
to
761a482
Compare
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
* Saving WIP
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
02282c4
to
79d7177
Compare
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
* Saving WIP
79d7177
to
5533fd3
Compare
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Closing this PR to chunk the feature into smaller units of changes. |
Description
First step for supporting Unitary Synthesis (Ref: Issue #1475)
Given an arbitrary unitary matrix, allow it to be used as a custom quantum operation.
This PR covers the following work items:
WIP: Parameterized custom operations in builder mode.
Not covered: Decomposition (synthesis)