Python objects & constants

Objects

Network(subscripts, *operands[, qualifiers, ...])

Create a tensor network object specified as an Einstein summation expression.

BaseCUDAMemoryManager(*args, **kwargs)

Protocol for memory manager plugins.

MemoryPointer(device_ptr, size, finalizer)

An RAII class for a device memory buffer.

CircuitToEinsum(circuit[, dtype, backend])

Create a converter object that can generate Einstein summation expressions and tensor operands for a given circuit.

NetworkOptions([compute_type, device_id, ...])

A data class for providing options to the cuquantum.Network object.

OptimizerInfo(largest_intermediate, ...)

A data class for capturing optimizer information.

OptimizerOptions([samples, threads, path, ...])

A data class for providing options to the cuTensorNet optimizer.

PathFinderOptions([num_partitions, ...])

A data class for capturing the path finder options.

ReconfigOptions([num_iterations, num_leaves])

A data class for capturing the reconfiguration options.

SlicerOptions([disable_slicing, ...])

A data class for capturing the slicer options.

Enums

Here is a collection of enums supported by both custatevec and cutensornet modules.

Warning

In a future release, enums exposed here will be deprecated and removed in favor of those imported from CUDA Python.

ComputeType(value)

An enumeration of CUDA compute types.

cudaDataType(value)

An enumeration of cudaDataType_t.

libraryPropertyType(value)

An enumeration of library version information.

Python functions

contract(subscripts, *operands[, options, ...])

Evaluate the Einstein summation convention on the operands.

contract_path(subscripts, *operands[, ...])

Evaluate the "best" contraction order by allowing the creation of intermediate tensors.

einsum(subscripts, *operands[, out, dtype, ...])

A drop-in replacement of numpy.einsum() for computing the specified tensor contraction using cuTensorNet.

einsum_path(subscripts, *operands[, optimize])

A drop-in replacement of numpy.einsum_path() for evaluating the "best" contraction order using cuTensorNet.

Command Line Support

The outputs of python -m cuquantum can be used in your build system to help discover the location of binaries used by cuQuantum Python.

usage: __main__.py [-h] [--includes] [--libs]
                   [--target {custatevec,cutensornet}]

options:
  -h, --help            show this help message and exit
  --includes            get cuQuantum include flags
  --libs                get cuQuantum linker flags
  --target {custatevec,cutensornet}
                        get the linker flag for the target cuQuantum component