Skip to content

Commit

Permalink
addressing remaining fixmes from previous prs
Browse files Browse the repository at this point in the history
Signed-off-by: Bettina Heim <[email protected]>
  • Loading branch information
bettinaheim committed Nov 12, 2024
1 parent 0aa4e0f commit ab39c10
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
4 changes: 1 addition & 3 deletions docs/sphinx/using/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ Install CUDA-Q
please follow the instructions for `installing CUDA-Q <https://pypi.org/project/cuda-quantum/>`_ from PyPI.
If you have an NVIDIA GPU, make sure to also follow the instructions for enabling GPU-acceleration.

.. FIXME: update readme here to pull from the src distribution description instead (subsequent PR)
.. include:: ../../../python/README-cu12.md
.. include:: ../../../python/README.md
:parser: myst_parser.sphinx_
:start-after: (Begin complete install)
:end-before: (End complete install)
Expand Down
2 changes: 0 additions & 2 deletions runtime/nvqir/custatevec/CuStateVecCircuitSimulator.cu
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ complexValue<ScalarType> innerProduct(
thrust::device_ptr<thrust::complex<ScalarType>> thrustDevPtrBBegin;
if (createDeviceAlloc) {
// otherPtr is not a device pointer...
// FIXME: WE NEED TO PROPERLY CONVERT HERE -
// PASS A BUFFER RATHER THAN REINTERPRETE_CAST AND HOPE FOR THE BEST...
auto *castedOtherPtr = reinterpret_cast<std::complex<ScalarType> *>(otherPtr);
std::vector<std::complex<ScalarType>> dataAsVec(castedOtherPtr,
castedOtherPtr + size);
Expand Down
16 changes: 15 additions & 1 deletion scripts/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,25 @@ if [ ! "$doxygen_exit_code" -eq "0" ]; then
docs_exit_code=11
fi

# Create Python readme from template
echo "Creating README.md for cudaq package"
package_name=cudaq
cuda_version_requirement="11.x (where x >= 8) or 12.x"
cuda_version_conda=11.8.0 # only used as example in the install script
cat "$repo_root/python/README.md.in" > "$repo_root/python/README.md"
for variable in package_name cuda_version_requirement cuda_version_conda; do
sed -i "s/.{{[ ]*$variable[ ]*}}/${!variable}/g" "$repo_root/python/README.md"
done
if [ -n "$(cat "$repo_root/python/README.md" | grep -e '.{{.*}}')" ]; then
echo "Incomplete template substitutions in README."
docs_exit_code=1
fi

echo "Building CUDA-Q documentation using Sphinx..."
cd "$repo_root/docs"

# The docs build so far is fast such that we do not care about the cached outputs.
# Revisit this when caching becomes necessary.

rm -rf sphinx/_doxygen/
rm -rf sphinx/_mdgen/
cp -r "$doxygen_output_dir" sphinx/_doxygen/
Expand Down
1 change: 0 additions & 1 deletion scripts/validate_pycudaq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ while getopts ":c:f:i:p:qv:" opt; do
done
OPTIND=$__optind__

# FIXME: check validation with src dist (subsequent PR)
readme_file="$root_folder/README.md"
if [ ! -d "$root_folder" ] || [ ! -f "$readme_file" ] ; then
ls "$root_folder"
Expand Down
4 changes: 1 addition & 3 deletions tools/nvqpp/nvq++.in
Original file line number Diff line number Diff line change
Expand Up @@ -772,9 +772,7 @@ for i in ${SRCS}; do
QUAKELL_FILE=$(mktemp ${file}.ll.XXXXXX)
TMPFILES="${TMPFILES} ${QUAKELL_FILE}"

# FIXME This next step needs to be extensible... We may lower to QIR, but we
# may need to lower to Rigetti QIR and link with their libs or we may lower
# to IBM QUIR
# FIXME This next step needs to be extensible...
run ${TOOLBIN}cudaq-translate ${CUDAQ_TRANSLATE_ARGS} --convert-to=${LLVM_QUANTUM_TARGET} ${QUAKE_IN} -o ${QUAKELL_FILE}
if ${EMIT_QIR}; then
run cp ${QUAKELL_FILE} ${file}.qir.ll
Expand Down

0 comments on commit ab39c10

Please sign in to comment.