Renamed SparseQuantumSimulator.dll. (#946)
* Renamed to Microsoft.Quantum.SparseSimulator.Runtime.
This commit is contained in:
Родитель
5c9b9911dd
Коммит
10cc399baa
|
@ -357,9 +357,9 @@ xplat
|
|||
src/Simulation/Native/win10/Microsoft.Quantum.Simulator.Runtime.dll
|
||||
src/Simulation/Native/linux/libMicrosoft.Quantum.Simulator.Runtime.so
|
||||
src/Simulation/Native/osx/libMicrosoft.Quantum.Simulator.Runtime.dylib
|
||||
src/Simulation/Native/win10/SparseQuantumSimulator.dll
|
||||
src/Simulation/Native/linux/libSparseQuantumSimulator.so
|
||||
src/Simulation/Native/osx/libSparseQuantumSimulator.dylib
|
||||
src/Simulation/Native/win10/Microsoft.Quantum.SparseSimulator.Runtime.dll
|
||||
src/Simulation/Native/linux/libMicrosoft.Quantum.SparseSimulator.Runtime.so
|
||||
src/Simulation/Native/osx/libMicrosoft.Quantum.SparseSimulator.Runtime.dylib
|
||||
src/Simulation/Native/win10/Microsoft.Quantum.Experimental.Simulators.Runtime.dll
|
||||
src/Simulation/Native/linux/Microsoft.Quantum.Experimental.Simulators.Runtime.dll
|
||||
src/Simulation/Native/osx/Microsoft.Quantum.Experimental.Simulators.Runtime.dll
|
||||
|
|
|
@ -28,14 +28,14 @@ Push-Location (Join-Path $PSScriptRoot ../src/Simulation/Native)
|
|||
|
||||
$DROP = "$Env:DROP_NATIVE/src/Simulation/NativeSparseSimulator/build"
|
||||
Write-Host "##[info]Copying NativeSparseSimulator files from $DROP...";
|
||||
If (Test-Path "$DROP/libSparseQuantumSimulator.dylib") {
|
||||
Copy-Item -Verbose "$DROP/libSparseQuantumSimulator.dylib" "osx/libSparseQuantumSimulator.dylib"
|
||||
If (Test-Path "$DROP/libMicrosoft.Quantum.SparseSimulator.Runtime.dylib") {
|
||||
Copy-Item -Verbose "$DROP/libMicrosoft.Quantum.SparseSimulator.Runtime.dylib" "osx/libMicrosoft.Quantum.SparseSimulator.Runtime.dylib"
|
||||
}
|
||||
If (Test-Path "$DROP/libSparseQuantumSimulator.so") {
|
||||
Copy-Item -Verbose "$DROP/libSparseQuantumSimulator.so" "linux/libSparseQuantumSimulator.so"
|
||||
If (Test-Path "$DROP/libMicrosoft.Quantum.SparseSimulator.Runtime.so") {
|
||||
Copy-Item -Verbose "$DROP/libMicrosoft.Quantum.SparseSimulator.Runtime.so" "linux/libMicrosoft.Quantum.SparseSimulator.Runtime.so"
|
||||
}
|
||||
If (Test-Path "$DROP/SparseQuantumSimulator.dll") {
|
||||
Copy-Item -Verbose "$DROP/SparseQuantumSimulator.dll" "win10/SparseQuantumSimulator.dll"
|
||||
If (Test-Path "$DROP/Microsoft.Quantum.SparseSimulator.Runtime.dll") {
|
||||
Copy-Item -Verbose "$DROP/Microsoft.Quantum.SparseSimulator.Runtime.dll" "win10/Microsoft.Quantum.SparseSimulator.Runtime.dll"
|
||||
}
|
||||
|
||||
$DROP = "$Env:DROP_NATIVE/src/Simulation/qdk_sim_rs/drop";
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
<NativeDll Include="$([MSBuild]::NormalizePath($(ExperimentalSimBuildPath)/qdk_sim.dll))" Dest="win10/Microsoft.Quantum.Experimental.Simulators.Runtime.dll" />
|
||||
|
||||
<!-- Native Sparse Simulator: -->
|
||||
<NativeDll Include="$([MSBuild]::NormalizePath($(NativeSparseSimBuildPath)/libSparseQuantumSimulator.dylib))" Dest="osx/libSparseQuantumSimulator.dylib" />
|
||||
<NativeDll Include="$([MSBuild]::NormalizePath($(NativeSparseSimBuildPath)/libSparseQuantumSimulator.so))" Dest="linux/libSparseQuantumSimulator.so" />
|
||||
<NativeDll Include="$([MSBuild]::NormalizePath($(NativeSparseSimBuildPath)/SparseQuantumSimulator.dll))" Dest="win10/SparseQuantumSimulator.dll" />
|
||||
<NativeDll Include="$([MSBuild]::NormalizePath($(NativeSparseSimBuildPath)/libMicrosoft.Quantum.SparseSimulator.Runtime.dylib))" Dest="osx/libMicrosoft.Quantum.SparseSimulator.Runtime.dylib" />
|
||||
<NativeDll Include="$([MSBuild]::NormalizePath($(NativeSparseSimBuildPath)/libMicrosoft.Quantum.SparseSimulator.Runtime.so))" Dest="linux/libMicrosoft.Quantum.SparseSimulator.Runtime.so" />
|
||||
<NativeDll Include="$([MSBuild]::NormalizePath($(NativeSparseSimBuildPath)/Microsoft.Quantum.SparseSimulator.Runtime.dll))" Dest="win10/Microsoft.Quantum.SparseSimulator.Runtime.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.10)
|
||||
project(SparseQuantumSimulator)
|
||||
project(Microsoft.Quantum.SparseSimulator.Runtime)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
@ -7,16 +7,16 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
|||
|
||||
set(CMAKE_MACOSX_RPATH 1)
|
||||
# Main build files
|
||||
add_library(SparseQuantumSimulator SHARED factory.cpp capi.cpp)
|
||||
add_library(Microsoft.Quantum.SparseSimulator.Runtime SHARED factory.cpp capi.cpp)
|
||||
|
||||
# Windows adds a special dllexport command which must be defined
|
||||
if (WIN32)
|
||||
target_compile_options(SparseQuantumSimulator PUBLIC -fdeclspec)
|
||||
target_compile_definitions(SparseQuantumSimulator PRIVATE BUILD_DLL=1)
|
||||
target_compile_options(Microsoft.Quantum.SparseSimulator.Runtime PUBLIC -fdeclspec)
|
||||
target_compile_definitions(Microsoft.Quantum.SparseSimulator.Runtime PRIVATE BUILD_DLL=1)
|
||||
endif()
|
||||
# Try to optimize with gcc
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(SparseQuantumSimulator PUBLIC -O3 -ftree-vectorize -mavx2 -mfma)
|
||||
target_compile_options(Microsoft.Quantum.SparseSimulator.Runtime PUBLIC -O3 -ftree-vectorize -mavx2 -mfma)
|
||||
endif()
|
||||
|
||||
message("Compiler flags: ${CMAKE_CXX_FLAGS_RELEASE}")
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.Quantum.Simulation.Simulators
|
|||
|
||||
public partial class SparseSimulator
|
||||
{
|
||||
private const string simulatorDll = "SparseQuantumSimulator";
|
||||
private const string simulatorDll = "Microsoft.Quantum.SparseSimulator.Runtime";
|
||||
|
||||
[DllImport(simulatorDll)]
|
||||
private static extern QubitIdType num_qubits_cpp(SimulatorIdType sim);
|
||||
|
|
Загрузка…
Ссылка в новой задаче