|
Maestro 0.2.5
Unified interface for quantum circuit simulation
|
#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 | 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 |
| 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) |
| int | GetMultithreading () |
| unsigned long int | GetNumberOfQubits () |
| int | GetSimulationType () |
| void * | GetSimulator () |
| int | GetSimulatorType () |
| bool | Init (const char *libName) noexcept override |
| int | InitializeSimulator () |
| int | IsQcsim () |
| unsigned long long int | Measure (const unsigned long int *qubits, unsigned long int nrQubits) |
| unsigned long long int | MeasureNoCollapse () |
| 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 () |
| 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) |
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 | 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) |
| int | FlushSimulator (void *sim) |
| char * | GetConfiguration (void *sim, const char *key) |
| void * | GetFunction (const char *funcName) noexcept |
| 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) |
| int | InitializeSimulator (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) |
| 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 |
Definition at line 59 of file Simulator.hpp.
|
inlinenoexcept |
Definition at line 61 of file Simulator.hpp.
|
inlinevirtual |
Definition at line 63 of file Simulator.hpp.
References MaestroLibrary::DestroySimulator().
|
inlineinherited |
Definition at line 267 of file MaestroLib.hpp.
Referenced by SimpleSimulator::AddOptimizationSimulator().
|
inline |
Definition at line 109 of file Simulator.hpp.
References MaestroLibrary::AllocateQubits().
|
inlineinherited |
Definition at line 372 of file MaestroLib.hpp.
Referenced by AllocateQubits().
|
inline |
Definition at line 158 of file Simulator.hpp.
References MaestroLibrary::AllProbabilities().
|
inlineinherited |
Definition at line 454 of file MaestroLib.hpp.
Referenced by AllProbabilities().
|
inline |
Definition at line 153 of file Simulator.hpp.
References MaestroLibrary::Amplitude().
|
inlineinherited |
Definition at line 445 of file MaestroLib.hpp.
Referenced by Amplitude().
|
inline |
Definition at line 387 of file Simulator.hpp.
References MaestroLibrary::ApplyCCX().
|
inlineinherited |
Definition at line 792 of file MaestroLib.hpp.
Referenced by ApplyCCX().
|
inline |
Definition at line 340 of file Simulator.hpp.
References MaestroLibrary::ApplyCH().
|
inlineinherited |
Definition at line 736 of file MaestroLib.hpp.
Referenced by ApplyCH().
|
inline |
Definition at line 359 of file Simulator.hpp.
References MaestroLibrary::ApplyCP().
|
inlineinherited |
Definition at line 760 of file MaestroLib.hpp.
Referenced by ApplyCP().
|
inline |
Definition at line 366 of file Simulator.hpp.
References MaestroLibrary::ApplyCRx().
|
inlineinherited |
Definition at line 768 of file MaestroLib.hpp.
Referenced by ApplyCRx().
|
inline |
Definition at line 373 of file Simulator.hpp.
References MaestroLibrary::ApplyCRy().
|
inlineinherited |
Definition at line 776 of file MaestroLib.hpp.
Referenced by ApplyCRy().
|
inline |
Definition at line 380 of file Simulator.hpp.
References MaestroLibrary::ApplyCRz().
|
inlineinherited |
Definition at line 784 of file MaestroLib.hpp.
Referenced by ApplyCRz().
|
inline |
Definition at line 400 of file Simulator.hpp.
References MaestroLibrary::ApplyCSwap().
|
inlineinherited |
Definition at line 809 of file MaestroLib.hpp.
Referenced by ApplyCSwap().
|
inline |
Definition at line 346 of file Simulator.hpp.
References MaestroLibrary::ApplyCSX().
|
inlineinherited |
Definition at line 744 of file MaestroLib.hpp.
Referenced by ApplyCSX().
|
inline |
Definition at line 352 of file Simulator.hpp.
References MaestroLibrary::ApplyCSXDG().
|
inlineinherited |
Definition at line 752 of file MaestroLib.hpp.
Referenced by ApplyCSXDG().
|
inline |
Definition at line 407 of file Simulator.hpp.
References MaestroLibrary::ApplyCU().
|
inlineinherited |
Definition at line 817 of file MaestroLib.hpp.
Referenced by ApplyCU().
|
inline |
Definition at line 322 of file Simulator.hpp.
References MaestroLibrary::ApplyCX().
|
inlineinherited |
Definition at line 712 of file MaestroLib.hpp.
Referenced by ApplyCX().
|
inline |
Definition at line 328 of file Simulator.hpp.
References MaestroLibrary::ApplyCY().
|
inlineinherited |
Definition at line 720 of file MaestroLib.hpp.
Referenced by ApplyCY().
|
inline |
Definition at line 334 of file Simulator.hpp.
References MaestroLibrary::ApplyCZ().
|
inlineinherited |
Definition at line 728 of file MaestroLib.hpp.
Referenced by ApplyCZ().
|
inline |
Definition at line 252 of file Simulator.hpp.
References MaestroLibrary::ApplyH().
|
inlineinherited |
Definition at line 607 of file MaestroLib.hpp.
Referenced by ApplyH().
|
inline |
Definition at line 287 of file Simulator.hpp.
References MaestroLibrary::ApplyK().
|
inlineinherited |
Definition at line 663 of file MaestroLib.hpp.
Referenced by ApplyK().
|
inline |
Definition at line 292 of file Simulator.hpp.
References MaestroLibrary::ApplyP().
|
inlineinherited |
Definition at line 671 of file MaestroLib.hpp.
Referenced by ApplyP().
|
inline |
Definition at line 133 of file Simulator.hpp.
References MaestroLibrary::ApplyReset().
|
inlineinherited |
Definition at line 410 of file MaestroLib.hpp.
Referenced by ApplyReset().
|
inline |
Definition at line 297 of file Simulator.hpp.
References MaestroLibrary::ApplyRx().
|
inlineinherited |
Definition at line 679 of file MaestroLib.hpp.
Referenced by ApplyRx().
|
inline |
Definition at line 303 of file Simulator.hpp.
References MaestroLibrary::ApplyRy().
|
inlineinherited |
Definition at line 687 of file MaestroLib.hpp.
Referenced by ApplyRy().
|
inline |
Definition at line 309 of file Simulator.hpp.
References MaestroLibrary::ApplyRz().
|
inlineinherited |
Definition at line 695 of file MaestroLib.hpp.
Referenced by ApplyRz().
|
inline |
Definition at line 257 of file Simulator.hpp.
References MaestroLibrary::ApplyS().
|
inlineinherited |
Definition at line 615 of file MaestroLib.hpp.
Referenced by ApplyS().
|
inline |
Definition at line 262 of file Simulator.hpp.
References MaestroLibrary::ApplySDG().
|
inlineinherited |
Definition at line 623 of file MaestroLib.hpp.
Referenced by ApplySDG().
|
inline |
Definition at line 394 of file Simulator.hpp.
References MaestroLibrary::ApplySwap().
|
inlineinherited |
Definition at line 801 of file MaestroLib.hpp.
Referenced by ApplySwap().
|
inline |
Definition at line 277 of file Simulator.hpp.
References MaestroLibrary::ApplySX().
|
inlineinherited |
Definition at line 647 of file MaestroLib.hpp.
Referenced by ApplySX().
|
inline |
Definition at line 282 of file Simulator.hpp.
References MaestroLibrary::ApplySXDG().
|
inlineinherited |
Definition at line 655 of file MaestroLib.hpp.
Referenced by ApplySXDG().
|
inline |
Definition at line 267 of file Simulator.hpp.
References MaestroLibrary::ApplyT().
|
inlineinherited |
Definition at line 631 of file MaestroLib.hpp.
Referenced by ApplyT().
|
inline |
Definition at line 272 of file Simulator.hpp.
References MaestroLibrary::ApplyTDG().
|
inlineinherited |
Definition at line 639 of file MaestroLib.hpp.
Referenced by ApplyTDG().
|
inline |
Definition at line 315 of file Simulator.hpp.
References MaestroLibrary::ApplyU().
|
inlineinherited |
Definition at line 703 of file MaestroLib.hpp.
Referenced by ApplyU().
|
inline |
Definition at line 237 of file Simulator.hpp.
References MaestroLibrary::ApplyX().
|
inlineinherited |
Definition at line 583 of file MaestroLib.hpp.
Referenced by ApplyX().
|
inline |
Definition at line 242 of file Simulator.hpp.
References MaestroLibrary::ApplyY().
|
inlineinherited |
Definition at line 591 of file MaestroLib.hpp.
Referenced by ApplyY().
|
inline |
Definition at line 247 of file Simulator.hpp.
References MaestroLibrary::ApplyZ().
|
inlineinherited |
Definition at line 599 of file MaestroLib.hpp.
Referenced by ApplyZ().
|
inlinestaticnoexceptinherited |
Definition at line 218 of file MaestroLib.hpp.
Referenced by MaestroLibrary::Init().
|
inline |
Definition at line 120 of file Simulator.hpp.
References MaestroLibrary::ClearSimulator().
|
inlineinherited |
Definition at line 391 of file MaestroLib.hpp.
Referenced by ClearSimulator().
|
inline |
Definition at line 97 of file Simulator.hpp.
References MaestroLibrary::ConfigureSimulator().
|
inlineinherited |
Definition at line 353 of file MaestroLib.hpp.
Referenced by ConfigureSimulator().
|
inlinevirtualinherited |
Reimplemented in SimpleSimulator.
Definition at line 236 of file MaestroLib.hpp.
Referenced by SimpleSimulator::CreateSimpleSimulator().
|
inlineoverridevirtual |
Reimplemented from MaestroLibrary.
Definition at line 73 of file Simulator.hpp.
References MaestroLibrary::CreateSimulator(), MaestroLibrary::DestroySimulator(), and MaestroLibrary::GetSimulator().
|
inlineinherited |
Definition at line 246 of file MaestroLib.hpp.
Referenced by SimpleSimulator::~SimpleSimulator(), and SimpleSimulator::CreateSimpleSimulator().
|
inlineinherited |
Definition at line 325 of file MaestroLib.hpp.
Referenced by ~Simulator(), and CreateSimulator().
|
inline |
Definition at line 189 of file Simulator.hpp.
References MaestroLibrary::FlushSimulator().
|
inlineinherited |
Definition at line 503 of file MaestroLib.hpp.
Referenced by FlushSimulator().
|
inlineoverridevirtual |
Reimplemented from MaestroLibrary.
Definition at line 145 of file Simulator.hpp.
References MaestroLibrary::FreeDoubleVector().
|
inlineoverridevirtual |
Reimplemented from MaestroLibrary.
Definition at line 85 of file Simulator.hpp.
References MaestroLibrary::FreeResult().
|
inlineoverridevirtual |
Reimplemented from MaestroLibrary.
Definition at line 149 of file Simulator.hpp.
References MaestroLibrary::FreeULLIVector().
|
inline |
Definition at line 103 of file Simulator.hpp.
References MaestroLibrary::GetConfiguration().
|
inlineinherited |
Definition at line 363 of file MaestroLib.hpp.
Referenced by GetConfiguration().
|
inlinenoexceptinherited |
Definition at line 104 of file Library.h.
Referenced by MaestroLibrary::Init(), and Simulators::QuestLibSim::Init().
|
inlinenoexceptinherited |
|
inline |
Definition at line 222 of file Simulator.hpp.
References MaestroLibrary::GetMultithreading().
|
inlineinherited |
Definition at line 556 of file MaestroLib.hpp.
Referenced by GetMultithreading().
|
inline |
Definition at line 115 of file Simulator.hpp.
References MaestroLibrary::GetNumberOfQubits().
|
inlineinherited |
Definition at line 381 of file MaestroLib.hpp.
Referenced by GetNumberOfQubits().
|
inline |
Definition at line 184 of file Simulator.hpp.
References MaestroLibrary::GetSimulationType().
|
inlineinherited |
Definition at line 494 of file MaestroLib.hpp.
Referenced by GetSimulationType().
|
inline |
Definition at line 83 of file Simulator.hpp.
References MaestroLibrary::GetSimulator().
|
inlineinherited |
Definition at line 318 of file MaestroLib.hpp.
Referenced by CreateSimulator(), and GetSimulator().
|
inline |
Definition at line 179 of file Simulator.hpp.
References MaestroLibrary::GetSimulatorType().
|
inlineinherited |
Definition at line 485 of file MaestroLib.hpp.
Referenced by GetSimulatorType().
|
inlineoverridevirtualnoexcept |
Reimplemented from MaestroLibrary.
Definition at line 67 of file Simulator.hpp.
References MaestroLibrary::Init().
|
inline |
Definition at line 87 of file Simulator.hpp.
References MaestroLibrary::InitializeSimulator().
|
inlineinherited |
Definition at line 333 of file MaestroLib.hpp.
Referenced by InitializeSimulator().
|
inlinenoexceptinherited |
|
inline |
Definition at line 227 of file Simulator.hpp.
References MaestroLibrary::IsQcsim().
|
inlineinherited |
Definition at line 565 of file MaestroLib.hpp.
Referenced by IsQcsim().
|
inlineinherited |
Definition at line 234 of file MaestroLib.hpp.
|
inline |
Definition at line 125 of file Simulator.hpp.
References MaestroLibrary::Measure().
|
inlineinherited |
Definition at line 400 of file MaestroLib.hpp.
Referenced by Measure().
|
inline |
Definition at line 232 of file Simulator.hpp.
References MaestroLibrary::MeasureNoCollapse().
|
inlineinherited |
Definition at line 574 of file MaestroLib.hpp.
Referenced by MeasureNoCollapse().
|
inline |
Definition at line 163 of file Simulator.hpp.
References MaestroLibrary::Probabilities().
|
inlineinherited |
Definition at line 463 of file MaestroLib.hpp.
Referenced by Probabilities().
|
inline |
Definition at line 139 of file Simulator.hpp.
References MaestroLibrary::Probability().
|
inlineinherited |
Definition at line 420 of file MaestroLib.hpp.
Referenced by Probability().
|
inlineinherited |
Definition at line 254 of file MaestroLib.hpp.
Referenced by SimpleSimulator::RemoveAllOptimizationSimulatorsAndAdd().
|
inline |
Definition at line 92 of file Simulator.hpp.
References MaestroLibrary::ResetSimulator().
|
inlineinherited |
Definition at line 343 of file MaestroLib.hpp.
Referenced by ResetSimulator().
|
inline |
Definition at line 200 of file Simulator.hpp.
References MaestroLibrary::RestoreInternalDestructiveSavedState().
|
inlineinherited |
Definition at line 522 of file MaestroLib.hpp.
Referenced by RestoreInternalDestructiveSavedState().
|
inline |
Definition at line 211 of file Simulator.hpp.
References MaestroLibrary::RestoreState().
|
inlineinherited |
Definition at line 540 of file MaestroLib.hpp.
Referenced by RestoreState().
|
inline |
Definition at line 170 of file Simulator.hpp.
References MaestroLibrary::SampleCounts().
|
inlineinherited |
Definition at line 473 of file MaestroLib.hpp.
Referenced by SampleCounts().
|
inline |
Definition at line 206 of file Simulator.hpp.
References MaestroLibrary::SaveState().
|
inlineinherited |
Definition at line 532 of file MaestroLib.hpp.
Referenced by SaveState().
|
inline |
Definition at line 194 of file Simulator.hpp.
References MaestroLibrary::SaveStateToInternalDestructive().
|
inlineinherited |
Definition at line 512 of file MaestroLib.hpp.
Referenced by SaveStateToInternalDestructive().
|
inline |
Definition at line 216 of file Simulator.hpp.
References MaestroLibrary::SetMultithreading().
|
inlineinherited |
Definition at line 548 of file MaestroLib.hpp.
Referenced by SetMultithreading().
|
inlinenoexceptinherited |
|
inlineinherited |
Definition at line 289 of file MaestroLib.hpp.
Referenced by SimpleSimulator::SimpleEstimate().
|
inlineinherited |
Definition at line 278 of file MaestroLib.hpp.
Referenced by SimpleSimulator::SimpleExecute().