cuquantum.custatevec.SVSwapParameters

class cuquantum.custatevec.SVSwapParameters[source]

A wrapper class holding a set of data transfer parameters.

A instance of this cass can be constructed manually (either without any argument, or using the from_data() factory method). The parameters can be retrieved/set via the instance attributes’ getters/setters.

swap_batch_index

See custatevecSVSwapParameters_t::swapBatchIndex.

Type

int32_t

org_sub_sv_index

See custatevecSVSwapParameters_t::orgSubSVIndex.

Type

int32_t

dst_sub_sv_index

See custatevecSVSwapParameters_t::dstSubSVIndex.

Type

int32_t

org_segment_mask_string

Should be a 1D array of dtype numpy.int32 and of size custatevec.MAX_SEGMENT_MASK_SIZE. See custatevecSVSwapParameters_t::orgSegmentMaskString.

Type

numpy.ndarray

dst_segment_mask_string

Should be a 1D array of dtype numpy.int32 and of size custatevec.MAX_SEGMENT_MASK_SIZE. See custatevecSVSwapParameters_t::dstSegmentMaskString.

Type

numpy.ndarray

segment_mask_ordering

Should be a 1D array of dtype numpy.int32 and of size custatevec.MAX_SEGMENT_MASK_SIZE. See custatevecSVSwapParameters_t::segmentMaskOrdering.

Type

numpy.ndarray

segment_mask_len

See custatevecSVSwapParameters_t::segmentMaskLen.

Type

uint32_t

n_segment_bits

See custatevecSVSwapParameters_t::nSegmentBits.

Type

uint32_t

data_transfer_type

See custatevecSVSwapParameters_t::dataTransferType.

Type

DataTransferType

transfer_size

See custatevecSVSwapParameters_t::transferSize.

Type

int64_t

Methods

__init__(*args, **kwargs)
static from_data(data)[source]

Construct an SVSwapParameters instance from an existing NumPy ndarray.

Parameters

data (numpy.ndarray) – Must be a size-1 NumPy ndarray of dtype sv_swap_parameters_dtype.

Attributes

data

The underlying storage.

Type

data (numpy.ndarray)

ptr

The pointer address (as Python int) to the underlying storage.

Type

ptr (intptr_t)