-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[quera] Fix C++ frontend behavior (#2528)
* Fix the behavior of `quera` backend with C++ frontend by showing appropriate error message. (Behavior prior to this change - default simulator was invoked) * Tell nvq++ to generate glue for `quera` * Simplify libraries - combine 'libcudaq-quera-qpu.so' and 'libcudaq-serverhelper-quera.so' into one. Signed-off-by: Pradnya Khalate <[email protected]>
- Loading branch information
1 parent
c96be85
commit 7d70b43
Showing
4 changed files
with
33 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2022 - 2025 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. * | ||
******************************************************************************/ | ||
|
||
// RUN: nvq++ %cpp_std --target quera %s -o %t.x | ||
// RUN: not %t.x 2>&1 | FileCheck %s | ||
// RUN: nvq++ %cpp_std --target quera --emulate %s -o %t.x | ||
// RUN: not %t.x 2>&1 | FileCheck %s | ||
|
||
#include <cudaq.h> | ||
|
||
auto bell = []() __qpu__ { | ||
cudaq::qvector q(2); | ||
h(q[0]); | ||
x<cudaq::ctrl>(q[0], q[1]); | ||
}; | ||
|
||
int main() { | ||
auto counts = cudaq::sample(bell); | ||
counts.dump(); | ||
return 0; | ||
} | ||
|
||
// CHECK: Arbitrary kernel execution is not supported on this target |