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

The Forest Tensor Contractor. More...

#include <ForestContractor.h>

+ Inheritance diagram for TensorNetworks::ForestContractor:
+ Collaboration diagram for TensorNetworks::ForestContractor:

Public Member Functions

virtual ~ForestContractor ()=default
 
double Contract (const TensorNetwork &network, Types::qubit_t qubit) override
 Contract the tensor network.
 
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 Forest Tensor Contractor.

Tensor contractions using the Forest contraction method.

Definition at line 35 of file ForestContractor.h.

Constructor & Destructor Documentation

◆ ~ForestContractor()

virtual TensorNetworks::ForestContractor::~ForestContractor ( )
virtualdefault

Member Function Documentation

◆ Clone()

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

Clone the tensor contractor.

Returns
A shared pointer to the cloned tensor contractor.

Implements TensorNetworks::ITensorContractor.

Definition at line 159 of file ForestContractor.h.

◆ Contract()

double TensorNetworks::ForestContractor::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 44 of file ForestContractor.h.


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