Add two quantum embeddings#4667
Conversation
Command Bot: Processing... |
CI Summary (
|
| Job | Result | Link |
|---|---|---|
build_and_test |
❌ failure | view |
Top-level jobs (13)
| Job | Result |
|---|---|
binaries |
⏩ skipped |
build_and_test |
❌ failure |
config_devdeps |
✅ success |
config_source_build |
⏩ skipped |
config_wheeldeps |
✅ success |
devdeps |
✅ success |
docker_image |
⏩ skipped |
gen_code_coverage |
⏩ skipped |
metadata |
✅ success |
python_metapackages |
⏩ skipped |
python_wheels |
⏩ skipped |
source_build |
⏩ skipped |
wheeldeps |
✅ success |
⏩ Skipped jobs (7) — intentionally skipped on PR builds; run on merge_group / workflow_dispatch
| Job |
|---|
binaries |
config_source_build |
docker_image |
gen_code_coverage |
python_metapackages |
python_wheels |
source_build |
All sub-jobs (42) — every matrix leg, with links
| Job | Status | Link |
|---|---|---|
| Build and test (amd64, gcc12, openmpi) / Dev environment (Debug) | ❌ failure | view |
| Build and test (amd64, gcc12, openmpi) / Dev environment (Python) | ✅ success | view |
| Build and test (amd64, llvm, openmpi) / Dev environment (Debug) | ❌ failure | view |
| Build and test (amd64, llvm, openmpi) / Dev environment (Python) | ✅ success | view |
| Build and test (arm64, llvm, openmpi) / Dev environment (Debug) | ❌ failure | view |
| Build and test (arm64, llvm, openmpi) / Dev environment (Python) | ✅ success | view |
| CI Summary | ❔ in_progress | view |
| Configure build (devdeps) | ✅ success | view |
| Configure build (source_build) | ⏩ skipped | view |
| Configure build (wheeldeps) | ✅ success | view |
| Create CUDA Quantum installer | ⏩ skipped | view |
| Create Docker images | ⏩ skipped | view |
| Create Python metapackages | ⏩ skipped | view |
| Create Python wheels | ⏩ skipped | view |
| Gen code coverage | ⏩ skipped | view |
| Load dependencies (amd64, gcc12) / Caching | ✅ success | view |
| Load dependencies (amd64, gcc12) / Finalize | ✅ success | view |
| Load dependencies (amd64, gcc12) / Metadata | ✅ success | view |
| Load dependencies (amd64, llvm) / Caching | ✅ success | view |
| Load dependencies (amd64, llvm) / Finalize | ✅ success | view |
| Load dependencies (amd64, llvm) / Metadata | ✅ success | view |
| Load dependencies (arm64, gcc12) / Caching | ✅ success | view |
| Load dependencies (arm64, gcc12) / Finalize | ✅ success | view |
| Load dependencies (arm64, gcc12) / Metadata | ✅ success | view |
| Load dependencies (arm64, llvm) / Caching | ✅ success | view |
| Load dependencies (arm64, llvm) / Finalize | ✅ success | view |
| Load dependencies (arm64, llvm) / Metadata | ✅ success | view |
| Load source build cache | ⏩ skipped | view |
| Load wheel dependencies (amd64, 12.6) / Caching | ✅ success | view |
| Load wheel dependencies (amd64, 12.6) / Finalize | ✅ success | view |
| Load wheel dependencies (amd64, 12.6) / Metadata | ✅ success | view |
| Load wheel dependencies (amd64, 13.0) / Caching | ✅ success | view |
| Load wheel dependencies (amd64, 13.0) / Finalize | ✅ success | view |
| Load wheel dependencies (amd64, 13.0) / Metadata | ✅ success | view |
| Load wheel dependencies (arm64, 12.6) / Caching | ✅ success | view |
| Load wheel dependencies (arm64, 12.6) / Finalize | ✅ success | view |
| Load wheel dependencies (arm64, 12.6) / Metadata | ✅ success | view |
| Load wheel dependencies (arm64, 13.0) / Caching | ✅ success | view |
| Load wheel dependencies (arm64, 13.0) / Finalize | ✅ success | view |
| Load wheel dependencies (arm64, 13.0) / Metadata | ✅ success | view |
| Prepare cache clean-up | ❔ in_progress | view |
| Retrieve PR info | ✅ success | view |
⚠️ Required checks (3/6) — 3 missing — declared in .github/required-checks.yml for push
| Required check | Status | Link |
|---|---|---|
| Build and test (amd64, llvm, openmpi) / Dev environment (Debug) | ❌ failure | view |
| Build and test (amd64, llvm, openmpi) / Dev environment (Python) | ✅ success | view |
| Build and test (arm64, llvm, openmpi) / Dev environment (Debug) | ❌ failure | view |
| Build and test (arm64, llvm, openmpi) / Dev environment (Python) | ✅ success | view |
| Build and test (amd64, gcc12, openmpi) / Dev environment (Debug) | ❌ failure | view |
| Build and test (amd64, gcc12, openmpi) / Dev environment (Python) | ✅ success | view |
|
C++ implementation? |
|
Is this a dup of #4666 ? |
|
Hi @schweitzpgi @1tnguyen I extended the implementation over to C++. |
|
@simsaidan Thank you for this contribution!
|
Command Bot: Processing... |
Command Bot: Processing... |
Signed-off-by: Aidan Sims <ans248@cornell.edu>
Signed-off-by: Aidan Sims <ans248@cornell.edu>
deea007 to
76a7a1a
Compare
|
Hey @bettinaheim ! I updated the PR and moved the embeddings to the contrib namespace. I improved the doc comments and added support for builder mode. |
|
Hey @bettinaheim @schweitzpgi ! Could you trigger the CI check again so I can see if it is green or otherwise what I need to fix? |
|
@simsaidan Have you built the code and ran the tests locally? |
|
@sacpis Yes, I ran CI and tests locally and no fails |
|
For the latest spelling fix 7a52c2e, please use backticks around those words as those are not english words to be added to |
|
Also, would you please sign your commits? |
|
@simsaidan I am seeing the following build failure locally |
Signed-off-by: Aidan Sims <ans248@cornell.edu>
|
@sacpis I added backticks and removed those words from the allowlist. I also made a change to address that build failure. I signed the latest commit. Do I need to anything retroactively to the commits before or does signing the latest one cover me? |
sacpis
left a comment
There was a problem hiding this comment.
Thanks @simsaidan. Have put some comments. Let's run the CI now.
| *, | ||
| pad: complex | float = 0, | ||
| ) -> State: | ||
| """ |
There was a problem hiding this comment.
Let's make these docstrings raw in order to avoid \r escape.
Would you please run scripts/build_docs.sh and see if these are rendered as expected?
There was a problem hiding this comment.
Please check all symbols followed by \.
| /******************************************************************************* | ||
| * Copyright (c) 2026 NVIDIA Corporation & Affiliates. * All rights reserved. | ||
| * * | ||
| * * | ||
| * This source code and the accompanying materials are made available under * | ||
| * the terms of the Apache License 2.0 which accompanies this distribution. * | ||
| ******************************************************************************/ |
| * * | ||
| * This source code and the accompanying materials are made available under * | ||
| * the terms of the Apache License 2.0 which accompanies this distribution. * | ||
| ******************************************************************************/ |
| /******************************************************************************* | ||
| * Copyright (c) 2026 NVIDIA Corporation & Affiliates. * All rights reserved. | ||
| * * | ||
| * * | ||
| * This source code and the accompanying materials are made available under * | ||
| * the terms of the Apache License 2.0 which accompanies this distribution. * | ||
| ******************************************************************************/ |
|
Would you please add the following text in an empty commit? It will sign the commits which does not contain your signature. Please do run this command to commit it |
Use raw docstrings for LaTeX in cudaq.contrib.encoding, align copyright headers in encoding sources/tests, and relax sized veq to unsized veq at kernel call sites. Signed-off-by: Aidan Sims <ans248@cornell.edu>
|
@sacpis @bettinaheim Added the empty commit and fixed the headers and docstrings. I also made an edit which I hope will address the latest CI failures |
| a 1D vector. | ||
| TypeError: If ``data`` has an unsupported type. | ||
|
|
||
| # Example: |
Command Bot: Processing... |
|
Please run |
|
Seems like a regression caused with the latest changes. |
Signed-off-by: Aidan Sims <ans248@cornell.edu>
Signed-off-by: Aidan Sims <ans248@cornell.edu>
|
@sacpis Spelling should be good now and I moved the examples. For the regression, the fix for the last error, I added a conversion step between sized and unsized registers. That change makes the past errors pass but makes this new test fail. Should I try to find some other workaround that would make both pass? |
Thanks @simsaidan. We would like to see everything passing with this PR. |
|
Also, would you please collaborate with @ssmswapnil as per @bettinaheim's comment here to unify with PR #4666? |

Resolves #2982
Implements the amplitude encoding and angular encoding. Supports both numpy and cupy ndarrays. For the second encoding, blocks a non-kernel call with an error. Updates the ast bridge, which does some compile time checks.
Used cursor for planning.