diff --git a/lib/custatevec/src/libcustatevec.jl b/lib/custatevec/src/libcustatevec.jl index 1ce46254f1..e257479dc0 100644 --- a/lib/custatevec/src/libcustatevec.jl +++ b/lib/custatevec/src/libcustatevec.jl @@ -986,6 +986,55 @@ end collapse::custatevecCollapseOp_t)::custatevecStatus_t end +@checked function custatevecComputeExpectationBatchedGetWorkspaceSize(handle, svDataType, + nIndexBits, nSVs, + svStride, matrices, + matrixDataType, + layout, nMatrices, + nBasisBits, + computeType, + extraWorkspaceSizeInBytes) + initialize_context() + @gcsafe_ccall libcustatevec.custatevecComputeExpectationBatchedGetWorkspaceSize(handle::custatevecHandle_t, + svDataType::cudaDataType_t, + nIndexBits::UInt32, + nSVs::UInt32, + svStride::custatevecIndex_t, + matrices::Ptr{Cvoid}, + matrixDataType::cudaDataType_t, + layout::custatevecMatrixLayout_t, + nMatrices::UInt32, + nBasisBits::UInt32, + computeType::custatevecComputeType_t, + extraWorkspaceSizeInBytes::Ptr{Csize_t})::custatevecStatus_t +end + +@checked function custatevecComputeExpectationBatched(handle, batchedSv, svDataType, + nIndexBits, nSVs, svStride, + expectationValues, matrices, + matrixDataType, layout, nMatrices, + basisBits, nBasisBits, computeType, + extraWorkspace, + extraWorkspaceSizeInBytes) + initialize_context() + @gcsafe_ccall libcustatevec.custatevecComputeExpectationBatched(handle::custatevecHandle_t, + batchedSv::Ptr{Cvoid}, + svDataType::cudaDataType_t, + nIndexBits::UInt32, + nSVs::UInt32, + svStride::custatevecIndex_t, + expectationValues::Ptr{ComplexF64}, + matrices::Ptr{Cvoid}, + matrixDataType::cudaDataType_t, + layout::custatevecMatrixLayout_t, + nMatrices::UInt32, + basisBits::Ptr{Int32}, + nBasisBits::UInt32, + computeType::custatevecComputeType_t, + extraWorkspace::Ptr{Cvoid}, + extraWorkspaceSizeInBytes::Csize_t)::custatevecStatus_t +end + mutable struct custatevecSubSVMigratorDescriptor end const custatevecSubSVMigratorDescriptor_t = Ptr{custatevecSubSVMigratorDescriptor} diff --git a/res/wrap/Manifest.toml b/res/wrap/Manifest.toml index 50e09fff9b..d7656aa773 100644 --- a/res/wrap/Manifest.toml +++ b/res/wrap/Manifest.toml @@ -27,21 +27,21 @@ version = "3.4.3" [[deps.CUDA_Driver_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "325058b426c2b421e3d2df3d5fa646d72d2e3e7e" +git-tree-sha1 = "e2d9695d60b647e8803f1b5771412a7bf980e971" uuid = "4ee394cb-3365-5eb0-8335-949819d2adfc" -version = "0.9.2+0" +version = "0.10.2+0" [[deps.CUDA_Runtime_jll]] deps = ["Artifacts", "CUDA_Driver_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "d95ba140b3f180763253248324fdec5799ce2b00" +git-tree-sha1 = "1dce783060fb871658a6a4852c853293126eef8c" uuid = "76a88914-d11a-5bdc-97e0-2f5a05c973a2" -version = "0.15.0+0" +version = "0.15.2+0" [[deps.CUDA_SDK_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "b3345d4957e88050c20e8cc7fc09efe406cbb35b" +git-tree-sha1 = "b3e626d00ab811cb5b97e5ee640ca39963a7dc88" uuid = "6cbf2f2e-7e60-5632-ac76-dca2274e0be0" -version = "12.6.0+0" +version = "12.6.1+0" [[deps.CUDNN_jll]] deps = ["Artifacts", "CUDA_Runtime_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] @@ -75,9 +75,9 @@ version = "0.8.12" [[deps.Compat]] deps = ["TOML", "UUIDs"] -git-tree-sha1 = "b1c55339b7c6c350ee89f2c1604299660525b248" +git-tree-sha1 = "8ae8d32e09f0dcf42a36b90d4e17f5dd2e4c4215" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.15.0" +version = "4.16.0" [deps.Compat.extensions] CompatLinearAlgebraExt = "LinearAlgebra" @@ -125,9 +125,9 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] -git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +git-tree-sha1 = "f389674c99bfcde17dc57454011aa44d5a260a40" uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.5.0" +version = "1.6.0" [[deps.JSON]] deps = ["Dates", "Mmap", "Parsers", "Unicode"] @@ -136,10 +136,10 @@ uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.21.4" [[deps.JuliaFormatter]] -deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "Pkg", "PrecompileTools", "Tokenize"] -git-tree-sha1 = "4b0b04fe63e02eed776181e14ebc1f48d787ceec" +deps = ["CSTParser", "CommonMark", "DataStructures", "Glob", "PrecompileTools", "TOML", "Tokenize"] +git-tree-sha1 = "bb4696471330275adfd6c78c6173f276e8c067aa" uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899" -version = "1.0.59" +version = "1.0.60" [[deps.LazyArtifacts]] deps = ["Artifacts", "Pkg"] @@ -298,9 +298,9 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" [[deps.XML2_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] -git-tree-sha1 = "d9717ce3518dc68a99e6b96300813760d887a01d" +git-tree-sha1 = "1165b0443d0eca63ac1e32b8c0eb69ed2f4f8127" uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" -version = "2.13.1+0" +version = "2.13.3+0" [[deps.XSLT_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "XML2_jll", "Zlib_jll"] diff --git a/res/wrap/custatevec.toml b/res/wrap/custatevec.toml index ae0e8c7ac0..694ce2a3e3 100644 --- a/res/wrap/custatevec.toml +++ b/res/wrap/custatevec.toml @@ -134,3 +134,6 @@ needs_context = false [api.custatevecSwapIndexBits.argtypes] 2 = "CuPtr{Cvoid}" + +[api.custatevecComputeExpectationBatched.argtypes] +7 = "Ptr{ComplexF64}"