Maestro 0.1.0
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
TensorNetworks::DumbContractor Class Reference

The Dumb Tensor Contractor. More...

#include <DumbContractor.h>

+ Inheritance diagram for TensorNetworks::DumbContractor:
+ Collaboration diagram for TensorNetworks::DumbContractor:

Public Member Functions

double Contract (const TensorNetwork &network, Types::qubit_t qubit) override
 Contract the tensor network.
 
void SetContractTheLowestTensorId (bool c)
 
bool GetContractTheLowestTensorId () const
 
std::shared_ptr< ITensorContractorClone () const override
 Clone the tensor contractor.
 
- Public Member Functions inherited from TensorNetworks::BaseContractor
TensorsMap InitializeTensors (const TensorNetwork &network, Types::qubit_t qubit, std::vector< Eigen::Index > &keys, std::unordered_map< Eigen::Index, Eigen::Index > &keysKeys, bool fillKeys=true, bool contract=true) override
 
template<class PassedTensorsMap = TensorsMap>
Eigen::Index ContractNodes (Types::qubit_t qubit, PassedTensorsMap &tensors, Eigen::Index tensor1Id, Eigen::Index tensor2Id, Eigen::Index resultRank)
 
size_t GetMaxTensorRank () const override
 
void SetMultithreading (bool multithreading=true) override
 Enable/disable multithreading.
 
bool GetMultithreading () const override
 Get the multithreading flag.
 

Additional Inherited Members

- Public Types inherited from TensorNetworks::BaseContractor
using TensorsMap = ITensorContractor::TensorsMap
 
- Public Types inherited from TensorNetworks::ITensorContractor
using TensorsMap = std::unordered_map< Eigen::Index, std::shared_ptr< TensorNode > >
 
- Static Public Member Functions inherited from TensorNetworks::BaseContractor
static size_t GetResultRank (const std::shared_ptr< TensorNode > &tensor1, const std::shared_ptr< TensorNode > &tensor2)
 
- Protected Attributes inherited from TensorNetworks::BaseContractor
size_t maxTensorRank
 The maximum rank of the tensors in the network.
 
bool enableMultithreading
 A flag to indicate if multithreading should be enabled.
 

Detailed Description

The Dumb Tensor Contractor.

Tensor contractions using the Dumb contraction method.

Definition at line 37 of file DumbContractor.h.

Member Function Documentation

◆ Clone()

std::shared_ptr< ITensorContractor > TensorNetworks::DumbContractor::Clone ( ) const
inlineoverridevirtual

Clone the tensor contractor.

Returns
A shared pointer to the cloned tensor contractor.

Implements TensorNetworks::ITensorContractor.

Definition at line 145 of file DumbContractor.h.

◆ Contract()

double TensorNetworks::DumbContractor::Contract ( const TensorNetwork network,
Types::qubit_t  qubit 
)
inlineoverridevirtual

Contract the tensor network.

Parameters
networkThe tensor network to contract.
Returns
The result of the contraction.

Implements TensorNetworks::ITensorContractor.

Definition at line 45 of file DumbContractor.h.

◆ GetContractTheLowestTensorId()

bool TensorNetworks::DumbContractor::GetContractTheLowestTensorId ( ) const
inline

Definition at line 136 of file DumbContractor.h.

◆ SetContractTheLowestTensorId()

void TensorNetworks::DumbContractor::SetContractTheLowestTensorId ( bool  c)
inline

Definition at line 134 of file DumbContractor.h.


The documentation for this class was generated from the following file: