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

Fix incorrect argument copy when arguments have various bit lengths #1583

Closed
wants to merge 26 commits into from

Conversation

annagrin
Copy link
Collaborator

Description

Fixes #1580

amccaskey and others added 26 commits April 17, 2024 18:49
Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
…VIDIA#1531)

* merge

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

* clang format

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

* Build fixes

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

* Fix ci build errors - no gpu

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

* More CI build / bug fixes

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

* messed up the target modification logic

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

* Fix the docs generation issues

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

---------

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
Allow users to do following in kernel functions:

- pass complex numbers and lists as parameters
- capture complex numbers and lists
- define lists of complex numbers
- pass complex numbers to function calls
- allow using complex, np.complex128 and np.complex64

- add tests for complex and float numbers and lists
* Work on qalloc in specific state (input = vector)

- Implementation for tensornet and density matrix.

- Fix an issue whereby there are default qvector declarations (no state
  init) before a qvector declaration with initial vector. We need to
  dispatch those alloc calls to the simulator separately.

- Add tests

* Address code review: return statement left at a wrong place

* Fixed a bug in checking the requestedAllocations size

* Add a check otherwise unused variable warnings
Co-authored-by: Ben Howe <141149032+bmhowe23@users.noreply.github.com>
Finish up the cudaq::state support in the bridge.

The runtime headers appear to have been changed in a way that breaks
the regression test qalloc_initialization.cpp.
Replace !cc.struct<"cudaq.state"> with !cc.state.

Requires NVIDIA#1534 to be merged first.
…NVIDIA#1556)

* Use state directly, rather than as a reference.

* Extend the init_state op to take !cc.state types.

This changes the semantics of init_state to be a family of
initializations. It can use a vector of floats directly or a
cudaq::state object. Additionally, it may use a runtime library
call with move semantics if the initializer is a cudaq::state
object.

Requires NVIDIA#1554 to be merged first.

* Remove intrinsic that greased the skids for the new cudaq::state class
to work with quake.
The execution manager should not expose details of how qudit allocation
is handle internally through its public API. User must only know that,
when they ask for a qudit allocation, they get a qudit identifier back.

Users should not write code that rely on a qudit having a particular
identifier---something that the current name might invite them to do.
* Add comments to the newly-added docs example

* Add ref to example
* Fix issue with indexing raw args pointer for return value

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

* list vs List got me

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>

---------

Signed-off-by: Alex McCaskey <amccaskey@nvidia.com>
* Add a script that generates code coverage

* Fix a typo of generate_cc.sh

Co-authored-by: Ben Howe <141149032+bmhowe23@users.noreply.github.com>

---------

Co-authored-by: Ben Howe <141149032+bmhowe23@users.noreply.github.com>
…VIDIA#1528)

This patch reverts some of the core support intended for Pauli words.
Revert this PR when the Pauli word work is picked up again.
* [fixup-linkage] Open the door wider.

This tool was being very cautious about rewriting the linkages on the
C++ code. This change makes things more aggressive. This implies that
the tool may fail by changing linkages that don't need to be changed and
were not formerly being changed. The motivation for this is to allow
linkages when generating shared library code to be fixed up.

* clang-format
…1557)

This patch fixes a segmentation fault in `cudaq-translate` when "--emit-llvm" is
false. The issue occurs because the initialization lambda has non-trivial
storage, and `llvm::function_ref` only holds a reference to a function, trashing
the lambda after initialization.
…ebased

Support using complex inside kernel functions
…1563)

* [experimental/stateHandling] Add rvalue reference to bridge.

This is intended to lower the rvalue reference to a cudaq::state to the
newly extended quake.init_state operation, which now supports lowering
of move semantics.

* Move the name of the special std::move builtin intrinsic to the header
file.

* Add a pattern to remove the std::move() calls.

* Create an "erase nop calls" pass and move the std::move erasure there.
This makes the erasure of the calls independent of the (particular) code
gen.
Copy link

copy-pr-bot bot commented Apr 29, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@annagrin annagrin closed this Apr 29, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Python] Incorrect return value with a bool parameter
8 participants