Maestro 0.2.5
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

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 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)
 
unsigned long int CreateSimpleSimulator (int nrQubits)
 
unsigned long int CreateSimulator (int simType, int simExecType)
 
void DestroySimpleSimulator (unsigned long int simHandle)
 
void DestroySimulator (unsigned long int simHandle)
 
int FlushSimulator (void *sim)
 
void FreeDoubleVector (double *vec)
 
void FreeResult (char *result)
 
void FreeULLIVector (unsigned long long int *vec)
 
char * GetConfiguration (void *sim, const char *key)
 
void * GetMaestroObject ()
 
void * GetMaestroObjectWithMute ()
 
int GetMultithreading (void *sim)
 
unsigned long int GetNumberOfQubits (void *sim)
 
int GetSimulationType (void *sim)
 
void * GetSimulator (unsigned long int simHandle)
 
int GetSimulatorType (void *sim)
 
int InitializeSimulator (void *sim)
 
int IsQcsim (void *sim)
 
unsigned long long int Measure (void *sim, const unsigned long int *qubits, unsigned long int nrQubits)
 
unsigned long long int MeasureNoCollapse (void *sim)
 
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)
 
char * SimpleEstimate (unsigned long int simpleSim, const char *circuitStr, const char *observableStr, const char *jsonConfig)
 
char * SimpleExecute (unsigned long int simpleSim, const char *circuitStr, const char *jsonConfig)
 

Macro Definition Documentation

◆ _MAESTRO_INTERFACE_H_

#define _MAESTRO_INTERFACE_H_

Definition at line 13 of file Interface.h.

Function Documentation

◆ AddOptimizationSimulator()

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

Definition at line 103 of file Interface.cpp.

References maestroInstance.

◆ AllocateQubits()

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

Definition at line 872 of file Interface.cpp.

References Simulators::IState::AllocateQubits().

◆ AllProbabilities()

double * AllProbabilities ( void *  sim)

Definition at line 965 of file Interface.cpp.

References Simulators::IState::AllProbabilities().

◆ Amplitude()

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

Definition at line 951 of file Interface.cpp.

References Simulators::IState::Amplitude().

◆ ApplyCCX()

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

Definition at line 779 of file Interface.cpp.

References Simulators::ISimulator::ApplyCCX().

◆ ApplyCH()

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

Definition at line 702 of file Interface.cpp.

References Simulators::ISimulator::ApplyCH().

◆ ApplyCP()

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

Definition at line 735 of file Interface.cpp.

References Simulators::ISimulator::ApplyCP().

◆ ApplyCRx()

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

Definition at line 746 of file Interface.cpp.

References Simulators::ISimulator::ApplyCRx().

◆ ApplyCRy()

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

Definition at line 757 of file Interface.cpp.

References Simulators::ISimulator::ApplyCRy().

◆ ApplyCRz()

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

Definition at line 768 of file Interface.cpp.

References Simulators::ISimulator::ApplyCRz().

◆ ApplyCSwap()

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

Definition at line 802 of file Interface.cpp.

References Simulators::ISimulator::ApplyCSwap().

◆ ApplyCSX()

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

Definition at line 713 of file Interface.cpp.

References Simulators::ISimulator::ApplyCSx().

◆ ApplyCSXDG()

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

Definition at line 724 of file Interface.cpp.

References Simulators::ISimulator::ApplyCSxDAG().

◆ ApplyCU()

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

Definition at line 813 of file Interface.cpp.

References Simulators::ISimulator::ApplyCU().

◆ ApplyCX()

◆ ApplyCY()

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

Definition at line 680 of file Interface.cpp.

References Simulators::ISimulator::ApplyCY().

◆ ApplyCZ()

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

Definition at line 691 of file Interface.cpp.

References Simulators::ISimulator::ApplyCZ().

◆ ApplyH()

◆ ApplyK()

int ApplyK ( void *  sim,
int  qubit 
)

Definition at line 602 of file Interface.cpp.

References Simulators::ISimulator::ApplyK().

◆ ApplyP()

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

Definition at line 613 of file Interface.cpp.

References Simulators::ISimulator::ApplyP().

◆ ApplyReset()

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

Definition at line 915 of file Interface.cpp.

◆ ApplyRx()

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

Definition at line 624 of file Interface.cpp.

References Simulators::ISimulator::ApplyRx().

◆ ApplyRy()

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

Definition at line 635 of file Interface.cpp.

References Simulators::ISimulator::ApplyRy().

◆ ApplyRz()

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

Definition at line 646 of file Interface.cpp.

References Simulators::ISimulator::ApplyRz().

◆ ApplyS()

int ApplyS ( void *  sim,
int  qubit 
)

◆ ApplySDG()

int ApplySDG ( void *  sim,
int  qubit 
)

◆ ApplySwap()

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

Definition at line 791 of file Interface.cpp.

References Simulators::ISimulator::ApplySwap().

◆ ApplySX()

int ApplySX ( void *  sim,
int  qubit 
)

Definition at line 580 of file Interface.cpp.

References Simulators::ISimulator::ApplySx().

◆ ApplySXDG()

int ApplySXDG ( void *  sim,
int  qubit 
)

Definition at line 591 of file Interface.cpp.

References Simulators::ISimulator::ApplySxDAG().

◆ ApplyT()

int ApplyT ( void *  sim,
int  qubit 
)

Definition at line 558 of file Interface.cpp.

References Simulators::ISimulator::ApplyT().

◆ ApplyTDG()

int ApplyTDG ( void *  sim,
int  qubit 
)

Definition at line 569 of file Interface.cpp.

References Simulators::ISimulator::ApplyTDG().

◆ ApplyU()

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

Definition at line 657 of file Interface.cpp.

References Simulators::ISimulator::ApplyU().

◆ ApplyX()

int ApplyX ( void *  sim,
int  qubit 
)

◆ ApplyY()

int ApplyY ( void *  sim,
int  qubit 
)

Definition at line 503 of file Interface.cpp.

References Simulators::ISimulator::ApplyY().

◆ ApplyZ()

int ApplyZ ( void *  sim,
int  qubit 
)

Definition at line 514 of file Interface.cpp.

References Simulators::ISimulator::ApplyZ().

◆ ClearSimulator()

int ClearSimulator ( void *  sim)

Definition at line 893 of file Interface.cpp.

References Simulators::IState::Clear().

◆ ConfigureSimulator()

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

Definition at line 845 of file Interface.cpp.

References Simulators::IState::Configure().

◆ CreateSimpleSimulator()

unsigned long int CreateSimpleSimulator ( int  nrQubits)

Definition at line 73 of file Interface.cpp.

References maestroInstance.

◆ CreateSimulator()

unsigned long int CreateSimulator ( int  simType,
int  simExecType 
)

Definition at line 464 of file Interface.cpp.

References maestroInstance.

◆ DestroySimpleSimulator()

void DestroySimpleSimulator ( unsigned long int  simHandle)

Definition at line 82 of file Interface.cpp.

References maestroInstance.

◆ DestroySimulator()

void DestroySimulator ( unsigned long int  simHandle)

Definition at line 483 of file Interface.cpp.

References maestroInstance.

◆ FlushSimulator()

int FlushSimulator ( void *  sim)

Definition at line 1036 of file Interface.cpp.

References Simulators::IState::Flush().

◆ FreeDoubleVector()

void FreeDoubleVector ( double *  vec)

Definition at line 937 of file Interface.cpp.

◆ FreeResult()

void FreeResult ( char *  result)

Definition at line 457 of file Interface.cpp.

◆ FreeULLIVector()

void FreeULLIVector ( unsigned long long int *  vec)

Definition at line 944 of file Interface.cpp.

◆ GetConfiguration()

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

Definition at line 855 of file Interface.cpp.

References Simulators::IState::GetConfiguration().

◆ GetMaestroObject()

◆ GetMaestroObjectWithMute()

void * GetMaestroObjectWithMute ( )

Definition at line 54 of file Interface.cpp.

References isInitialized, and maestroInstance.

◆ GetMultithreading()

int GetMultithreading ( void *  sim)

Definition at line 1096 of file Interface.cpp.

References Simulators::IState::GetMultithreading().

◆ GetNumberOfQubits()

unsigned long int GetNumberOfQubits ( void *  sim)

Definition at line 883 of file Interface.cpp.

References Simulators::IState::GetNumberOfQubits().

◆ GetSimulationType()

int GetSimulationType ( void *  sim)

Definition at line 1027 of file Interface.cpp.

◆ GetSimulator()

void * GetSimulator ( unsigned long int  simHandle)

Definition at line 475 of file Interface.cpp.

References maestroInstance.

◆ GetSimulatorType()

int GetSimulatorType ( void *  sim)

Definition at line 1018 of file Interface.cpp.

◆ InitializeSimulator()

int InitializeSimulator ( void *  sim)

Definition at line 825 of file Interface.cpp.

References Simulators::IState::Initialize().

◆ IsQcsim()

int IsQcsim ( void *  sim)

Definition at line 1105 of file Interface.cpp.

References Simulators::IState::IsQcsim().

◆ Measure()

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

Definition at line 903 of file Interface.cpp.

◆ MeasureNoCollapse()

unsigned long long int MeasureNoCollapse ( void *  sim)

Definition at line 1114 of file Interface.cpp.

◆ Probabilities()

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

Definition at line 978 of file Interface.cpp.

◆ Probability()

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

Definition at line 927 of file Interface.cpp.

References Simulators::IState::Probability().

◆ RemoveAllOptimizationSimulatorsAndAdd()

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

Definition at line 91 of file Interface.cpp.

References maestroInstance.

◆ ResetSimulator()

int ResetSimulator ( void *  sim)

Definition at line 835 of file Interface.cpp.

References Simulators::IState::Reset().

◆ RestoreInternalDestructiveSavedState()

int RestoreInternalDestructiveSavedState ( void *  sim)

◆ RestoreState()

int RestoreState ( void *  sim)

Definition at line 1076 of file Interface.cpp.

References Simulators::IState::RestoreState().

◆ 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 993 of file Interface.cpp.

◆ SaveState()

int SaveState ( void *  sim)

Definition at line 1066 of file Interface.cpp.

References Simulators::IState::SaveState().

◆ SaveStateToInternalDestructive()

int SaveStateToInternalDestructive ( void *  sim)

◆ SetMultithreading()

int SetMultithreading ( void *  sim,
int  multithreading 
)

Definition at line 1086 of file Interface.cpp.

References Simulators::IState::SetMultithreading().

◆ SimpleEstimate()

◆ SimpleExecute()