Maestro 0.2.5
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Simulators::MPSDummySimulator Class Reference

#include <MPSDummySimulator.h>

+ Collaboration diagram for Simulators::MPSDummySimulator:

Public Types

using GateClass = QC::TensorNetworks::MPSSimulatorInterface::GateClass
 
using IndexType = long long int
 
using MatrixClass = QC::TensorNetworks::MPSSimulatorInterface::MatrixClass
 

Public Member Functions

 MPSDummySimulator (size_t N)
 
void ApplyGate (const GateClass &gate, IndexType qubit, IndexType controllingQubit1=0)
 
void ApplyGate (const QC::Gates::AppliedGate< MatrixClass > &gate)
 
void ApplyGate (const std::shared_ptr< Circuits::IOperation<> > &gate)
 
void ApplyGates (const std::vector< QC::Gates::AppliedGate< MatrixClass > > &gates)
 
void ApplyGates (const std::vector< std::shared_ptr< Circuits::IOperation<> > > &gates)
 
void Clear ()
 
std::unique_ptr< MPSDummySimulatorClone () const
 
std::vector< long long int > ComputeOptimalQubitsMap (const std::vector< std::shared_ptr< Circuits::Circuit<> > > &layers, int nrShuffles=25)
 
void EvaluateMeetingPositionCost (IndexType meetPosition, const std::vector< std::shared_ptr< Circuits::IOperation<> > > &upcomingGates, long long int currentGateIndex, int lookaheadDepth, int lookaheadDepthWithHeuristic, double currentCost, double &bestCost, bool useSameDummy=false)
 
IndexType FindBestMeetingPosition (const std::vector< std::shared_ptr< Circuits::IOperation<> > > &upcomingGates, long long int currentGateIndex, int lookaheadDepth, int lookaheadDepthWithHeuristic, double currentCost, double &bestCost)
 
const std::vector< double > & getCurrentBondDimensions () const
 
const std::vector< double > & getMaxBondDimensions () const
 
size_t getNrQubits () const
 
const std::vector< IndexType > & getQubitsMap () const
 
const std::vector< IndexType > & getQubitsMapInv () const
 
double getTotalSwappingCost () const
 
void print () const
 
void SetCurrentBondDimensions (const std::vector< double > &dims)
 
void SetInitialQubitsMap (const std::vector< long long int > &initialMap)
 
void SetMaxBondDimension (IndexType val)
 
void setTotalSwappingCost (double cost)
 
void SwapQubitsToPosition (IndexType qubit1, IndexType qubit2, IndexType meetPosition)
 

Detailed Description

Definition at line 33 of file MPSDummySimulator.h.

Member Typedef Documentation

◆ GateClass

using Simulators::MPSDummySimulator::GateClass = QC::TensorNetworks::MPSSimulatorInterface::GateClass

Definition at line 37 of file MPSDummySimulator.h.

◆ IndexType

Definition at line 35 of file MPSDummySimulator.h.

◆ MatrixClass

using Simulators::MPSDummySimulator::MatrixClass = QC::TensorNetworks::MPSSimulatorInterface::MatrixClass

Definition at line 36 of file MPSDummySimulator.h.

Constructor & Destructor Documentation

◆ MPSDummySimulator()

Simulators::MPSDummySimulator::MPSDummySimulator ( size_t  N)
inline

Definition at line 39 of file MPSDummySimulator.h.

References SetMaxBondDimension().

Member Function Documentation

◆ ApplyGate() [1/3]

void Simulators::MPSDummySimulator::ApplyGate ( const GateClass gate,
IndexType  qubit,
IndexType  controllingQubit1 = 0 
)
inline

Definition at line 146 of file MPSDummySimulator.h.

References getNrQubits().

◆ ApplyGate() [2/3]

void Simulators::MPSDummySimulator::ApplyGate ( const QC::Gates::AppliedGate< MatrixClass > &  gate)
inline

Definition at line 125 of file MPSDummySimulator.h.

References ApplyGate().

Referenced by ApplyGate(), ApplyGate(), ApplyGates(), ApplyGates(), and EvaluateMeetingPositionCost().

◆ ApplyGate() [3/3]

void Simulators::MPSDummySimulator::ApplyGate ( const std::shared_ptr< Circuits::IOperation<> > &  gate)
inline

Definition at line 129 of file MPSDummySimulator.h.

References ApplyGate().

◆ ApplyGates() [1/2]

void Simulators::MPSDummySimulator::ApplyGates ( const std::vector< QC::Gates::AppliedGate< MatrixClass > > &  gates)
inline

Definition at line 176 of file MPSDummySimulator.h.

References ApplyGate().

Referenced by ComputeOptimalQubitsMap().

◆ ApplyGates() [2/2]

void Simulators::MPSDummySimulator::ApplyGates ( const std::vector< std::shared_ptr< Circuits::IOperation<> > > &  gates)
inline

Definition at line 181 of file MPSDummySimulator.h.

References ApplyGate().

◆ Clear()

void Simulators::MPSDummySimulator::Clear ( )
inline

Definition at line 62 of file MPSDummySimulator.h.

◆ Clone()

std::unique_ptr< MPSDummySimulator > Simulators::MPSDummySimulator::Clone ( ) const
inline

Definition at line 45 of file MPSDummySimulator.h.

◆ ComputeOptimalQubitsMap()

std::vector< long long int > Simulators::MPSDummySimulator::ComputeOptimalQubitsMap ( const std::vector< std::shared_ptr< Circuits::Circuit<> > > &  layers,
int  nrShuffles = 25 
)
inline

◆ EvaluateMeetingPositionCost()

void Simulators::MPSDummySimulator::EvaluateMeetingPositionCost ( IndexType  meetPosition,
const std::vector< std::shared_ptr< Circuits::IOperation<> > > &  upcomingGates,
long long int  currentGateIndex,
int  lookaheadDepth,
int  lookaheadDepthWithHeuristic,
double  currentCost,
double &  bestCost,
bool  useSameDummy = false 
)
inline

importanceFactor

Definition at line 222 of file MPSDummySimulator.h.

References ApplyGate(), FindBestMeetingPosition(), getTotalSwappingCost(), and SwapQubitsToPosition().

Referenced by FindBestMeetingPosition().

◆ FindBestMeetingPosition()

IndexType Simulators::MPSDummySimulator::FindBestMeetingPosition ( const std::vector< std::shared_ptr< Circuits::IOperation<> > > &  upcomingGates,
long long int  currentGateIndex,
int  lookaheadDepth,
int  lookaheadDepthWithHeuristic,
double  currentCost,
double &  bestCost 
)
inline

Definition at line 349 of file MPSDummySimulator.h.

References EvaluateMeetingPositionCost().

Referenced by EvaluateMeetingPositionCost().

◆ getCurrentBondDimensions()

const std::vector< double > & Simulators::MPSDummySimulator::getCurrentBondDimensions ( ) const
inline

Definition at line 206 of file MPSDummySimulator.h.

◆ getMaxBondDimensions()

const std::vector< double > & Simulators::MPSDummySimulator::getMaxBondDimensions ( ) const
inline

Definition at line 210 of file MPSDummySimulator.h.

◆ getNrQubits()

size_t Simulators::MPSDummySimulator::getNrQubits ( ) const
inline

Definition at line 60 of file MPSDummySimulator.h.

Referenced by ApplyGate(), and ComputeOptimalQubitsMap().

◆ getQubitsMap()

const std::vector< IndexType > & Simulators::MPSDummySimulator::getQubitsMap ( ) const
inline

Definition at line 212 of file MPSDummySimulator.h.

◆ getQubitsMapInv()

const std::vector< IndexType > & Simulators::MPSDummySimulator::getQubitsMapInv ( ) const
inline

Definition at line 214 of file MPSDummySimulator.h.

◆ getTotalSwappingCost()

double Simulators::MPSDummySimulator::getTotalSwappingCost ( ) const
inline

Definition at line 217 of file MPSDummySimulator.h.

Referenced by ComputeOptimalQubitsMap(), and EvaluateMeetingPositionCost().

◆ print()

void Simulators::MPSDummySimulator::print ( ) const
inline

Definition at line 118 of file MPSDummySimulator.h.

◆ SetCurrentBondDimensions()

void Simulators::MPSDummySimulator::SetCurrentBondDimensions ( const std::vector< double > &  dims)
inline

Definition at line 196 of file MPSDummySimulator.h.

◆ SetInitialQubitsMap()

void Simulators::MPSDummySimulator::SetInitialQubitsMap ( const std::vector< long long int > &  initialMap)
inline

Definition at line 186 of file MPSDummySimulator.h.

Referenced by ComputeOptimalQubitsMap().

◆ SetMaxBondDimension()

void Simulators::MPSDummySimulator::SetMaxBondDimension ( IndexType  val)
inline

Definition at line 64 of file MPSDummySimulator.h.

Referenced by MPSDummySimulator().

◆ setTotalSwappingCost()

void Simulators::MPSDummySimulator::setTotalSwappingCost ( double  cost)
inline

Definition at line 216 of file MPSDummySimulator.h.

◆ SwapQubitsToPosition()

void Simulators::MPSDummySimulator::SwapQubitsToPosition ( IndexType  qubit1,
IndexType  qubit2,
IndexType  meetPosition 
)
inline

Definition at line 757 of file MPSDummySimulator.h.

Referenced by EvaluateMeetingPositionCost().


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