QNLP  v1.0
QNLP::GateMetaData Struct Reference

Meta container object for gate caching. More...

#include <GateCache.hpp>

Collaboration diagram for QNLP::GateMetaData:
Collaboration graph

Public Member Functions

 GateMetaData (std::string labelGate="", std::size_t sqrt_depth=0, bool adjoint=false, double theta=0.0)
 
bool operator== (const GateMetaData &other) const
 

Data Fields

std::string labelGate
 
std::size_t sqrt_depth
 
bool adjoint
 
double theta
 

Friends

std::ostream & operator<< (std::ostream &os, const GateMetaData &gmd)
 

Detailed Description

Meta container object for gate caching.

Definition at line 46 of file GateCache.hpp.

Constructor & Destructor Documentation

◆ GateMetaData()

QNLP::GateMetaData::GateMetaData ( std::string  labelGate = "",
std::size_t  sqrt_depth = 0,
bool  adjoint = false,
double  theta = 0.0 
)
inline

Definition at line 53 of file GateCache.hpp.

56  : labelGate(labelGate),
58  adjoint(adjoint),
59  theta(theta)
60  { }
std::size_t sqrt_depth
Definition: GateCache.hpp:49
std::string labelGate
Definition: GateCache.hpp:47

Member Function Documentation

◆ operator==()

bool QNLP::GateMetaData::operator== ( const GateMetaData other) const
inline

Definition at line 62 of file GateCache.hpp.

62  {
63  return ( !labelGate.compare(other.labelGate) &&
64  fpComp<double>(theta, other.theta) &&
65  sqrt_depth == other.sqrt_depth ); /* labels and depth should be sufficient
66  && theta == other.third);*/
67  }
std::size_t sqrt_depth
Definition: GateCache.hpp:49
std::string labelGate
Definition: GateCache.hpp:47

References labelGate, sqrt_depth, and theta.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const GateMetaData gmd 
)
friend

Definition at line 69 of file GateCache.hpp.

69  {
70  os << gmd.labelGate << ',' << gmd.sqrt_depth << ',' << gmd.adjoint << "," << gmd.theta;
71  return os;
72  }

Field Documentation

◆ adjoint

bool QNLP::GateMetaData::adjoint

Definition at line 50 of file GateCache.hpp.

◆ labelGate

std::string QNLP::GateMetaData::labelGate

Definition at line 47 of file GateCache.hpp.

Referenced by QNLP::GateMetaDataHasher::operator()(), and operator==().

◆ sqrt_depth

std::size_t QNLP::GateMetaData::sqrt_depth

Definition at line 49 of file GateCache.hpp.

Referenced by QNLP::GateMetaDataHasher::operator()(), and operator==().

◆ theta

double QNLP::GateMetaData::theta

Definition at line 51 of file GateCache.hpp.

Referenced by QNLP::GateMetaDataHasher::operator()(), and operator==().


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