Thank you for downloading the qcs-sdk-qir
toolkit.
In this release, you should find the following files:
qcs-sdk-qir
: an executable binary used to transform QIR programslib/libhelper.{dylib,so}
: a shared library to ease the use of the QCS SDKlib/libqcs.{dylib,so}
: a shared library to handle communication between your QIR program and Rigetti's Quantum Cloud Services
In order to transform QIR programs, please follow these steps (take note of platform-specificity):
export ARCHIVE_NAME=qcs-sdk-qir-llvm#LLVM_VERSION#-linux-x86_64-#TAG#
# verify the download:
shasum -c $ARCHIVE_NAME.checksum.txt
# exract the compressed archive
tar xzf $ARCHIVE_NAME.tar.gz
# enter the dist directory to find the release artifacts
cd $ARCHIVE_NAME/dist
# export the library paths so the linker can find them:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib
# transform a QIR program to contain Rigetti's requirements:
# hint: qcs-sdk-qir --help (for all options)
./qcs-sdk-qir transform --add-main-entrypoint input.bc output.bc
# compile the transformed program to an executable
clang -Llib -lqcs -Llib -lhelper output.bc -o program
# execute your program
./program
export ARCHIVE_NAME=qcs-sdk-qir-llvm#LLVM_VERSION#-darwin-x86_64-#TAG#
# verify the download:
shasum -c $ARCHIVE_NAME.checksum.txt
# exract the compressed archive
tar xzf $ARCHIVE_NAME.tar.gz
# enter the dist directory to find the release artifacts
cd $ARCHIVE_NAME/dist
# you may need to remove the quarantined attribute from the binary and shared libraries
sudo xattr -r -d com.apple.quarantine qcs-sdk-qir lib/*
# export the library paths so the linker can find them:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./lib
# transform a QIR program to contain Rigetti's requirements:
# hint: qcs-sdk-qir --help (for all options)
./qcs-sdk-qir transform --add-main-entrypoint input.bc output.bc
# compile the transformed program to an executable
clang -Llib -lqcs -Llib -lhelper output.bc -o program
# execute your program
./program