Maestro 0.1.0
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
Interface.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define _MAESTRO_INTERFACE_H_
 

Functions

void * GetMaestroObject ()
 
void * GetMaestroObjectWithMute ()
 
unsigned long int CreateSimpleSimulator (int nrQubits)
 
void DestroySimpleSimulator (unsigned long int simHandle)
 
int RemoveAllOptimizationSimulatorsAndAdd (unsigned long int simHandle, int simType, int simExecType)
 
int AddOptimizationSimulator (unsigned long int simHandle, int simType, int simExecType)
 
char * SimpleExecute (unsigned long int simpleSim, const char *circuitStr, const char *jsonConfig)
 
char * SimpleEstimate (unsigned long int simpleSim, const char *circuitStr, const char *observableStr, const char *jsonConfig)
 
void FreeResult (char *result)
 
unsigned long int CreateSimulator (int simType, int simExecType)
 
void * GetSimulator (unsigned long int simHandle)
 
void DestroySimulator (unsigned long int simHandle)
 
int InitializeSimulator (void *sim)
 
int ResetSimulator (void *sim)
 
int ConfigureSimulator (void *sim, const char *key, const char *value)
 
char * GetConfiguration (void *sim, const char *key)
 
unsigned long int AllocateQubits (void *sim, unsigned long int nrQubits)
 
unsigned long int GetNumberOfQubits (void *sim)
 
int ClearSimulator (void *sim)
 
unsigned long long int Measure (void *sim, const unsigned long int *qubits, unsigned long int nrQubits)
 
int ApplyReset (void *sim, const unsigned long int *qubits, unsigned long int nrQubits)
 
double Probability (void *sim, unsigned long long int outcome)
 
void FreeDoubleVector (double *vec)
 
void FreeULLIVector (unsigned long long int *vec)
 
double * Amplitude (void *sim, unsigned long long int outcome)
 
double * AllProbabilities (void *sim)
 
double * Probabilities (void *sim, const unsigned long long int *qubits, unsigned long int nrQubits)
 
unsigned long long int * SampleCounts (void *sim, const unsigned long long int *qubits, unsigned long int nrQubits, unsigned long int shots)
 
int GetSimulatorType (void *sim)
 
int GetSimulationType (void *sim)
 
int FlushSimulator (void *sim)
 
int SaveStateToInternalDestructive (void *sim)
 
int RestoreInternalDestructiveSavedState (void *sim)
 
int SaveState (void *sim)
 
int RestoreState (void *sim)
 
int SetMultithreading (void *sim, int multithreading)
 
int GetMultithreading (void *sim)
 
int IsQcsim (void *sim)
 
unsigned long long int MeasureNoCollapse (void *sim)
 
int ApplyX (void *sim, int qubit)
 
int ApplyY (void *sim, int qubit)
 
int ApplyZ (void *sim, int qubit)
 
int ApplyH (void *sim, int qubit)
 
int ApplyS (void *sim, int qubit)
 
int ApplySDG (void *sim, int qubit)
 
int ApplyT (void *sim, int qubit)
 
int ApplyTDG (void *sim, int qubit)
 
int ApplySX (void *sim, int qubit)
 
int ApplySXDG (void *sim, int qubit)
 
int ApplyK (void *sim, int qubit)
 
int ApplyP (void *sim, int qubit, double theta)
 
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 ApplyU (void *sim, int qubit, 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 ApplyCH (void *sim, int controlQubit, int targetQubit)
 
int ApplyCSX (void *sim, int controlQubit, int targetQubit)
 
int ApplyCSXDG (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 ApplyCCX (void *sim, int controlQubit1, int controlQubit2, int targetQubit)
 
int ApplySwap (void *sim, int qubit1, int qubit2)
 
int ApplyCSwap (void *sim, int controlQubit, int qubit1, int qubit2)
 
int ApplyCU (void *sim, int controlQubit, int targetQubit, double theta, double phi, double lambda, double gamma)
 

Macro Definition Documentation

◆ _MAESTRO_INTERFACE_H_

#define _MAESTRO_INTERFACE_H_

Definition at line 12 of file Interface.h.

Function Documentation

◆ AddOptimizationSimulator()

int AddOptimizationSimulator ( unsigned long int  simHandle,
int  simType,
int  simExecType 
)

Definition at line 104 of file Interface.cpp.

◆ AllocateQubits()

unsigned long int AllocateQubits ( void *  sim,
unsigned long int  nrQubits 
)

Definition at line 861 of file Interface.cpp.

◆ AllProbabilities()

double * AllProbabilities ( void *  sim)

Definition at line 954 of file Interface.cpp.

◆ Amplitude()

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

Definition at line 940 of file Interface.cpp.

◆ ApplyCCX()

int ApplyCCX ( void *  sim,
int  controlQubit1,
int  controlQubit2,
int  targetQubit 
)

Definition at line 768 of file Interface.cpp.

◆ ApplyCH()

int ApplyCH ( void *  sim,
int  controlQubit,
int  targetQubit 
)

Definition at line 691 of file Interface.cpp.

◆ ApplyCP()

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

Definition at line 724 of file Interface.cpp.

◆ ApplyCRx()

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

Definition at line 735 of file Interface.cpp.

◆ ApplyCRy()

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

Definition at line 746 of file Interface.cpp.

◆ ApplyCRz()

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

Definition at line 757 of file Interface.cpp.

◆ ApplyCSwap()

int ApplyCSwap ( void *  sim,
int  controlQubit,
int  qubit1,
int  qubit2 
)

Definition at line 791 of file Interface.cpp.

◆ ApplyCSX()

int ApplyCSX ( void *  sim,
int  controlQubit,
int  targetQubit 
)

Definition at line 702 of file Interface.cpp.

◆ ApplyCSXDG()

int ApplyCSXDG ( void *  sim,
int  controlQubit,
int  targetQubit 
)

Definition at line 713 of file Interface.cpp.

◆ ApplyCU()

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

Definition at line 802 of file Interface.cpp.

◆ ApplyCX()

int ApplyCX ( void *  sim,
int  controlQubit,
int  targetQubit 
)

Definition at line 658 of file Interface.cpp.

◆ ApplyCY()

int ApplyCY ( void *  sim,
int  controlQubit,
int  targetQubit 
)

Definition at line 669 of file Interface.cpp.

◆ ApplyCZ()

int ApplyCZ ( void *  sim,
int  controlQubit,
int  targetQubit 
)

Definition at line 680 of file Interface.cpp.

◆ ApplyH()

int ApplyH ( void *  sim,
int  qubit 
)

Definition at line 514 of file Interface.cpp.

◆ ApplyK()

int ApplyK ( void *  sim,
int  qubit 
)

Definition at line 591 of file Interface.cpp.

◆ ApplyP()

int ApplyP ( void *  sim,
int  qubit,
double  theta 
)

Definition at line 602 of file Interface.cpp.

◆ ApplyReset()

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

Definition at line 904 of file Interface.cpp.

◆ ApplyRx()

int ApplyRx ( void *  sim,
int  qubit,
double  theta 
)

Definition at line 613 of file Interface.cpp.

◆ ApplyRy()

int ApplyRy ( void *  sim,
int  qubit,
double  theta 
)

Definition at line 624 of file Interface.cpp.

◆ ApplyRz()

int ApplyRz ( void *  sim,
int  qubit,
double  theta 
)

Definition at line 635 of file Interface.cpp.

◆ ApplyS()

int ApplyS ( void *  sim,
int  qubit 
)

Definition at line 525 of file Interface.cpp.

◆ ApplySDG()

int ApplySDG ( void *  sim,
int  qubit 
)

Definition at line 536 of file Interface.cpp.

◆ ApplySwap()

int ApplySwap ( void *  sim,
int  qubit1,
int  qubit2 
)

Definition at line 780 of file Interface.cpp.

◆ ApplySX()

int ApplySX ( void *  sim,
int  qubit 
)

Definition at line 569 of file Interface.cpp.

◆ ApplySXDG()

int ApplySXDG ( void *  sim,
int  qubit 
)

Definition at line 580 of file Interface.cpp.

◆ ApplyT()

int ApplyT ( void *  sim,
int  qubit 
)

Definition at line 547 of file Interface.cpp.

◆ ApplyTDG()

int ApplyTDG ( void *  sim,
int  qubit 
)

Definition at line 558 of file Interface.cpp.

◆ ApplyU()

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

Definition at line 646 of file Interface.cpp.

◆ ApplyX()

int ApplyX ( void *  sim,
int  qubit 
)

Definition at line 480 of file Interface.cpp.

◆ ApplyY()

int ApplyY ( void *  sim,
int  qubit 
)

Definition at line 492 of file Interface.cpp.

◆ ApplyZ()

int ApplyZ ( void *  sim,
int  qubit 
)

Definition at line 503 of file Interface.cpp.

◆ ClearSimulator()

int ClearSimulator ( void *  sim)

Definition at line 882 of file Interface.cpp.

◆ ConfigureSimulator()

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

Definition at line 834 of file Interface.cpp.

◆ CreateSimpleSimulator()

unsigned long int CreateSimpleSimulator ( int  nrQubits)

Definition at line 74 of file Interface.cpp.

◆ CreateSimulator()

unsigned long int CreateSimulator ( int  simType,
int  simExecType 
)

Definition at line 453 of file Interface.cpp.

◆ DestroySimpleSimulator()

void DestroySimpleSimulator ( unsigned long int  simHandle)

Definition at line 83 of file Interface.cpp.

◆ DestroySimulator()

void DestroySimulator ( unsigned long int  simHandle)

Definition at line 472 of file Interface.cpp.

◆ FlushSimulator()

int FlushSimulator ( void *  sim)

Definition at line 1025 of file Interface.cpp.

◆ FreeDoubleVector()

void FreeDoubleVector ( double *  vec)

Definition at line 926 of file Interface.cpp.

◆ FreeResult()

void FreeResult ( char *  result)

Definition at line 446 of file Interface.cpp.

◆ FreeULLIVector()

void FreeULLIVector ( unsigned long long int *  vec)

Definition at line 933 of file Interface.cpp.

◆ GetConfiguration()

char * GetConfiguration ( void *  sim,
const char *  key 
)

Definition at line 844 of file Interface.cpp.

◆ GetMaestroObject()

void * GetMaestroObject ( )

Definition at line 36 of file Interface.cpp.

◆ GetMaestroObjectWithMute()

void * GetMaestroObjectWithMute ( )

Definition at line 55 of file Interface.cpp.

◆ GetMultithreading()

int GetMultithreading ( void *  sim)

Definition at line 1085 of file Interface.cpp.

◆ GetNumberOfQubits()

unsigned long int GetNumberOfQubits ( void *  sim)

Definition at line 872 of file Interface.cpp.

◆ GetSimulationType()

int GetSimulationType ( void *  sim)

Definition at line 1016 of file Interface.cpp.

◆ GetSimulator()

void * GetSimulator ( unsigned long int  simHandle)

Definition at line 464 of file Interface.cpp.

◆ GetSimulatorType()

int GetSimulatorType ( void *  sim)

Definition at line 1007 of file Interface.cpp.

◆ InitializeSimulator()

int InitializeSimulator ( void *  sim)

Definition at line 814 of file Interface.cpp.

◆ IsQcsim()

int IsQcsim ( void *  sim)

Definition at line 1094 of file Interface.cpp.

◆ Measure()

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

Definition at line 892 of file Interface.cpp.

◆ MeasureNoCollapse()

unsigned long long int MeasureNoCollapse ( void *  sim)

Definition at line 1103 of file Interface.cpp.

◆ Probabilities()

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

Definition at line 967 of file Interface.cpp.

◆ Probability()

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

Definition at line 916 of file Interface.cpp.

◆ RemoveAllOptimizationSimulatorsAndAdd()

int RemoveAllOptimizationSimulatorsAndAdd ( unsigned long int  simHandle,
int  simType,
int  simExecType 
)

Definition at line 92 of file Interface.cpp.

◆ ResetSimulator()

int ResetSimulator ( void *  sim)

Definition at line 824 of file Interface.cpp.

◆ RestoreInternalDestructiveSavedState()

int RestoreInternalDestructiveSavedState ( void *  sim)

Definition at line 1045 of file Interface.cpp.

◆ RestoreState()

int RestoreState ( void *  sim)

Definition at line 1065 of file Interface.cpp.

◆ SampleCounts()

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

Definition at line 982 of file Interface.cpp.

◆ SaveState()

int SaveState ( void *  sim)

Definition at line 1055 of file Interface.cpp.

◆ SaveStateToInternalDestructive()

int SaveStateToInternalDestructive ( void *  sim)

Definition at line 1035 of file Interface.cpp.

◆ SetMultithreading()

int SetMultithreading ( void *  sim,
int  multithreading 
)

Definition at line 1075 of file Interface.cpp.

◆ SimpleEstimate()

char * SimpleEstimate ( unsigned long int  simpleSim,
const char *  circuitStr,
const char *  observableStr,
const char *  jsonConfig 
)

Definition at line 301 of file Interface.cpp.

◆ SimpleExecute()

char * SimpleExecute ( unsigned long int  simpleSim,
const char *  circuitStr,
const char *  jsonConfig 
)

Definition at line 116 of file Interface.cpp.