Maestro 0.3.11
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
TensorContraction.h File Reference
#include <algorithm>
#include <array>
#include <complex>
#include <cstddef>
#include <limits>
#include <stdexcept>
#include <type_traits>
#include <utility>
#include <valarray>
#include <vector>
#include <Eigen/Core>
Include dependency graph for TensorContraction.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Utils::detail::TensorAxis
class  Utils::detail::TensorAxisCursor
class  Utils::detail::TensorAxisMask
class  Utils::detail::TensorAxisOffsets
struct  Utils::detail::TensorAxisPattern
class  Utils::detail::TensorContractionPlan

Namespaces

namespace  Utils
 Portable dense contraction kernels.
namespace  Utils::detail

Functions

bool Utils::detail::TensorAddBytes (size_t &used, size_t count, size_t elementSize, size_t limit)
template<class Pairs>
std::vector< size_t > Utils::detail::TensorContractionDimensions (const std::vector< size_t > &da, const std::vector< size_t > &db, const Pairs &pairs, TensorAxisMask &usedA, TensorAxisMask &usedB)
template<class Pairs>
void Utils::detail::TensorContractionPatterns (const std::vector< size_t > &da, const std::vector< size_t > &db, const TensorAxisMask &usedA, const TensorAxisMask &usedB, const Pairs &pairs, TensorAxisPattern &fa, TensorAxisPattern &fb, TensorAxisPattern &ka, TensorAxisPattern &kb)
int Utils::detail::TensorContractionThreads (size_t jobs, double work, bool allow)
template<class T, class Storage>
void Utils::detail::TensorDenseContraction (const Storage &a, const Storage &b, Storage &out, const TensorAxisPattern &fa, const TensorAxisPattern &fb, const TensorAxisPattern &ka, const TensorAxisPattern &kb, bool allow, int gateSize=0)
template<class T, class Input, class Output>
void Utils::detail::TensorExecuteContraction (const Input &a, const Input &b, Output &out, const TensorAxisPattern &fa, const TensorAxisPattern &fb, const TensorAxisPattern &ka, const TensorAxisPattern &kb, const TensorAxisOffsets &af, const TensorAxisOffsets &bf, const TensorAxisOffsets &ac, const TensorAxisOffsets &bc, int gateSize, bool allow, T *packing=nullptr)
template<size_t G, bool SmallLeft, class T, class Input, class Output>
void Utils::detail::TensorGateContraction (const Input &a, const Input &b, Output &out, size_t count, const TensorAxisOffsets &af, const TensorAxisOffsets &bf, const TensorAxisOffsets &ac, const TensorAxisOffsets &bc, bool allow)
template<size_t G, class T, size_t... X>
T Utils::detail::TensorGateProduct (const std::array< T, G > &values, const T *coefficients, std::index_sequence< X... >)
int Utils::detail::TensorGateSize (const std::vector< size_t > &da, const std::vector< size_t > &db, size_t pairs)
bool Utils::detail::TensorMatrixContiguous (const TensorAxisPattern &rows, const TensorAxisPattern &columns)
template<class Function>
void Utils::detail::TensorParallelRanges (size_t jobs, int threads, const Function &function)
template<class T, class Storage>
T Utils::detail::TensorScalarContraction (const Storage &a, const Storage &b, const TensorAxisPattern &ka, const TensorAxisPattern &kb, bool allow)
size_t Utils::detail::TensorSizeProduct (size_t a, size_t b)
template<class T, class Storage, class Pairs>
bool Utils::detail::TensorSmallContraction (const Storage &a, const Storage &b, Storage &out, const std::vector< size_t > &da, const std::vector< size_t > &db, const TensorAxisMask &usedA, const TensorAxisMask &usedB, const Pairs &pairs)

Variables

template<class T, class Storage>
constexpr bool Utils::detail::TensorEigenStorage

Class Documentation

◆ Utils::detail::TensorAxis

struct Utils::detail::TensorAxis

Definition at line 57 of file TensorContraction.h.

Collaboration diagram for Utils::detail::TensorAxis:
Class Members
size_t extent
size_t stride