Maestro 0.2.11
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, int nrSwaps=10)
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
double getGrowthFactorGate () const
double getGrowthFactorSwap () 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 setGrowthFactorGate (double factor)
void setGrowthFactorSwap (double factor)
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().

Referenced by Clone(), and EvaluateMeetingPositionCost().

Member Function Documentation

◆ ApplyGate() [1/3]

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

Definition at line 178 of file MPSDummySimulator.h.

References getNrQubits().

◆ ApplyGate() [2/3]

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

Definition at line 134 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 138 of file MPSDummySimulator.h.

References ApplyGate(), Circuits::kCCXGateType, and Circuits::kGate.

◆ ApplyGates() [1/2]

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

Definition at line 212 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 217 of file MPSDummySimulator.h.

References ApplyGate().

◆ Clear()

void Simulators::MPSDummySimulator::Clear ( )
inline

Definition at line 71 of file MPSDummySimulator.h.

◆ Clone()

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

Definition at line 45 of file MPSDummySimulator.h.

References MPSDummySimulator().

◆ ComputeOptimalQubitsMap()

std::vector< long long int > Simulators::MPSDummySimulator::ComputeOptimalQubitsMap ( const std::vector< std::shared_ptr< Circuits::Circuit<> > > & layers,
int nrShuffles = 25,
int nrSwaps = 10 )
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

◆ 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 385 of file MPSDummySimulator.h.

References EvaluateMeetingPositionCost().

Referenced by EvaluateMeetingPositionCost().

◆ getCurrentBondDimensions()

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

Definition at line 242 of file MPSDummySimulator.h.

◆ getGrowthFactorGate()

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

Definition at line 66 of file MPSDummySimulator.h.

◆ getGrowthFactorSwap()

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

Definition at line 65 of file MPSDummySimulator.h.

◆ getMaxBondDimensions()

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

Definition at line 246 of file MPSDummySimulator.h.

◆ getNrQubits()

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

Definition at line 63 of file MPSDummySimulator.h.

Referenced by ApplyGate(), and ComputeOptimalQubitsMap().

◆ getQubitsMap()

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

Definition at line 248 of file MPSDummySimulator.h.

◆ getQubitsMapInv()

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

Definition at line 250 of file MPSDummySimulator.h.

◆ getTotalSwappingCost()

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

Definition at line 253 of file MPSDummySimulator.h.

Referenced by ComputeOptimalQubitsMap(), and EvaluateMeetingPositionCost().

◆ print()

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

Definition at line 127 of file MPSDummySimulator.h.

◆ SetCurrentBondDimensions()

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

Definition at line 232 of file MPSDummySimulator.h.

◆ setGrowthFactorGate()

void Simulators::MPSDummySimulator::setGrowthFactorGate ( double factor)
inline

◆ setGrowthFactorSwap()

void Simulators::MPSDummySimulator::setGrowthFactorSwap ( double factor)
inline

◆ SetInitialQubitsMap()

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

Definition at line 222 of file MPSDummySimulator.h.

Referenced by ComputeOptimalQubitsMap().

◆ SetMaxBondDimension()

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

◆ setTotalSwappingCost()

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

Definition at line 252 of file MPSDummySimulator.h.

◆ SwapQubitsToPosition()

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

Definition at line 794 of file MPSDummySimulator.h.

Referenced by EvaluateMeetingPositionCost().


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