|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
The Base Class Tensor Contractor. More...
#include <BaseContractor.h>
Public Types | |
| using | TensorsMap = ITensorContractor::TensorsMap |
| Public Types inherited from TensorNetworks::ITensorContractor | |
| using | TensorsMap |
Public Member Functions | |
| 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. | |
| Public Member Functions inherited from TensorNetworks::ITensorContractor | |
| virtual double | Contract (const TensorNetwork &network, Types::qubit_t qubit)=0 |
| Contract the tensor network. | |
| virtual std::shared_ptr< ITensorContractor > | Clone () const =0 |
| Clone the tensor contractor. | |
Static Public Member Functions | |
| static size_t | GetResultRank (const std::shared_ptr< TensorNode > &tensor1, const std::shared_ptr< TensorNode > &tensor2) |
Protected Attributes | |
| size_t | maxTensorRank |
| The maximum rank of the tensors in the network. | |
| bool | enableMultithreading |
| A flag to indicate if multithreading should be enabled. | |
The Base Class Tensor Contractor.
Tensor contractions common functionality.
Definition at line 29 of file BaseContractor.h.
Definition at line 31 of file BaseContractor.h.
|
inline |
Definition at line 128 of file BaseContractor.h.
|
inlineoverridevirtual |
Implements TensorNetworks::ITensorContractor.
Definition at line 244 of file BaseContractor.h.
|
inlineoverridevirtual |
Get the multithreading flag.
Returns the multithreading flag.
Implements TensorNetworks::ITensorContractor.
Definition at line 265 of file BaseContractor.h.
|
inlinestatic |
Definition at line 222 of file BaseContractor.h.
|
inlineoverridevirtual |
Implements TensorNetworks::ITensorContractor.
Definition at line 34 of file BaseContractor.h.
|
inlineoverridevirtual |
Enable/disable multithreading.
Enable/disable multithreading. Default is enabled.
| multithreading | A flag to indicate if multithreading should be enabled. |
Implements TensorNetworks::ITensorContractor.
Definition at line 254 of file BaseContractor.h.
|
protected |
A flag to indicate if multithreading should be enabled.
Definition at line 270 of file BaseContractor.h.
|
protected |
The maximum rank of the tensors in the network.
Definition at line 268 of file BaseContractor.h.