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

#include <TensorNode.h>

+ Collaboration diagram for TensorNetworks::TensorNode:

Public Types

using Index = Eigen::Index
 
using MatrixClass = Eigen::MatrixXcd
 

Public Member Functions

void SetGate (const QC::Gates::QuantumGateWithOp< MatrixClass > &gate, Types::qubit_t q1, Types::qubit_t q2=0)
 
void SetQubit (Types::qubit_t q, bool zero=true)
 
void SetProjector (Types::qubit_t q, bool zero=true)
 
void SetSuper ()
 
void SetId (Index Id)
 
Index GetId () const
 
size_t GetQubitsNumber () const
 
size_t GetRank () const
 
void Clear ()
 
std::shared_ptr< TensorNodeCloneWithoutTensorCopy () const
 
std::shared_ptr< TensorNodeCloneWithADummyTensor () const
 
std::shared_ptr< TensorNodeClone () const
 

Public Attributes

Index id = 0
 
std::vector< Types::qubit_t > qubits
 
std::vector< Indexconnections
 
std::vector< IndexconnectionsIndices
 
std::shared_ptr< Utils::Tensor<> > tensor
 
bool contractsTheNeededQubit = false
 

Static Public Attributes

static constexpr Index NotConnected = -1
 

Detailed Description

Definition at line 27 of file TensorNode.h.

Member Typedef Documentation

◆ Index

using TensorNetworks::TensorNode::Index = Eigen::Index

Definition at line 29 of file TensorNode.h.

◆ MatrixClass

using TensorNetworks::TensorNode::MatrixClass = Eigen::MatrixXcd

Definition at line 30 of file TensorNode.h.

Member Function Documentation

◆ Clear()

void TensorNetworks::TensorNode::Clear ( )
inline

Definition at line 98 of file TensorNode.h.

◆ Clone()

std::shared_ptr< TensorNode > TensorNetworks::TensorNode::Clone ( ) const
inline

Definition at line 138 of file TensorNode.h.

◆ CloneWithADummyTensor()

std::shared_ptr< TensorNode > TensorNetworks::TensorNode::CloneWithADummyTensor ( ) const
inline

Definition at line 125 of file TensorNode.h.

◆ CloneWithoutTensorCopy()

std::shared_ptr< TensorNode > TensorNetworks::TensorNode::CloneWithoutTensorCopy ( ) const
inline

Definition at line 109 of file TensorNode.h.

◆ GetId()

Index TensorNetworks::TensorNode::GetId ( ) const
inline

Definition at line 88 of file TensorNode.h.

◆ GetQubitsNumber()

size_t TensorNetworks::TensorNode::GetQubitsNumber ( ) const
inline

Definition at line 90 of file TensorNode.h.

◆ GetRank()

size_t TensorNetworks::TensorNode::GetRank ( ) const
inline

Definition at line 92 of file TensorNode.h.

◆ SetGate()

void TensorNetworks::TensorNode::SetGate ( const QC::Gates::QuantumGateWithOp< MatrixClass > &  gate,
Types::qubit_t  q1,
Types::qubit_t  q2 = 0 
)
inline

Definition at line 32 of file TensorNode.h.

◆ SetId()

void TensorNetworks::TensorNode::SetId ( Index  Id)
inline

Definition at line 86 of file TensorNode.h.

◆ SetProjector()

void TensorNetworks::TensorNode::SetProjector ( Types::qubit_t  q,
bool  zero = true 
)
inline

Definition at line 70 of file TensorNode.h.

◆ SetQubit()

void TensorNetworks::TensorNode::SetQubit ( Types::qubit_t  q,
bool  zero = true 
)
inline

Definition at line 56 of file TensorNode.h.

◆ SetSuper()

void TensorNetworks::TensorNode::SetSuper ( )
inline

Definition at line 82 of file TensorNode.h.

Member Data Documentation

◆ connections

std::vector<Index> TensorNetworks::TensorNode::connections

Definition at line 158 of file TensorNode.h.

◆ connectionsIndices

std::vector<Index> TensorNetworks::TensorNode::connectionsIndices

Definition at line 161 of file TensorNode.h.

◆ contractsTheNeededQubit

bool TensorNetworks::TensorNode::contractsTheNeededQubit = false

Definition at line 168 of file TensorNode.h.

◆ id

Index TensorNetworks::TensorNode::id = 0

Definition at line 153 of file TensorNode.h.

◆ NotConnected

constexpr Index TensorNetworks::TensorNode::NotConnected = -1
staticconstexpr

Definition at line 151 of file TensorNode.h.

◆ qubits

std::vector<Types::qubit_t> TensorNetworks::TensorNode::qubits

Definition at line 156 of file TensorNode.h.

◆ tensor

std::shared_ptr<Utils::Tensor<> > TensorNetworks::TensorNode::tensor

Definition at line 163 of file TensorNode.h.


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