Skip to content

Commit 3dd0130

Browse files
committed
C++ CI updates
Signed-off-by: Ben Howe <[email protected]>
1 parent 2766097 commit 3dd0130

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

docs/sphinx/examples/qec/cpp/real_time_complete.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
* This source code and the accompanying materials are made available under *
66
* the terms of the Apache License 2.0 which accompanies this distribution. *
77
******************************************************************************/
8+
9+
// Compile and run:
10+
// nvq++ --target=stim -lcudaq-qec -lcudaq-qec-realtime-decoding -lcudaq-qec-realtime-decoding-simulation real_time_complete.cpp
11+
// NOTE: This must be on one line for the CI system to parse it correctly.
12+
813
// [Begin Documentation]
914

1015
// Simple 3-qubit repetition code with real-time decoding

scripts/ci/test_examples.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,17 @@ if [[ "$LIB" == "qec" || "$LIB" == "all" ]]; then
7070
done
7171

7272
for file in examples/qec/cpp/*.cpp; do
73-
run_cpp_test "$file" "--target=stim -lcudaq-qec"
73+
# Get the filename without the path.
74+
filename=$(basename $file)
75+
# If the cpp file contains an nvq++ command, fetch the command line
76+
# options from it and use them here. If there is no nvq++ command, use
77+
# the default options.
78+
nvqpp_options=$(grep nvq++ $file | sed -re "s/.*nvq\+\+ //" | sed -re "s/ $filename//")
79+
if [ -n "$nvqpp_options" ]; then
80+
run_cpp_test "$file" "$nvqpp_options"
81+
else
82+
run_cpp_test "$file" "--target=stim -lcudaq-qec"
83+
fi
7484
done
7585
fi
7686

0 commit comments

Comments
 (0)