Maestro 0.3.11
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Simulator Class Reference

#include <Simulator.hpp>

Inheritance diagram for Simulator:
Collaboration diagram for Simulator:

Public Member Functions

 Simulator () noexcept
virtual ~Simulator ()
unsigned long int AllocateQubits (unsigned long int nrQubits)
double * AllProbabilities ()
double * Amplitude (unsigned long long int outcome)
int ApplyCCX (int controlQubit1, int controlQubit2, int targetQubit)
int ApplyCH (int controlQubit, int targetQubit)
int ApplyCP (int controlQubit, int targetQubit, double theta)
int ApplyCRx (int controlQubit, int targetQubit, double theta)
int ApplyCRy (int controlQubit, int targetQubit, double theta)
int ApplyCRz (int controlQubit, int targetQubit, double theta)
int ApplyCSwap (int controlQubit, int qubit1, int qubit2)
int ApplyCSX (int controlQubit, int targetQubit)
int ApplyCSXDG (int controlQubit, int targetQubit)
int ApplyCU (int controlQubit, int targetQubit, double theta, double phi, double lambda, double gamma)
int ApplyCX (int controlQubit, int targetQubit)
int ApplyCY (int controlQubit, int targetQubit)
int ApplyCZ (int controlQubit, int targetQubit)
int ApplyGenericOneQubitGate (unsigned long q0, const double *matrix)
int ApplyGenericThreeQubitGate (unsigned long q0, unsigned long q1, unsigned long q2, const double *matrix)
int ApplyGenericTwoQubitGate (unsigned long q0, unsigned long q1, const double *matrix)
int ApplyH (int qubit)
int ApplyK (int qubit)
int ApplyP (int qubit, double theta)
int ApplyReset (const unsigned long int *qubits, unsigned long int nrQubits)
int ApplyRx (int qubit, double theta)
int ApplyRy (int qubit, double theta)
int ApplyRz (int qubit, double theta)
int ApplyS (int qubit)
int ApplySDG (int qubit)
int ApplySwap (int qubit1, int qubit2)
int ApplySX (int qubit)
int ApplySXDG (int qubit)
int ApplyT (int qubit)
int ApplyTDG (int qubit)
int ApplyU (int qubit, double theta, double phi, double lambda, double gamma)
int ApplyX (int qubit)
int ApplyY (int qubit)
int ApplyZ (int qubit)
int ClearSimulator ()
int ConfigureSimulator (const char *key, const char *value)
unsigned long int CreateSimulator (int simType, int simExecType) override
std::complex< double > ExpectationValueOperators (const std::vector< unsigned long > &qubits, const std::vector< std::array< std::complex< double >, 4 > > &matrices)
std::vector< double > ExpectationValues (const std::vector< std::string > &paulis)
std::vector< std::complex< double > > ExpectationValuesComplex (const std::vector< std::string > &paulis, bool normalized=true)
int FlushSimulator ()
void FreeDoubleVector (double *vec) override
void FreeResult (char *result) override
void FreeULLIVector (unsigned long long int *vec) override
char * GetConfiguration (const char *key)
unsigned GetGateFusionMaxQubits ()
int GetGateFusionStatistics (MaestroGateFusionStatistics *statistics)
int GetMultithreading ()
unsigned long int GetNumberOfQubits ()
int GetSimulationType ()
void * GetSimulator ()
int GetSimulatorType ()
std::vector< std::complex< double > > GetStateVector ()
bool Init (const char *libName) noexcept override
int InitializeSimulator ()
int IsGateFusionEnabled ()
int IsQcsim ()
unsigned long long int Measure (const unsigned long int *qubits, unsigned long int nrQubits)
unsigned long long int MeasureNoCollapse ()
void MoveAtBeginningOfChain (const std::vector< unsigned long > &qubits)
double * Probabilities (const unsigned long long int *qubits, unsigned long int nrQubits)
double Probability (unsigned long long int outcome)
int ResetSimulator ()
int RestoreInternalDestructiveSavedState ()
int RestoreState ()
std::string RunRequestJson (const std::string &request)
unsigned long long int * SampleCounts (const unsigned long long int *qubits, unsigned long int nrQubits, unsigned long int shots)
int SaveState ()
int SaveStateToInternalDestructive ()
int SetMultithreading (int multithreading)
std::string ValidateRequestJson (const std::string &request)

Protected Member Functions

int AddOptimizationSimulator (unsigned long int simHandle, int simType, int simExecType)
unsigned long int AllocateQubits (void *sim, unsigned long int nrQubits)
double * AllProbabilities (void *sim)
double * Amplitude (void *sim, unsigned long long int outcome)
int ApplyCCX (void *sim, int controlQubit1, int controlQubit2, int targetQubit)
int ApplyCH (void *sim, int controlQubit, int targetQubit)
int ApplyCP (void *sim, int controlQubit, int targetQubit, double theta)
int ApplyCRx (void *sim, int controlQubit, int targetQubit, double theta)
int ApplyCRy (void *sim, int controlQubit, int targetQubit, double theta)
int ApplyCRz (void *sim, int controlQubit, int targetQubit, double theta)
int ApplyCSwap (void *sim, int controlQubit, int qubit1, int qubit2)
int ApplyCSX (void *sim, int controlQubit, int targetQubit)
int ApplyCSXDG (void *sim, int controlQubit, int targetQubit)
int ApplyCU (void *sim, int controlQubit, int targetQubit, double theta, double phi, double lambda, double gamma)
int ApplyCX (void *sim, int controlQubit, int targetQubit)
int ApplyCY (void *sim, int controlQubit, int targetQubit)
int ApplyCZ (void *sim, int controlQubit, int targetQubit)
int ApplyGenericOneQubitGate (void *sim, unsigned long q0, const double *matrix)
int ApplyGenericThreeQubitGate (void *sim, unsigned long q0, unsigned long q1, unsigned long q2, const double *matrix)
int ApplyGenericTwoQubitGate (void *sim, unsigned long q0, unsigned long q1, const double *matrix)
int ApplyH (void *sim, int qubit)
int ApplyK (void *sim, int qubit)
int ApplyP (void *sim, int qubit, double theta)
int ApplyReset (void *sim, const unsigned long int *qubits, unsigned long int nrQubits)
int ApplyRx (void *sim, int qubit, double theta)
int ApplyRy (void *sim, int qubit, double theta)
int ApplyRz (void *sim, int qubit, double theta)
int ApplyS (void *sim, int qubit)
int ApplySDG (void *sim, int qubit)
int ApplySwap (void *sim, int qubit1, int qubit2)
int ApplySX (void *sim, int qubit)
int ApplySXDG (void *sim, int qubit)
int ApplyT (void *sim, int qubit)
int ApplyTDG (void *sim, int qubit)
int ApplyU (void *sim, int qubit, double theta, double phi, double lambda, double gamma)
int ApplyX (void *sim, int qubit)
int ApplyY (void *sim, int qubit)
int ApplyZ (void *sim, int qubit)
int ClearSimulator (void *sim)
int ConfigureSimulator (void *sim, const char *key, const char *value)
virtual unsigned long int CreateSimpleSimulator (int nrQubits)
void DestroySimpleSimulator (unsigned long int simHandle)
void DestroySimulator (unsigned long int simHandle)
std::complex< double > ExpectationValueOperators (void *sim, const std::vector< unsigned long > &qubits, const std::vector< std::array< std::complex< double >, 4 > > &matrices)
std::vector< double > ExpectationValues (void *sim, const std::vector< std::string > &paulis)
std::vector< std::complex< double > > ExpectationValuesComplex (void *sim, const std::vector< std::string > &paulis, bool normalized=true)
int FlushSimulator (void *sim)
char * GetConfiguration (void *sim, const char *key)
void * GetFunction (const char *funcName) noexcept
unsigned GetGateFusionMaxQubits (void *sim)
int GetGateFusionStatistics (void *sim, MaestroGateFusionStatistics *statistics)
const void * GetHandle () const noexcept
int GetMultithreading (void *sim)
unsigned long int GetNumberOfQubits (void *sim)
int GetSimulationType (void *sim)
void * GetSimulator (unsigned long int simHandle)
int GetSimulatorType (void *sim)
std::vector< std::complex< double > > GetStateVector (void *sim)
int InitializeSimulator (void *sim)
int IsGateFusionEnabled (void *sim)
bool IsMuted () const noexcept
int IsQcsim (void *sim)
bool IsValid () const
unsigned long long int Measure (void *sim, const unsigned long int *qubits, unsigned long int nrQubits)
unsigned long long int MeasureNoCollapse (void *sim)
void MoveAtBeginningOfChain (void *sim, const std::vector< unsigned long > &qubits)
double * Probabilities (void *sim, const unsigned long long int *qubits, unsigned long int nrQubits)
double Probability (void *sim, unsigned long long int outcome)
int RemoveAllOptimizationSimulatorsAndAdd (unsigned long int simHandle, int simType, int simExecType)
int ResetSimulator (void *sim)
int RestoreInternalDestructiveSavedState (void *sim)
int RestoreState (void *sim)
unsigned long long int * SampleCounts (void *sim, const unsigned long long int *qubits, unsigned long int nrQubits, unsigned long int shots)
int SaveState (void *sim)
int SaveStateToInternalDestructive (void *sim)
int SetMultithreading (void *sim, int multithreading)
void SetMute (bool m) noexcept
char * SimpleEstimate (unsigned long int simpleSim, const char *jsonCircuit, const char *observableStr, const char *jsonConfig)
char * SimpleExecute (unsigned long int simpleSim, const char *jsonCircuit, const char *jsonConfig)

Static Protected Member Functions

static void CheckFunction (void *func, int line) noexcept

Detailed Description

Definition at line 74 of file Simulator.hpp.

Constructor & Destructor Documentation

◆ Simulator()

Simulator::Simulator ( )
inlinenoexcept

Definition at line 80 of file Simulator.hpp.

◆ ~Simulator()

virtual Simulator::~Simulator ( )
inlinevirtual

Definition at line 84 of file Simulator.hpp.

References MaestroLibrary::DestroySimulator().

Member Function Documentation

◆ AddOptimizationSimulator()

int MaestroLibrary::AddOptimizationSimulator ( unsigned long int simHandle,
int simType,
int simExecType )
inlineinherited

Definition at line 267 of file MaestroLib.hpp.

Referenced by SimpleSimulator::AddOptimizationSimulator().

◆ AllocateQubits() [1/2]

unsigned long int MaestroLibrary::AllocateQubits ( void * sim,
unsigned long int nrQubits )
inlineinherited

Definition at line 371 of file MaestroLib.hpp.

Referenced by Simulator::AllocateQubits().

◆ AllocateQubits() [2/2]

unsigned long int Simulator::AllocateQubits ( unsigned long int nrQubits)
inline

Definition at line 174 of file Simulator.hpp.

References MaestroLibrary::AllocateQubits().

◆ AllProbabilities() [1/2]

double * MaestroLibrary::AllProbabilities ( void * sim)
inlineinherited

Definition at line 451 of file MaestroLib.hpp.

Referenced by Simulator::AllProbabilities().

◆ AllProbabilities() [2/2]

double * Simulator::AllProbabilities ( )
inline

Definition at line 235 of file Simulator.hpp.

References MaestroLibrary::AllProbabilities().

◆ Amplitude() [1/2]

double * MaestroLibrary::Amplitude ( void * sim,
unsigned long long int outcome )
inlineinherited

Definition at line 442 of file MaestroLib.hpp.

Referenced by Simulator::Amplitude().

◆ Amplitude() [2/2]

double * Simulator::Amplitude ( unsigned long long int outcome)
inline

Definition at line 228 of file Simulator.hpp.

References MaestroLibrary::Amplitude().

◆ ApplyCCX() [1/2]

int MaestroLibrary::ApplyCCX ( void * sim,
int controlQubit1,
int controlQubit2,
int targetQubit )
inlineinherited

Definition at line 843 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCCX().

◆ ApplyCCX() [2/2]

int Simulator::ApplyCCX ( int controlQubit1,
int controlQubit2,
int targetQubit )
inline

Definition at line 545 of file Simulator.hpp.

References MaestroLibrary::ApplyCCX().

◆ ApplyCH() [1/2]

int MaestroLibrary::ApplyCH ( void * sim,
int controlQubit,
int targetQubit )
inlineinherited

Definition at line 780 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCH().

◆ ApplyCH() [2/2]

int Simulator::ApplyCH ( int controlQubit,
int targetQubit )
inline

Definition at line 496 of file Simulator.hpp.

References MaestroLibrary::ApplyCH().

◆ ApplyCP() [1/2]

int MaestroLibrary::ApplyCP ( void * sim,
int controlQubit,
int targetQubit,
double theta )
inlineinherited

Definition at line 807 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCP().

◆ ApplyCP() [2/2]

int Simulator::ApplyCP ( int controlQubit,
int targetQubit,
double theta )
inline

Definition at line 517 of file Simulator.hpp.

References MaestroLibrary::ApplyCP().

◆ ApplyCRx() [1/2]

int MaestroLibrary::ApplyCRx ( void * sim,
int controlQubit,
int targetQubit,
double theta )
inlineinherited

Definition at line 816 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCRx().

◆ ApplyCRx() [2/2]

int Simulator::ApplyCRx ( int controlQubit,
int targetQubit,
double theta )
inline

Definition at line 524 of file Simulator.hpp.

References MaestroLibrary::ApplyCRx().

◆ ApplyCRy() [1/2]

int MaestroLibrary::ApplyCRy ( void * sim,
int controlQubit,
int targetQubit,
double theta )
inlineinherited

Definition at line 825 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCRy().

◆ ApplyCRy() [2/2]

int Simulator::ApplyCRy ( int controlQubit,
int targetQubit,
double theta )
inline

Definition at line 531 of file Simulator.hpp.

References MaestroLibrary::ApplyCRy().

◆ ApplyCRz() [1/2]

int MaestroLibrary::ApplyCRz ( void * sim,
int controlQubit,
int targetQubit,
double theta )
inlineinherited

Definition at line 834 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCRz().

◆ ApplyCRz() [2/2]

int Simulator::ApplyCRz ( int controlQubit,
int targetQubit,
double theta )
inline

Definition at line 538 of file Simulator.hpp.

References MaestroLibrary::ApplyCRz().

◆ ApplyCSwap() [1/2]

int MaestroLibrary::ApplyCSwap ( void * sim,
int controlQubit,
int qubit1,
int qubit2 )
inlineinherited

Definition at line 861 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCSwap().

◆ ApplyCSwap() [2/2]

int Simulator::ApplyCSwap ( int controlQubit,
int qubit1,
int qubit2 )
inline

Definition at line 559 of file Simulator.hpp.

References MaestroLibrary::ApplyCSwap().

◆ ApplyCSX() [1/2]

int MaestroLibrary::ApplyCSX ( void * sim,
int controlQubit,
int targetQubit )
inlineinherited

Definition at line 789 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCSX().

◆ ApplyCSX() [2/2]

int Simulator::ApplyCSX ( int controlQubit,
int targetQubit )
inline

Definition at line 503 of file Simulator.hpp.

References MaestroLibrary::ApplyCSX().

◆ ApplyCSXDG() [1/2]

int MaestroLibrary::ApplyCSXDG ( void * sim,
int controlQubit,
int targetQubit )
inlineinherited

Definition at line 798 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCSXDG().

◆ ApplyCSXDG() [2/2]

int Simulator::ApplyCSXDG ( int controlQubit,
int targetQubit )
inline

Definition at line 510 of file Simulator.hpp.

References MaestroLibrary::ApplyCSXDG().

◆ ApplyCU() [1/2]

int MaestroLibrary::ApplyCU ( void * sim,
int controlQubit,
int targetQubit,
double theta,
double phi,
double lambda,
double gamma )
inlineinherited

Definition at line 870 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCU().

◆ ApplyCU() [2/2]

int Simulator::ApplyCU ( int controlQubit,
int targetQubit,
double theta,
double phi,
double lambda,
double gamma )
inline

Definition at line 566 of file Simulator.hpp.

References MaestroLibrary::ApplyCU().

◆ ApplyCX() [1/2]

int MaestroLibrary::ApplyCX ( void * sim,
int controlQubit,
int targetQubit )
inlineinherited

Definition at line 753 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCX().

◆ ApplyCX() [2/2]

int Simulator::ApplyCX ( int controlQubit,
int targetQubit )
inline

Definition at line 475 of file Simulator.hpp.

References MaestroLibrary::ApplyCX().

◆ ApplyCY() [1/2]

int MaestroLibrary::ApplyCY ( void * sim,
int controlQubit,
int targetQubit )
inlineinherited

Definition at line 762 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCY().

◆ ApplyCY() [2/2]

int Simulator::ApplyCY ( int controlQubit,
int targetQubit )
inline

Definition at line 482 of file Simulator.hpp.

References MaestroLibrary::ApplyCY().

◆ ApplyCZ() [1/2]

int MaestroLibrary::ApplyCZ ( void * sim,
int controlQubit,
int targetQubit )
inlineinherited

Definition at line 771 of file MaestroLib.hpp.

Referenced by Simulator::ApplyCZ().

◆ ApplyCZ() [2/2]

int Simulator::ApplyCZ ( int controlQubit,
int targetQubit )
inline

Definition at line 489 of file Simulator.hpp.

References MaestroLibrary::ApplyCZ().

◆ ApplyGenericOneQubitGate() [1/2]

int MaestroLibrary::ApplyGenericOneQubitGate ( void * sim,
unsigned long q0,
const double * matrix )
inlineinherited

Definition at line 511 of file MaestroLib.hpp.

Referenced by Simulator::ApplyGenericOneQubitGate().

◆ ApplyGenericOneQubitGate() [2/2]

int Simulator::ApplyGenericOneQubitGate ( unsigned long q0,
const double * matrix )
inline

Definition at line 285 of file Simulator.hpp.

References MaestroLibrary::ApplyGenericOneQubitGate().

◆ ApplyGenericThreeQubitGate() [1/2]

int MaestroLibrary::ApplyGenericThreeQubitGate ( void * sim,
unsigned long q0,
unsigned long q1,
unsigned long q2,
const double * matrix )
inlineinherited

Definition at line 521 of file MaestroLib.hpp.

Referenced by Simulator::ApplyGenericThreeQubitGate().

◆ ApplyGenericThreeQubitGate() [2/2]

int Simulator::ApplyGenericThreeQubitGate ( unsigned long q0,
unsigned long q1,
unsigned long q2,
const double * matrix )
inline

Definition at line 295 of file Simulator.hpp.

References MaestroLibrary::ApplyGenericThreeQubitGate().

◆ ApplyGenericTwoQubitGate() [1/2]

int MaestroLibrary::ApplyGenericTwoQubitGate ( void * sim,
unsigned long q0,
unsigned long q1,
const double * matrix )
inlineinherited

Definition at line 516 of file MaestroLib.hpp.

Referenced by Simulator::ApplyGenericTwoQubitGate().

◆ ApplyGenericTwoQubitGate() [2/2]

int Simulator::ApplyGenericTwoQubitGate ( unsigned long q0,
unsigned long q1,
const double * matrix )
inline

Definition at line 290 of file Simulator.hpp.

References MaestroLibrary::ApplyGenericTwoQubitGate().

◆ ApplyH() [1/2]

int MaestroLibrary::ApplyH ( void * sim,
int qubit )
inlineinherited

Definition at line 636 of file MaestroLib.hpp.

Referenced by Simulator::ApplyH().

◆ ApplyH() [2/2]

int Simulator::ApplyH ( int qubit)
inline

Definition at line 384 of file Simulator.hpp.

References MaestroLibrary::ApplyH().

◆ ApplyK() [1/2]

int MaestroLibrary::ApplyK ( void * sim,
int qubit )
inlineinherited

Definition at line 699 of file MaestroLib.hpp.

Referenced by Simulator::ApplyK().

◆ ApplyK() [2/2]

int Simulator::ApplyK ( int qubit)
inline

Definition at line 433 of file Simulator.hpp.

References MaestroLibrary::ApplyK().

◆ ApplyP() [1/2]

int MaestroLibrary::ApplyP ( void * sim,
int qubit,
double theta )
inlineinherited

Definition at line 708 of file MaestroLib.hpp.

Referenced by Simulator::ApplyP().

◆ ApplyP() [2/2]

int Simulator::ApplyP ( int qubit,
double theta )
inline

Definition at line 440 of file Simulator.hpp.

References MaestroLibrary::ApplyP().

◆ ApplyReset() [1/2]

int MaestroLibrary::ApplyReset ( void * sim,
const unsigned long int * qubits,
unsigned long int nrQubits )
inlineinherited

Definition at line 408 of file MaestroLib.hpp.

Referenced by Simulator::ApplyReset().

◆ ApplyReset() [2/2]

int Simulator::ApplyReset ( const unsigned long int * qubits,
unsigned long int nrQubits )
inline

Definition at line 203 of file Simulator.hpp.

References MaestroLibrary::ApplyReset().

◆ ApplyRx() [1/2]

int MaestroLibrary::ApplyRx ( void * sim,
int qubit,
double theta )
inlineinherited

Definition at line 717 of file MaestroLib.hpp.

Referenced by Simulator::ApplyRx().

◆ ApplyRx() [2/2]

int Simulator::ApplyRx ( int qubit,
double theta )
inline

Definition at line 447 of file Simulator.hpp.

References MaestroLibrary::ApplyRx().

◆ ApplyRy() [1/2]

int MaestroLibrary::ApplyRy ( void * sim,
int qubit,
double theta )
inlineinherited

Definition at line 726 of file MaestroLib.hpp.

Referenced by Simulator::ApplyRy().

◆ ApplyRy() [2/2]

int Simulator::ApplyRy ( int qubit,
double theta )
inline

Definition at line 454 of file Simulator.hpp.

References MaestroLibrary::ApplyRy().

◆ ApplyRz() [1/2]

int MaestroLibrary::ApplyRz ( void * sim,
int qubit,
double theta )
inlineinherited

Definition at line 735 of file MaestroLib.hpp.

Referenced by Simulator::ApplyRz().

◆ ApplyRz() [2/2]

int Simulator::ApplyRz ( int qubit,
double theta )
inline

Definition at line 461 of file Simulator.hpp.

References MaestroLibrary::ApplyRz().

◆ ApplyS() [1/2]

int MaestroLibrary::ApplyS ( void * sim,
int qubit )
inlineinherited

Definition at line 645 of file MaestroLib.hpp.

Referenced by Simulator::ApplyS().

◆ ApplyS() [2/2]

int Simulator::ApplyS ( int qubit)
inline

Definition at line 391 of file Simulator.hpp.

References MaestroLibrary::ApplyS().

◆ ApplySDG() [1/2]

int MaestroLibrary::ApplySDG ( void * sim,
int qubit )
inlineinherited

Definition at line 654 of file MaestroLib.hpp.

Referenced by Simulator::ApplySDG().

◆ ApplySDG() [2/2]

int Simulator::ApplySDG ( int qubit)
inline

Definition at line 398 of file Simulator.hpp.

References MaestroLibrary::ApplySDG().

◆ ApplySwap() [1/2]

int MaestroLibrary::ApplySwap ( void * sim,
int qubit1,
int qubit2 )
inlineinherited

Definition at line 852 of file MaestroLib.hpp.

Referenced by Simulator::ApplySwap().

◆ ApplySwap() [2/2]

int Simulator::ApplySwap ( int qubit1,
int qubit2 )
inline

Definition at line 552 of file Simulator.hpp.

References MaestroLibrary::ApplySwap().

◆ ApplySX() [1/2]

int MaestroLibrary::ApplySX ( void * sim,
int qubit )
inlineinherited

Definition at line 681 of file MaestroLib.hpp.

Referenced by Simulator::ApplySX().

◆ ApplySX() [2/2]

int Simulator::ApplySX ( int qubit)
inline

Definition at line 419 of file Simulator.hpp.

References MaestroLibrary::ApplySX().

◆ ApplySXDG() [1/2]

int MaestroLibrary::ApplySXDG ( void * sim,
int qubit )
inlineinherited

Definition at line 690 of file MaestroLib.hpp.

Referenced by Simulator::ApplySXDG().

◆ ApplySXDG() [2/2]

int Simulator::ApplySXDG ( int qubit)
inline

Definition at line 426 of file Simulator.hpp.

References MaestroLibrary::ApplySXDG().

◆ ApplyT() [1/2]

int MaestroLibrary::ApplyT ( void * sim,
int qubit )
inlineinherited

Definition at line 663 of file MaestroLib.hpp.

Referenced by Simulator::ApplyT().

◆ ApplyT() [2/2]

int Simulator::ApplyT ( int qubit)
inline

Definition at line 405 of file Simulator.hpp.

References MaestroLibrary::ApplyT().

◆ ApplyTDG() [1/2]

int MaestroLibrary::ApplyTDG ( void * sim,
int qubit )
inlineinherited

Definition at line 672 of file MaestroLib.hpp.

Referenced by Simulator::ApplyTDG().

◆ ApplyTDG() [2/2]

int Simulator::ApplyTDG ( int qubit)
inline

Definition at line 412 of file Simulator.hpp.

References MaestroLibrary::ApplyTDG().

◆ ApplyU() [1/2]

int MaestroLibrary::ApplyU ( void * sim,
int qubit,
double theta,
double phi,
double lambda,
double gamma )
inlineinherited

Definition at line 744 of file MaestroLib.hpp.

Referenced by Simulator::ApplyU().

◆ ApplyU() [2/2]

int Simulator::ApplyU ( int qubit,
double theta,
double phi,
double lambda,
double gamma )
inline

Definition at line 468 of file Simulator.hpp.

References MaestroLibrary::ApplyU().

◆ ApplyX() [1/2]

int MaestroLibrary::ApplyX ( void * sim,
int qubit )
inlineinherited

Definition at line 609 of file MaestroLib.hpp.

Referenced by Simulator::ApplyX().

◆ ApplyX() [2/2]

int Simulator::ApplyX ( int qubit)
inline

Definition at line 363 of file Simulator.hpp.

References MaestroLibrary::ApplyX().

◆ ApplyY() [1/2]

int MaestroLibrary::ApplyY ( void * sim,
int qubit )
inlineinherited

Definition at line 618 of file MaestroLib.hpp.

Referenced by Simulator::ApplyY().

◆ ApplyY() [2/2]

int Simulator::ApplyY ( int qubit)
inline

Definition at line 370 of file Simulator.hpp.

References MaestroLibrary::ApplyY().

◆ ApplyZ() [1/2]

int MaestroLibrary::ApplyZ ( void * sim,
int qubit )
inlineinherited

Definition at line 627 of file MaestroLib.hpp.

Referenced by Simulator::ApplyZ().

◆ ApplyZ() [2/2]

int Simulator::ApplyZ ( int qubit)
inline

Definition at line 377 of file Simulator.hpp.

References MaestroLibrary::ApplyZ().

◆ CheckFunction()

void MaestroLibrary::CheckFunction ( void * func,
int line )
inlinestaticnoexceptinherited

Definition at line 214 of file MaestroLib.hpp.

Referenced by Init().

◆ ClearSimulator() [1/2]

int MaestroLibrary::ClearSimulator ( void * sim)
inlineinherited

Definition at line 390 of file MaestroLib.hpp.

Referenced by Simulator::ClearSimulator().

◆ ClearSimulator() [2/2]

int Simulator::ClearSimulator ( )
inline

Definition at line 188 of file Simulator.hpp.

References MaestroLibrary::ClearSimulator().

◆ ConfigureSimulator() [1/2]

int MaestroLibrary::ConfigureSimulator ( void * sim,
const char * key,
const char * value )
inlineinherited

Definition at line 352 of file MaestroLib.hpp.

Referenced by Simulator::ConfigureSimulator().

◆ ConfigureSimulator() [2/2]

int Simulator::ConfigureSimulator ( const char * key,
const char * value )
inline

Definition at line 160 of file Simulator.hpp.

References MaestroLibrary::ConfigureSimulator().

◆ CreateSimpleSimulator()

virtual unsigned long int MaestroLibrary::CreateSimpleSimulator ( int nrQubits)
inlinevirtualinherited

Reimplemented in SimpleSimulator.

Definition at line 238 of file MaestroLib.hpp.

Referenced by SimpleSimulator::CreateSimpleSimulator().

◆ CreateSimulator()

unsigned long int Simulator::CreateSimulator ( int simType,
int simExecType )
inlineoverridevirtual

◆ DestroySimpleSimulator()

void MaestroLibrary::DestroySimpleSimulator ( unsigned long int simHandle)
inlineinherited

◆ DestroySimulator()

void MaestroLibrary::DestroySimulator ( unsigned long int simHandle)
inlineinherited

Definition at line 324 of file MaestroLib.hpp.

Referenced by Simulator::~Simulator(), and Simulator::CreateSimulator().

◆ ExpectationValueOperators() [1/2]

std::complex< double > MaestroLibrary::ExpectationValueOperators ( void * sim,
const std::vector< unsigned long > & qubits,
const std::vector< std::array< std::complex< double >, 4 > > & matrices )
inlineinherited

Definition at line 940 of file MaestroLib.hpp.

Referenced by Simulator::ExpectationValueOperators().

◆ ExpectationValueOperators() [2/2]

std::complex< double > Simulator::ExpectationValueOperators ( const std::vector< unsigned long > & qubits,
const std::vector< std::array< std::complex< double >, 4 > > & matrices )
inline

Definition at line 126 of file Simulator.hpp.

References MaestroLibrary::ExpectationValueOperators().

◆ ExpectationValues() [1/2]

std::vector< double > MaestroLibrary::ExpectationValues ( void * sim,
const std::vector< std::string > & paulis )
inlineinherited

Definition at line 879 of file MaestroLib.hpp.

Referenced by Simulator::ExpectationValues().

◆ ExpectationValues() [2/2]

std::vector< double > Simulator::ExpectationValues ( const std::vector< std::string > & paulis)
inline

Definition at line 116 of file Simulator.hpp.

References MaestroLibrary::ExpectationValues().

◆ ExpectationValuesComplex() [1/2]

std::vector< std::complex< double > > MaestroLibrary::ExpectationValuesComplex ( void * sim,
const std::vector< std::string > & paulis,
bool normalized = true )
inlineinherited

Definition at line 893 of file MaestroLib.hpp.

Referenced by Simulator::ExpectationValuesComplex().

◆ ExpectationValuesComplex() [2/2]

std::vector< std::complex< double > > Simulator::ExpectationValuesComplex ( const std::vector< std::string > & paulis,
bool normalized = true )
inline

Definition at line 136 of file Simulator.hpp.

References MaestroLibrary::ExpectationValuesComplex().

◆ FlushSimulator() [1/2]

int MaestroLibrary::FlushSimulator ( void * sim)
inlineinherited

Definition at line 526 of file MaestroLib.hpp.

Referenced by Simulator::FlushSimulator().

◆ FlushSimulator() [2/2]

int Simulator::FlushSimulator ( )
inline

Definition at line 300 of file Simulator.hpp.

References MaestroLibrary::FlushSimulator().

◆ FreeDoubleVector()

void Simulator::FreeDoubleVector ( double * vec)
inlineoverridevirtual

Reimplemented from MaestroLibrary.

Definition at line 218 of file Simulator.hpp.

References MaestroLibrary::FreeDoubleVector().

◆ FreeResult()

void Simulator::FreeResult ( char * result)
inlineoverridevirtual

Reimplemented from MaestroLibrary.

Definition at line 141 of file Simulator.hpp.

References MaestroLibrary::FreeResult().

◆ FreeULLIVector()

void Simulator::FreeULLIVector ( unsigned long long int * vec)
inlineoverridevirtual

Reimplemented from MaestroLibrary.

Definition at line 223 of file Simulator.hpp.

References MaestroLibrary::FreeULLIVector().

◆ GetConfiguration() [1/2]

char * MaestroLibrary::GetConfiguration ( void * sim,
const char * key )
inlineinherited

Definition at line 362 of file MaestroLib.hpp.

Referenced by Simulator::GetConfiguration().

◆ GetConfiguration() [2/2]

char * Simulator::GetConfiguration ( const char * key)
inline

Definition at line 167 of file Simulator.hpp.

References MaestroLibrary::GetConfiguration().

◆ GetFunction()

void * Utils::Library::GetFunction ( const char * funcName)
inlinenoexceptinherited

Definition at line 112 of file Library.h.

Referenced by MaestroLibrary::Init(), and Simulators::QuestLibSim::Init().

◆ GetGateFusionMaxQubits() [1/2]

unsigned MaestroLibrary::GetGateFusionMaxQubits ( void * sim)
inlineinherited

Definition at line 496 of file MaestroLib.hpp.

Referenced by Simulator::GetGateFusionMaxQubits().

◆ GetGateFusionMaxQubits() [2/2]

unsigned Simulator::GetGateFusionMaxQubits ( )
inline

Definition at line 270 of file Simulator.hpp.

References MaestroLibrary::GetGateFusionMaxQubits().

◆ GetGateFusionStatistics() [1/2]

int MaestroLibrary::GetGateFusionStatistics ( void * sim,
MaestroGateFusionStatistics * statistics )
inlineinherited

Definition at line 506 of file MaestroLib.hpp.

Referenced by Simulator::GetGateFusionStatistics().

◆ GetGateFusionStatistics() [2/2]

int Simulator::GetGateFusionStatistics ( MaestroGateFusionStatistics * statistics)
inline

Definition at line 280 of file Simulator.hpp.

References MaestroLibrary::GetGateFusionStatistics().

◆ GetHandle()

const void * Utils::Library::GetHandle ( ) const
inlinenoexceptinherited

Definition at line 121 of file Library.h.

◆ GetMultithreading() [1/2]

int MaestroLibrary::GetMultithreading ( void * sim)
inlineinherited

Definition at line 582 of file MaestroLib.hpp.

Referenced by Simulator::GetMultithreading().

◆ GetMultithreading() [2/2]

int Simulator::GetMultithreading ( )
inline

Definition at line 342 of file Simulator.hpp.

References MaestroLibrary::GetMultithreading().

◆ GetNumberOfQubits() [1/2]

unsigned long int MaestroLibrary::GetNumberOfQubits ( void * sim)
inlineinherited

Definition at line 380 of file MaestroLib.hpp.

Referenced by Simulator::GetNumberOfQubits(), and GetStateVector().

◆ GetNumberOfQubits() [2/2]

unsigned long int Simulator::GetNumberOfQubits ( )
inline

Definition at line 181 of file Simulator.hpp.

References MaestroLibrary::GetNumberOfQubits().

◆ GetSimulationType() [1/2]

int MaestroLibrary::GetSimulationType ( void * sim)
inlineinherited

Definition at line 487 of file MaestroLib.hpp.

Referenced by Simulator::GetSimulationType().

◆ GetSimulationType() [2/2]

int Simulator::GetSimulationType ( )
inline

Definition at line 263 of file Simulator.hpp.

References MaestroLibrary::GetSimulationType().

◆ GetSimulator() [1/2]

void * MaestroLibrary::GetSimulator ( unsigned long int simHandle)
inlineinherited

Definition at line 316 of file MaestroLib.hpp.

Referenced by Simulator::CreateSimulator(), and Simulator::GetSimulator().

◆ GetSimulator() [2/2]

void * Simulator::GetSimulator ( )
inline

Definition at line 111 of file Simulator.hpp.

References MaestroLibrary::GetSimulator().

◆ GetSimulatorType() [1/2]

int MaestroLibrary::GetSimulatorType ( void * sim)
inlineinherited

Definition at line 478 of file MaestroLib.hpp.

Referenced by Simulator::GetSimulatorType().

◆ GetSimulatorType() [2/2]

int Simulator::GetSimulatorType ( )
inline

Definition at line 256 of file Simulator.hpp.

References MaestroLibrary::GetSimulatorType().

◆ GetStateVector() [1/2]

std::vector< std::complex< double > > MaestroLibrary::GetStateVector ( void * sim)
inlineinherited

Definition at line 922 of file MaestroLib.hpp.

References GetNumberOfQubits().

Referenced by Simulator::GetStateVector().

◆ GetStateVector() [2/2]

std::vector< std::complex< double > > Simulator::GetStateVector ( )
inline

Definition at line 121 of file Simulator.hpp.

References MaestroLibrary::GetStateVector().

◆ Init()

bool Simulator::Init ( const char * libName)
inlineoverridevirtualnoexcept

Reimplemented from MaestroLibrary.

Definition at line 90 of file Simulator.hpp.

References MaestroLibrary::Init().

◆ InitializeSimulator() [1/2]

int MaestroLibrary::InitializeSimulator ( void * sim)
inlineinherited

Definition at line 332 of file MaestroLib.hpp.

Referenced by Simulator::InitializeSimulator().

◆ InitializeSimulator() [2/2]

int Simulator::InitializeSimulator ( )
inline

Definition at line 146 of file Simulator.hpp.

References MaestroLibrary::InitializeSimulator().

◆ IsGateFusionEnabled() [1/2]

int MaestroLibrary::IsGateFusionEnabled ( void * sim)
inlineinherited

Definition at line 501 of file MaestroLib.hpp.

Referenced by Simulator::IsGateFusionEnabled().

◆ IsGateFusionEnabled() [2/2]

int Simulator::IsGateFusionEnabled ( )
inline

Definition at line 275 of file Simulator.hpp.

References MaestroLibrary::IsGateFusionEnabled().

◆ IsMuted()

bool Utils::Library::IsMuted ( ) const
inlinenoexceptinherited

Definition at line 126 of file Library.h.

◆ IsQcsim() [1/2]

int MaestroLibrary::IsQcsim ( void * sim)
inlineinherited

Definition at line 591 of file MaestroLib.hpp.

Referenced by Simulator::IsQcsim().

◆ IsQcsim() [2/2]

int Simulator::IsQcsim ( )
inline

Definition at line 349 of file Simulator.hpp.

References MaestroLibrary::IsQcsim().

◆ IsValid()

bool MaestroLibrary::IsValid ( ) const
inlineinherited

Definition at line 233 of file MaestroLib.hpp.

◆ Measure() [1/2]

unsigned long long int MaestroLibrary::Measure ( void * sim,
const unsigned long int * qubits,
unsigned long int nrQubits )
inlineinherited

Definition at line 399 of file MaestroLib.hpp.

Referenced by Simulator::Measure().

◆ Measure() [2/2]

unsigned long long int Simulator::Measure ( const unsigned long int * qubits,
unsigned long int nrQubits )
inline

Definition at line 195 of file Simulator.hpp.

References MaestroLibrary::Measure().

◆ MeasureNoCollapse() [1/2]

unsigned long long int MaestroLibrary::MeasureNoCollapse ( void * sim)
inlineinherited

Definition at line 600 of file MaestroLib.hpp.

Referenced by Simulator::MeasureNoCollapse().

◆ MeasureNoCollapse() [2/2]

unsigned long long int Simulator::MeasureNoCollapse ( )
inline

Definition at line 356 of file Simulator.hpp.

References MaestroLibrary::MeasureNoCollapse().

◆ MoveAtBeginningOfChain() [1/2]

void MaestroLibrary::MoveAtBeginningOfChain ( void * sim,
const std::vector< unsigned long > & qubits )
inlineinherited

Definition at line 963 of file MaestroLib.hpp.

Referenced by Simulator::MoveAtBeginningOfChain().

◆ MoveAtBeginningOfChain() [2/2]

void Simulator::MoveAtBeginningOfChain ( const std::vector< unsigned long > & qubits)
inline

Definition at line 131 of file Simulator.hpp.

References MaestroLibrary::MoveAtBeginningOfChain().

◆ Probabilities() [1/2]

double * MaestroLibrary::Probabilities ( void * sim,
const unsigned long long int * qubits,
unsigned long int nrQubits )
inlineinherited

Definition at line 460 of file MaestroLib.hpp.

Referenced by Simulator::Probabilities().

◆ Probabilities() [2/2]

double * Simulator::Probabilities ( const unsigned long long int * qubits,
unsigned long int nrQubits )
inline

Definition at line 242 of file Simulator.hpp.

References MaestroLibrary::Probabilities().

◆ Probability() [1/2]

double MaestroLibrary::Probability ( void * sim,
unsigned long long int outcome )
inlineinherited

Definition at line 417 of file MaestroLib.hpp.

Referenced by Simulator::Probability().

◆ Probability() [2/2]

double Simulator::Probability ( unsigned long long int outcome)
inline

Definition at line 210 of file Simulator.hpp.

References MaestroLibrary::Probability().

◆ RemoveAllOptimizationSimulatorsAndAdd()

int MaestroLibrary::RemoveAllOptimizationSimulatorsAndAdd ( unsigned long int simHandle,
int simType,
int simExecType )
inlineinherited

◆ ResetSimulator() [1/2]

int MaestroLibrary::ResetSimulator ( void * sim)
inlineinherited

Definition at line 342 of file MaestroLib.hpp.

Referenced by Simulator::ResetSimulator().

◆ ResetSimulator() [2/2]

int Simulator::ResetSimulator ( )
inline

Definition at line 153 of file Simulator.hpp.

References MaestroLibrary::ResetSimulator().

◆ RestoreInternalDestructiveSavedState() [1/2]

int MaestroLibrary::RestoreInternalDestructiveSavedState ( void * sim)
inlineinherited

Definition at line 545 of file MaestroLib.hpp.

Referenced by Simulator::RestoreInternalDestructiveSavedState().

◆ RestoreInternalDestructiveSavedState() [2/2]

int Simulator::RestoreInternalDestructiveSavedState ( )
inline

◆ RestoreState() [1/2]

int MaestroLibrary::RestoreState ( void * sim)
inlineinherited

Definition at line 564 of file MaestroLib.hpp.

Referenced by Simulator::RestoreState().

◆ RestoreState() [2/2]

int Simulator::RestoreState ( )
inline

Definition at line 328 of file Simulator.hpp.

References MaestroLibrary::RestoreState().

◆ RunRequestJson()

std::string MaestroLibrary::RunRequestJson ( const std::string & request)
inline

Definition at line 912 of file MaestroLib.hpp.

◆ SampleCounts() [1/2]

unsigned long long int * MaestroLibrary::SampleCounts ( void * sim,
const unsigned long long int * qubits,
unsigned long int nrQubits,
unsigned long int shots )
inlineinherited

Definition at line 469 of file MaestroLib.hpp.

Referenced by Simulator::SampleCounts().

◆ SampleCounts() [2/2]

unsigned long long int * Simulator::SampleCounts ( const unsigned long long int * qubits,
unsigned long int nrQubits,
unsigned long int shots )
inline

Definition at line 249 of file Simulator.hpp.

References MaestroLibrary::SampleCounts().

◆ SaveState() [1/2]

int MaestroLibrary::SaveState ( void * sim)
inlineinherited

Definition at line 555 of file MaestroLib.hpp.

Referenced by Simulator::SaveState().

◆ SaveState() [2/2]

int Simulator::SaveState ( )
inline

Definition at line 321 of file Simulator.hpp.

References MaestroLibrary::SaveState().

◆ SaveStateToInternalDestructive() [1/2]

int MaestroLibrary::SaveStateToInternalDestructive ( void * sim)
inlineinherited

Definition at line 535 of file MaestroLib.hpp.

Referenced by Simulator::SaveStateToInternalDestructive().

◆ SaveStateToInternalDestructive() [2/2]

int Simulator::SaveStateToInternalDestructive ( )
inline

Definition at line 307 of file Simulator.hpp.

References MaestroLibrary::SaveStateToInternalDestructive().

◆ SetMultithreading() [1/2]

int MaestroLibrary::SetMultithreading ( void * sim,
int multithreading )
inlineinherited

Definition at line 573 of file MaestroLib.hpp.

Referenced by Simulator::SetMultithreading().

◆ SetMultithreading() [2/2]

int Simulator::SetMultithreading ( int multithreading)
inline

Definition at line 335 of file Simulator.hpp.

References MaestroLibrary::SetMultithreading().

◆ SetMute()

void Utils::Library::SetMute ( bool m)
inlinenoexceptinherited

Definition at line 131 of file Library.h.

◆ SimpleEstimate()

char * MaestroLibrary::SimpleEstimate ( unsigned long int simpleSim,
const char * jsonCircuit,
const char * observableStr,
const char * jsonConfig )
inlineinherited

Definition at line 287 of file MaestroLib.hpp.

Referenced by SimpleSimulator::SimpleEstimate().

◆ SimpleExecute()

char * MaestroLibrary::SimpleExecute ( unsigned long int simpleSim,
const char * jsonCircuit,
const char * jsonConfig )
inlineinherited

Definition at line 277 of file MaestroLib.hpp.

Referenced by SimpleSimulator::SimpleExecute().

◆ ValidateRequestJson()

std::string MaestroLibrary::ValidateRequestJson ( const std::string & request)
inline

Definition at line 917 of file MaestroLib.hpp.


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