cuquantum.cutensornet.create_marginal

cuquantum.cutensornet.create_marginal(intptr_t handle, intptr_t tensor_network_state, int32_t num_marginal_modes, marginal_modes, int32_t num_projected_modes, projected_modes, marginal_tensor_strides) intptr_t[source]

为给定的张量网络状态创建指定边际张量的表示。

参数
  • handle (intptr_t) – cuTensorNet 库句柄。

  • tensor_network_state (intptr_t) – 张量网络状态。

  • num_marginal_modes (int32_t) – 定义边际张量的开放状态模式的数量。

  • marginal_modes (object) –

    指向定义边际张量的开放状态模式的指针。它可以是

    • 一个 int 作为数组的指针地址,或者

    • 一个 int32_t 的 Python 序列。

  • num_projected_modes (int32_t) – 投影状态模式的数量。

  • projected_modes (object) –

    指向投影状态模式的指针。它可以是

    • 一个 int 作为数组的指针地址,或者

    • 一个 int32_t 的 Python 序列。

  • marginal_tensor_strides (object) –

    边际张量的存储步幅(张量模式的数量是定义开放模式数量的两倍)。如果为 NULL,则将假定默认的广义列主序步幅。它可以是

    • 一个 int 作为数组的指针地址,或者

    • 一个 int64_t 的 Python 序列。

返回

张量网络状态边际。

返回类型

intptr_t