Maestro 0.2.11
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Estimators::ExecutionCost Class Reference

#include <ExecutionCost.h>

Collaboration diagram for Estimators::ExecutionCost:

Classes

struct  CircuitInfo
struct  ExecutionInfo

Static Public Member Functions

static void BenchmarkAndLogExecution (Simulators::SimulatorType simType, Simulators::SimulationType method, const std::shared_ptr< Circuits::Circuit<> > &circuit, size_t nrReps, size_t maxBondDim, Utils::LogFile &log)
static void BenchmarkAndLogExecution (Simulators::SimulatorType simType, Simulators::SimulationType method, size_t nrReps, size_t nrMinQubits, size_t nrMaxQubits, size_t stepQubits, size_t depthMin, size_t depthMax, size_t stepDepth, double measureInsideProbability, size_t nrMeasAtEndMin, size_t nrMeasAtEndMax, size_t stepMeasAtEnd, size_t nrRandomCircuitsPerConfig, const std::string &logFilePath, size_t startBondDim=16, size_t endBondDim=16)
static void BenchmarkAndLogPauliExpectation (Simulators::SimulatorType simType, Simulators::SimulationType method, const std::shared_ptr< Circuits::Circuit<> > &circuit, const std::string &pauliString, size_t nrReps, size_t maxBondDim, Utils::LogFile &log)
static void BenchmarkAndLogPauliExpectation (Simulators::SimulatorType simType, Simulators::SimulationType method, size_t nrReps, size_t nrMinQubits, size_t nrMaxQubits, size_t stepQubits, size_t depthMin, size_t depthMax, size_t stepDepth, size_t nrRandomCircuitsPerConfig, const std::string &logFilePath, size_t startBondDim=16, size_t endBondDim=16)
static void BenchmarkAndLogSampling (Simulators::SimulatorType simType, Simulators::SimulationType method, const std::shared_ptr< Circuits::Circuit<> > &circuit, size_t nrQubitsSampled, size_t nrSamples, size_t nrReps, size_t maxBondDim, Utils::LogFile &log)
static void BenchmarkAndLogSampling (Simulators::SimulatorType simType, Simulators::SimulationType method, size_t nrReps, size_t nrMinQubits, size_t nrMaxQubits, size_t stepQubits, size_t depthMin, size_t depthMax, size_t stepDepth, size_t nrMeasAtEndMin, size_t nrMeasAtEndMax, size_t stepMeasAtEnd, size_t nrSamplesMin, size_t nrSamplesMax, size_t multiplierSamples, size_t nrRandomCircuitsPerConfig, const std::string &logFilePath, size_t startBondDim=16, size_t endBondDim=16)
static double EstimateExecutionCost (Simulators::SimulationType method, size_t nrQubits, const std::shared_ptr< Circuits::Circuit<> > &circuit, size_t maxBondDim)
static double EstimatePauliExpectationCost (const std::string &pauliString, Simulators::SimulationType method, size_t nrQubits, const std::shared_ptr< Circuits::Circuit<> > &circuit, size_t maxBondDim)
static double EstimateSamplingCost (Simulators::SimulationType method, size_t nrQubits, size_t nrQubitsSampled, size_t samples, const std::shared_ptr< Circuits::Circuit<> > &circuit, size_t maxBondDim)
static std::string GeneratePauliString (size_t nrQubits)
static std::shared_ptr< Circuits::Circuit<> > GenerateRandomCircuit (size_t nrQubits, size_t depth, double measureInsideProbability=0., size_t nrMeasAtEnd=0, bool isClifford=false, size_t nrNonCliffordGatesLimit=0, size_t nrBranchingGatesLimit=0)
static CircuitInfo GetCircuitInfo (const std::shared_ptr< Circuits::Circuit<> > &circuit)
static std::shared_ptr< Utils::MultipleLinearRegressionGetRegressor (const std::string &logFilePath, const std::vector< size_t > &featureIndices)
static std::shared_ptr< Simulators::ISimulatorGetSimulator (Simulators::SimulatorType simType, Simulators::SimulationType method, size_t nrQubits, size_t maxBondDim)
static double MeasureExecutionTime (Simulators::SimulatorType simType, Simulators::SimulationType method, size_t nrQubits, const std::shared_ptr< Circuits::Circuit<> > &circuit, size_t nrReps, size_t maxBondDim)
static double MeasurePauliExpectationTime (Simulators::SimulatorType simType, Simulators::SimulationType method, size_t nrQubits, const std::shared_ptr< Circuits::Circuit<> > &circuit, const std::string &pauliString, size_t nrReps, size_t maxBondDim)
static double MeasureSamplingTime (Simulators::SimulatorType simType, Simulators::SimulationType method, size_t nrQubits, const std::shared_ptr< Circuits::Circuit<> > &circuit, size_t nrQubitsSampled, size_t nrSamples, size_t nrReps, size_t maxBondDim)
static std::vector< ExecutionInfoReadLog (const std::string &logFilePath)

Detailed Description

Definition at line 48 of file ExecutionCost.h.

Member Function Documentation

◆ BenchmarkAndLogExecution() [1/2]

void Estimators::ExecutionCost::BenchmarkAndLogExecution ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
const std::shared_ptr< Circuits::Circuit<> > & circuit,
size_t nrReps,
size_t maxBondDim,
Utils::LogFile & log )
inlinestatic

◆ BenchmarkAndLogExecution() [2/2]

void Estimators::ExecutionCost::BenchmarkAndLogExecution ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
size_t nrReps,
size_t nrMinQubits,
size_t nrMaxQubits,
size_t stepQubits,
size_t depthMin,
size_t depthMax,
size_t stepDepth,
double measureInsideProbability,
size_t nrMeasAtEndMin,
size_t nrMeasAtEndMax,
size_t stepMeasAtEnd,
size_t nrRandomCircuitsPerConfig,
const std::string & logFilePath,
size_t startBondDim = 16,
size_t endBondDim = 16 )
inlinestatic

◆ BenchmarkAndLogPauliExpectation() [1/2]

void Estimators::ExecutionCost::BenchmarkAndLogPauliExpectation ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
const std::shared_ptr< Circuits::Circuit<> > & circuit,
const std::string & pauliString,
size_t nrReps,
size_t maxBondDim,
Utils::LogFile & log )
inlinestatic

◆ BenchmarkAndLogPauliExpectation() [2/2]

void Estimators::ExecutionCost::BenchmarkAndLogPauliExpectation ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
size_t nrReps,
size_t nrMinQubits,
size_t nrMaxQubits,
size_t stepQubits,
size_t depthMin,
size_t depthMax,
size_t stepDepth,
size_t nrRandomCircuitsPerConfig,
const std::string & logFilePath,
size_t startBondDim = 16,
size_t endBondDim = 16 )
inlinestatic

◆ BenchmarkAndLogSampling() [1/2]

void Estimators::ExecutionCost::BenchmarkAndLogSampling ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
const std::shared_ptr< Circuits::Circuit<> > & circuit,
size_t nrQubitsSampled,
size_t nrSamples,
size_t nrReps,
size_t maxBondDim,
Utils::LogFile & log )
inlinestatic

◆ BenchmarkAndLogSampling() [2/2]

void Estimators::ExecutionCost::BenchmarkAndLogSampling ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
size_t nrReps,
size_t nrMinQubits,
size_t nrMaxQubits,
size_t stepQubits,
size_t depthMin,
size_t depthMax,
size_t stepDepth,
size_t nrMeasAtEndMin,
size_t nrMeasAtEndMax,
size_t stepMeasAtEnd,
size_t nrSamplesMin,
size_t nrSamplesMax,
size_t multiplierSamples,
size_t nrRandomCircuitsPerConfig,
const std::string & logFilePath,
size_t startBondDim = 16,
size_t endBondDim = 16 )
inlinestatic

◆ EstimateExecutionCost()

◆ EstimatePauliExpectationCost()

double Estimators::ExecutionCost::EstimatePauliExpectationCost ( const std::string & pauliString,
Simulators::SimulationType method,
size_t nrQubits,
const std::shared_ptr< Circuits::Circuit<> > & circuit,
size_t maxBondDim )
inlinestatic

◆ EstimateSamplingCost()

double Estimators::ExecutionCost::EstimateSamplingCost ( Simulators::SimulationType method,
size_t nrQubits,
size_t nrQubitsSampled,
size_t samples,
const std::shared_ptr< Circuits::Circuit<> > & circuit,
size_t maxBondDim )
inlinestatic

◆ GeneratePauliString()

std::string Estimators::ExecutionCost::GeneratePauliString ( size_t nrQubits)
inlinestatic

Definition at line 918 of file ExecutionCost.h.

Referenced by BenchmarkAndLogPauliExpectation().

◆ GenerateRandomCircuit()

std::shared_ptr< Circuits::Circuit<> > Estimators::ExecutionCost::GenerateRandomCircuit ( size_t nrQubits,
size_t depth,
double measureInsideProbability = 0.,
size_t nrMeasAtEnd = 0,
bool isClifford = false,
size_t nrNonCliffordGatesLimit = 0,
size_t nrBranchingGatesLimit = 0 )
inlinestatic

◆ GetCircuitInfo()

◆ GetRegressor()

std::shared_ptr< Utils::MultipleLinearRegression > Estimators::ExecutionCost::GetRegressor ( const std::string & logFilePath,
const std::vector< size_t > & featureIndices )
inlinestatic

Definition at line 1138 of file ExecutionCost.h.

References ReadLog().

◆ GetSimulator()

std::shared_ptr< Simulators::ISimulator > Estimators::ExecutionCost::GetSimulator ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
size_t nrQubits,
size_t maxBondDim )
inlinestatic

◆ MeasureExecutionTime()

double Estimators::ExecutionCost::MeasureExecutionTime ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
size_t nrQubits,
const std::shared_ptr< Circuits::Circuit<> > & circuit,
size_t nrReps,
size_t maxBondDim )
inlinestatic

Definition at line 679 of file ExecutionCost.h.

References GetSimulator().

Referenced by BenchmarkAndLogExecution().

◆ MeasurePauliExpectationTime()

double Estimators::ExecutionCost::MeasurePauliExpectationTime ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
size_t nrQubits,
const std::shared_ptr< Circuits::Circuit<> > & circuit,
const std::string & pauliString,
size_t nrReps,
size_t maxBondDim )
inlinestatic

Definition at line 730 of file ExecutionCost.h.

References GetSimulator().

Referenced by BenchmarkAndLogPauliExpectation().

◆ MeasureSamplingTime()

double Estimators::ExecutionCost::MeasureSamplingTime ( Simulators::SimulatorType simType,
Simulators::SimulationType method,
size_t nrQubits,
const std::shared_ptr< Circuits::Circuit<> > & circuit,
size_t nrQubitsSampled,
size_t nrSamples,
size_t nrReps,
size_t maxBondDim )
inlinestatic

Definition at line 692 of file ExecutionCost.h.

References GetSimulator().

Referenced by BenchmarkAndLogSampling().

◆ ReadLog()


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