Tags: NVIDIA/cuda-quantum
Tags
Adding CUDA-Q Logical (#5422) CUDA-Q Logical expands CUDA-Q with an open, extensible logical layer for fault-tolerant quantum computing. Use it to express and compose quantum error correction gadget, evaluate them across different system architectures, and understand the resources they need to run. --------- Signed-off-by: Luca Mondada <luca@mondada.net> Signed-off-by: Adam Geller <adgeller@nvidia.com> Signed-off-by: mdzurick <mitch_dz@hotmail.com> Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com> Signed-off-by: Andres Paz <andresp@nvidia.com> Signed-off-by: Bettina Heim <heimb@outlook.com> Co-authored-by: Luca Mondada <luca@mondada.net> Co-authored-by: Luca Mondada <72734770+lmondada@users.noreply.github.com> Co-authored-by: Luca Mondada <mitch_dz@hotmail.com> Co-authored-by: Luca Mondada <lmondada@nvidia.com> Co-authored-by: Andres Paz <andresp@nvidia.com> Co-authored-by: Adam T. Geller <adgeller@nvidia.com> Co-authored-by: Pradnya Khalate <pkhalate@nvidia.com> Co-authored-by: Codex <noreply@openai.com> Co-authored-by: Alex McCaskey <amccaskey@nvidia.com>
Adding set_function_entry to brige API (#5155) Adds an optional `set_function_table` entry point to the realtime bridge provider interface and bumps `CUDAQ_REALTIME_BRIDGE_INTERFACE_VERSION` to 3. The downside of this approach is that every app will have to call this function irrespective of the transport. It is not ideal but considering the alternatives, it is a good approach while we are still trying the define the final API. Here are the alternatives considered: ## Add a new set_function_table function to the bridge API (This PR) **Pros:** - Very simple. **Cons:** - Requires all applications to call it irrespective of the bridge. - Sequence of `cudaq_bridge_*` calls is loosely defined. ## Have the dispatcher wrap a bridge instance **Pros:** - Does not need to be called by applications (`cudaq_dispatcher_set_function_table` can just call `cudaq_bridge_set_function_table`). - No need to worry about defining a call sequence. - Call sequence could be moved in the dispatcher (the wiring can be simplified for the app). **Cons:** - Adds much more coupling between dispatcher and bridge. - Call sequence could be moved in the dispatcher (less flexibility in the wiring). ## Returns a callback with cudaq_bridge_get_transport_context Populates `cudaq_unified_dispatch_ctx_t` with an additional callback. Can be passed through the dispatcher with `cudaq_dispatcher_set_unified_launch`. **Pros:** - Follows along the idea of the `launch_fn` currently returned. **Cons:** - We are trying to deprecate the `launch_fn`. - Significant API change and a precedent which can cause more API changes in the future. - Convoluted solution. ## Reuse the callback in cudaq_bridge_get_transport_context Take advantage of the fact that `launch_fn` is not used in the CPU flow and repurpose it to only pass the function table. (It already does; just nullify the other arguments.) **Pros:** - Avoid API changes while we are still trying to determine the best final API. **Cons:** - Hacky. ## Return the callback through the cudaq_cpu_dataplane_t We are currently returning: ```c cudaq_cpu_rx_poll_fn_t rx_poll; ///< Non-blocking inbound poll; required. cudaq_cpu_tx_publish_fn_t tx_publish; ///< Outbound publish; required. ``` **Pros:** - Follows along the same callback mechanism. **Cons:** - Might come too late in the call sequence. --------- Signed-off-by: Renaud Kauffmann <rkauffmann@nvidia.com>
[CI] Introduce Validation instead of Publishing (#5098) This PR removes the publishing step, and instead replaces a majority of that functionality in the Validation.yml step. The new general CI Workflow will now be: * CI - build+test CI workflow * Deployments - build Release/debug docker container * Validation - fully test the files from Deployments --------- Signed-off-by: mdzurick <mitch_dz@hotmail.com>
[core] Add statistics accumulators to quantum optimizations. (#5056) Signed-off-by: Eric Schweitz <eschweitz@nvidia.com>
Update cmake constraint for wheel build (for upstream change) (#4396) This is needed due to the recent release of `build` 1.4.4 * https://pypi.org/project/build/1.4.4/ * https://github.com/pypa/build/releases/tag/1.4.4 More specifically, the `build` package now adds `--ignore-installed` during part of the build process, and since our cmake version pinnings weren't consistent across `[build-system]` and `[tool.scikit-build]`, cmake got updated to be >4 halfway through the build. CUDA-Q does not support cmake>4. Signed-off-by: Ben Howe <bhowe@nvidia.com>
Introducing CUDA-Q Realtime (#4118) CUDA-Q real-time provides low-level components for real-time co-processing between FPGA and CPU-GPU systems. See blog posts and documentation for more details. --------- Signed-off-by: Alex McCaskey <amccaskey@nvidia.com> Signed-off-by: boschmitt <7152025+boschmitt@users.noreply.github.com> Signed-off-by: Shane Caldwell <scaldwell@nvidia.com> Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com> Signed-off-by: Chuck Ketcham <cketcham@nvidia.com> Signed-off-by: Ben Howe <bhowe@nvidia.com> Signed-off-by: Mitchell <mitch_dz@hotmail.com> Signed-off-by: cketcham2333 <chuckk2333@yahoo.com> Co-authored-by: Alex McCaskey <amccaskey@nvidia.com> Co-authored-by: boschmitt <7152025+boschmitt@users.noreply.github.com> Co-authored-by: Bruno Schmitt <bschmitt@nvidia.com> Co-authored-by: Shane Caldwell <scaldwell@nvidia.com> Co-authored-by: Ben Howe <bhowe@nvidia.com> Co-authored-by: Ben Howe <141149032+bmhowe23@users.noreply.github.com> Co-authored-by: Chuck Ketcham <cketcham@nvidia.com> Co-authored-by: cketcham2333 <chuckk2333@yahoo.com> Co-authored-by: Mitchell <mitch_dz@hotmail.com> Co-authored-by: Bettina Heim <heimb@outlook.com>
Support dynamic quantum architecture for IQM QPUs (#3298) * Support dynamic quantum architecture for IQM QPUs For IQM machines fetch the quantum architecture from server, derive the dynamic architecture from this and write it to an architecture file. This file is then passed in the lowering pipeline in place of the previously used static architecture files. The output from the algorithm for finding usable qubits generates a list of qubits which are calibrated for mz, cz and prx. A mapping ensures that qubit names are enumerated in a linear manner and not fully calibrated qubits do not show in the architecture file. The architecture file is created in the system temp directory with a unique filename and deleted after the job has been sent to the IQM server. Changes in function * Removed parameter "--iqm-machine" which was used to specify the IQM quantum architecture at compile time. * Removed static architecture files provided for Adonis, Apollo, and Aphrodite architectures. * Removed machine architecture bindings from IQM tests. * Implemented getting the authorization token from IQM_TOKEN environment variable. If this is not set the previous mechanism reading the token from a JSON file is used. * Updated IQM JSON output of LLVM to latest syntax. "phased_rx" -> "prx", "measurement" -> "measure" in both emitter code and tests. Test related changes * Adapted IQM mock server to latest iqmclient API version (v28.0.0) and IQM server API changes. * Implemented in IQM mock server the 20 qubit Apollo quantum architecture. * Added support for mapping of qubits syntax in the job request to the mock server. * In the mock server deliberately removed QB2 and QB3 from the list of PRX calibrated gates. This results in changes in the topology and forces the CUDA-Q code to work with an imperfect calibrated system. This tests the implemented algorithm with every testcase which uses more than 1 qubit. * In mock server implemented a full checking of gates used in circuits versus the topology to verify that all 2 qubit gates are supported by the mock qpu. * Pass the authorization token to IQM mock server with env-variable. This includes also a new testcase addressing the IQM_TOKEN environment variable. * Save and restore environment variables for testcases modifying them. So the order of testcases does not matter anymore. * Fixed evaluation of 2 qubit testcases which failed on some simulations. Documentation * Updated the IQM parts of the documentation and examples. Explained changes from previous version and removed references to the no longer needed machine names. * Cleanup: improved doxygen headers and few other comments. * Cleanup: Added copyright to touched files Addresses issues: #1589, #865 --------- Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> Signed-off-by: iqm-bhoffmann <bernd.hoffmann@meetiqm.com> * removing yapf as spell checker is complaining about it Signed-off-by: Sachin Pisal <spisal@nvidia.com> * Removed debug prints which are failing Commented out debug output dumping JSON data. The code worked earlier but now fails compilation reporting a type issue. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Removed commented-out debug prints entirely Instead of fixing a formatting error removed some debug prints entirely as they are just details of a more general previous printout. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Fixed emulation mode for IQM server Fixed implementation of --emulate parameter. Previously it tried load the dynamic quantum architecture from server despite "emulate" means without server. This caused several ctests to fail. Removed the --iqm-machine parameter from all ctest lines in the various C++ test programs. Adapted the ctests mapping testcase to use a Crystal_5.txt file and restored this to the project. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Fixed mapping file issue for emulation mode In emulation mode provide a mapping file for the 20 qubit crystal architecture. Restored the Crystal_20.txt (former Apollo.txt) mapping file. This is used only in emulation mode. Added header file <unistd.h> which was missing in IQMServerHelper. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Corrected comments and code readability After feedback in internal review corrected: - Wording of some comments. - Improved writing of the bit encoded flag variable. Only for readability - non functional change. - Removed an unused include. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Correction from clang-format Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Remove again `prx` from spellchecker whitelist Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Clarified documentation Review feedback: Removed outdated paragraph. Fixed typo in example. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Alternate ways to define the IQM QPU architecture Allow defining the IQM QPU architecture at runtime via environment variable IQM_QPU_QA. The value of this variable is interpreted as a path+filename of an QPU architecture (mapping) file. Aternatively the IQM QPU archtecture can be given at compile time with parameter "--mapping-file" to the nvq++ or in the backend-string as "mapping_file". Moved the IQM QPU architecture files from "runtime" into the "targettest" folder. Added file for the IQM Crystal-54 architecture. Changed the lit variable pointing to these folders. Updated all testcases testing IQM target which use "--emulate" to use QPU architecture via environment variable. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Updated IQM doc, save DQA to file, tests Updated the IQM backend documentation. Created a new subpage there to explain some advanced use-cases. Added a way to save the dynamic quantum architecture of a server to file for later use. Added example files of a quantum architecture to targettests/Target/IQM/ folder. Added testcase to unittests testing the options to load and save a dynamic quantum architecture to file. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> * Fixup lint and linkcheck issues The link to Resonance is valid but only when requested with an accept string of "text/html" a response with 200 will be returned. Reverted to previously page instead. Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> --------- Signed-off-by: Bernd Hoffmann <bernd.hoffmann@meetiqm.com> Signed-off-by: iqm-bhoffmann <bernd.hoffmann@meetiqm.com> Signed-off-by: Sachin Pisal <spisal@nvidia.com> Co-authored-by: Sachin Pisal <spisal@nvidia.com> Co-authored-by: Bettina Heim <heimb@outlook.com>
PreviousNext