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

The Vertical Variable Elimination Tensor Contractor. More...

#include <VerticalContractor.h>

+ Inheritance diagram for TensorNetworks::VerticalContractor:
+ Collaboration diagram for TensorNetworks::VerticalContractor:

Public Member Functions

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 Vertical Variable Elimination Tensor Contractor.

Tensor contractions using the Vertical Variable Elimination method.

Definition at line 32 of file VerticalContractor.h.

Member Function Documentation

◆ Clone()

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

Clone the tensor contractor.

Returns
A shared pointer to the cloned tensor contractor.

Implements TensorNetworks::ITensorContractor.

Definition at line 141 of file VerticalContractor.h.

◆ Contract()

double TensorNetworks::VerticalContractor::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 40 of file VerticalContractor.h.


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