cuquantum.custatevec.multi_device_swap_index_bits¶
- cuquantum.custatevec.multi_device_swap_index_bits(handles, uint32_t n_handles, sub_svs, int sv_data_type, uint32_t n_global_index_bits, uint32_t n_local_index_bits, swapped_bits, uint32_t n_swapped_bits, mask_bit_string, mask_ordering, uint32_t mask_len, int device_network_type)[源代码]¶
在多个设备上交换索引位并重新排序状态向量元素。
- 参数
handles –
库句柄的主机数组。它可以是
n_handles (uint32_t) – 句柄的数量。
sub_svs –
子状态向量指针的主机数组。它可以是
sv_data_type (cuquantum.cudaDataType) – 状态向量的数据类型。
n_global_index_bits (uint32_t) – 全局索引位的数量。
n_local_index_bits (uint32_t) – 本地索引位的数量。
swapped_bits –
交换索引位对的主机数组。它可以是
int
作为指向嵌套序列的指针地址交换索引位的嵌套 Python 序列
n_swapped_bits (uint32_t) – 交换索引位对的数量。
mask_bit_string –
用于指定掩码值的主机数组。它可以是
int
作为指向数组的指针地址掩码值的 Python 序列
mask_ordering –
掩码顺序的主机数组。它可以是
int
作为指向数组的指针地址索引位顺序的 Python 序列
mask_len (uint32_t) –
mask_ordering
的长度。device_network_type (DeviceNetworkType) – 设备网络拓扑。