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

#include <TensorNode.h>

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_tqubits
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 102 of file TensorNode.h.

◆ Clone()

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

Definition at line 142 of file TensorNode.h.

◆ CloneWithADummyTensor()

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

Definition at line 129 of file TensorNode.h.

◆ CloneWithoutTensorCopy()

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

Definition at line 113 of file TensorNode.h.

◆ GetId()

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

Definition at line 91 of file TensorNode.h.

◆ GetQubitsNumber()

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

Definition at line 93 of file TensorNode.h.

◆ GetRank()

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

Definition at line 95 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 89 of file TensorNode.h.

◆ SetProjector()

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

Definition at line 72 of file TensorNode.h.

◆ SetQubit()

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

Definition at line 58 of file TensorNode.h.

◆ SetSuper()

void TensorNetworks::TensorNode::SetSuper ( )
inline

Definition at line 84 of file TensorNode.h.

Member Data Documentation

◆ connections

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

Definition at line 162 of file TensorNode.h.

◆ connectionsIndices

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

Definition at line 165 of file TensorNode.h.

◆ contractsTheNeededQubit

bool TensorNetworks::TensorNode::contractsTheNeededQubit = false

Definition at line 172 of file TensorNode.h.

◆ id

Index TensorNetworks::TensorNode::id = 0

Definition at line 157 of file TensorNode.h.

◆ NotConnected

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

Definition at line 155 of file TensorNode.h.

◆ qubits

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

Definition at line 160 of file TensorNode.h.

◆ tensor

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

Definition at line 167 of file TensorNode.h.


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