-
Notifications
You must be signed in to change notification settings - Fork 174
Extend QIR optimization example with compile and run instructions #1093
Conversation
Contains: - getting library and header files - adding a C++ driver - compiling the program
- configure runtime library search path - change dll filename to lib<...>.so - explicitly link Quantum.Simulator.Runtime library
swernli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file rename guidance can now be removed since we fixed this behavior, but otherwise the guidance looks good.
| (**Linux**) The `Microsoft.Quantum.Qir.*` dynamic libraries will already have the right naming scheme for Clang to use, but the `Microsoft.Quantum.Simulator.Runtime` library needs to be renamed. | ||
| The proper name format is `lib<library-name>.so`. | ||
|
|
||
| Execute the following command from the project root directory: | ||
|
|
||
| ```bash | ||
| mv build/Microsoft.Quantum.Simulator.Runtime.dll build/libMicrosoft.Quantum.Simulator.Runtime.so | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the merge of the cloud simulator feature branch, we now have a bugfix for this situation (see microsoft/qsharp-runtime@9fa45de#diff-164e9c49ce0f05da64d60ae5cf3063a3e017f67ef74b0ba6bcb0a62f62506595). The simulator library infrastructure will always look for Microsoft.Quantum.Simulator.Runtime.dll first and then fallback to looking for libMicrosoft.Quantum.Simulator.Runtime.so. This means the rename is no longer necessary as of today's release (https://docs.microsoft.com/en-us/azure/quantum/qdk-relnotes#qdk-version-0182107153439). So this section can just be removed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops... I accidentally clicked merge on this before you had a chance to respond to this comment. I'll make a quick PR removing this part and add you for review!
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Since the fix for the simulator dll name was merged with the cloud simulator feature branch, the guidance on renaming the simulator dll for Linux is no longer needed. See #1093 (comment) for context.
* Removing extra guidance for Linux lib rename Since the fix for the simulator dll name was merged with the cloud simulator feature branch, the guidance on renaming the simulator dll for Linux is no longer needed. See #1093 (comment) for context. * Update version number in readme and in csproj
Added section on how to compile and execute QIR
Contains: