|
Maestro 0.3.11
Unified interface for quantum circuit simulation
|
#include <Simulator.hpp>
Public Member Functions | |
| SimpleSimulator () noexcept | |
| virtual | ~SimpleSimulator () |
| bool | AddOptimizationSimulator (int simType, int simExecType) |
| unsigned long int | CreateSimpleSimulator (int nrQubits) override |
| void | FreeResult (char *result) override |
| bool | Init (const char *libName) noexcept override |
| bool | RemoveAllOptimizationSimulatorsAndAdd (int simType, int simExecType) |
| std::string | RunRequestJson (const std::string &request) |
| char * | SimpleEstimate (const char *jsonCircuit, const char *observableStr, const char *jsonConfig) |
| char * | SimpleExecute (const char *jsonCircuit, const char *jsonConfig) |
| 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 | CreateSimulator (int simType, int simExecType) |
| 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) |
| virtual void | FreeDoubleVector (double *vec) |
| virtual void | FreeULLIVector (unsigned long long int *vec) |
| 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 |
Definition at line 5 of file Simulator.hpp.
|
inlinenoexcept |
Definition at line 11 of file Simulator.hpp.
|
inlinevirtual |
Definition at line 15 of file Simulator.hpp.
References MaestroLibrary::DestroySimpleSimulator().
|
inlineinherited |
Definition at line 267 of file MaestroLib.hpp.
Referenced by SimpleSimulator::AddOptimizationSimulator().
|
inline |
Definition at line 47 of file Simulator.hpp.
References MaestroLibrary::AddOptimizationSimulator().
Referenced by main().
|
inlineinherited |
Definition at line 371 of file MaestroLib.hpp.
Referenced by Simulator::AllocateQubits().
|
inlineinherited |
Definition at line 451 of file MaestroLib.hpp.
Referenced by Simulator::AllProbabilities().
|
inlineinherited |
Definition at line 442 of file MaestroLib.hpp.
Referenced by Simulator::Amplitude().
|
inlineinherited |
Definition at line 843 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCCX().
|
inlineinherited |
Definition at line 780 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCH().
|
inlineinherited |
Definition at line 807 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCP().
|
inlineinherited |
Definition at line 816 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCRx().
|
inlineinherited |
Definition at line 825 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCRy().
|
inlineinherited |
Definition at line 834 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCRz().
|
inlineinherited |
Definition at line 861 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCSwap().
|
inlineinherited |
Definition at line 789 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCSX().
|
inlineinherited |
Definition at line 798 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCSXDG().
|
inlineinherited |
Definition at line 870 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCU().
|
inlineinherited |
Definition at line 753 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCX().
|
inlineinherited |
Definition at line 762 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCY().
|
inlineinherited |
Definition at line 771 of file MaestroLib.hpp.
Referenced by Simulator::ApplyCZ().
|
inlineinherited |
Definition at line 511 of file MaestroLib.hpp.
Referenced by Simulator::ApplyGenericOneQubitGate().
|
inlineinherited |
Definition at line 521 of file MaestroLib.hpp.
Referenced by Simulator::ApplyGenericThreeQubitGate().
|
inlineinherited |
Definition at line 516 of file MaestroLib.hpp.
Referenced by Simulator::ApplyGenericTwoQubitGate().
|
inlineinherited |
Definition at line 636 of file MaestroLib.hpp.
Referenced by Simulator::ApplyH().
|
inlineinherited |
Definition at line 699 of file MaestroLib.hpp.
Referenced by Simulator::ApplyK().
|
inlineinherited |
Definition at line 708 of file MaestroLib.hpp.
Referenced by Simulator::ApplyP().
|
inlineinherited |
Definition at line 408 of file MaestroLib.hpp.
Referenced by Simulator::ApplyReset().
|
inlineinherited |
Definition at line 717 of file MaestroLib.hpp.
Referenced by Simulator::ApplyRx().
|
inlineinherited |
Definition at line 726 of file MaestroLib.hpp.
Referenced by Simulator::ApplyRy().
|
inlineinherited |
Definition at line 735 of file MaestroLib.hpp.
Referenced by Simulator::ApplyRz().
|
inlineinherited |
Definition at line 645 of file MaestroLib.hpp.
Referenced by Simulator::ApplyS().
|
inlineinherited |
Definition at line 654 of file MaestroLib.hpp.
Referenced by Simulator::ApplySDG().
|
inlineinherited |
Definition at line 852 of file MaestroLib.hpp.
Referenced by Simulator::ApplySwap().
|
inlineinherited |
Definition at line 681 of file MaestroLib.hpp.
Referenced by Simulator::ApplySX().
|
inlineinherited |
Definition at line 690 of file MaestroLib.hpp.
Referenced by Simulator::ApplySXDG().
|
inlineinherited |
Definition at line 663 of file MaestroLib.hpp.
Referenced by Simulator::ApplyT().
|
inlineinherited |
Definition at line 672 of file MaestroLib.hpp.
Referenced by Simulator::ApplyTDG().
|
inlineinherited |
Definition at line 744 of file MaestroLib.hpp.
Referenced by Simulator::ApplyU().
|
inlineinherited |
Definition at line 609 of file MaestroLib.hpp.
Referenced by Simulator::ApplyX().
|
inlineinherited |
Definition at line 618 of file MaestroLib.hpp.
Referenced by Simulator::ApplyY().
|
inlineinherited |
Definition at line 627 of file MaestroLib.hpp.
Referenced by Simulator::ApplyZ().
|
inlinestaticnoexceptinherited |
Definition at line 214 of file MaestroLib.hpp.
Referenced by Init().
|
inlineinherited |
Definition at line 390 of file MaestroLib.hpp.
Referenced by Simulator::ClearSimulator().
|
inlineinherited |
Definition at line 352 of file MaestroLib.hpp.
Referenced by Simulator::ConfigureSimulator().
|
inlineoverridevirtual |
Reimplemented from MaestroLibrary.
Definition at line 29 of file Simulator.hpp.
References MaestroLibrary::CreateSimpleSimulator(), and MaestroLibrary::DestroySimpleSimulator().
Referenced by main().
|
inlinevirtualinherited |
Reimplemented in Simulator.
Definition at line 306 of file MaestroLib.hpp.
Referenced by Simulator::CreateSimulator().
|
inlineinherited |
Definition at line 248 of file MaestroLib.hpp.
Referenced by SimpleSimulator::~SimpleSimulator(), and SimpleSimulator::CreateSimpleSimulator().
|
inlineinherited |
Definition at line 324 of file MaestroLib.hpp.
Referenced by Simulator::~Simulator(), and Simulator::CreateSimulator().
|
inlineinherited |
Definition at line 940 of file MaestroLib.hpp.
Referenced by Simulator::ExpectationValueOperators().
|
inlineinherited |
Definition at line 879 of file MaestroLib.hpp.
Referenced by Simulator::ExpectationValues().
|
inlineinherited |
Definition at line 893 of file MaestroLib.hpp.
Referenced by Simulator::ExpectationValuesComplex().
|
inlineinherited |
Definition at line 526 of file MaestroLib.hpp.
Referenced by Simulator::FlushSimulator().
|
inlinevirtualinherited |
Reimplemented in Simulator.
Definition at line 426 of file MaestroLib.hpp.
Referenced by Simulator::FreeDoubleVector().
|
inlineoverridevirtual |
Reimplemented from MaestroLibrary.
Definition at line 65 of file Simulator.hpp.
References MaestroLibrary::FreeResult().
Referenced by main().
|
inlinevirtualinherited |
Reimplemented in Simulator.
Definition at line 434 of file MaestroLib.hpp.
Referenced by Simulator::FreeULLIVector().
|
inlineinherited |
Definition at line 362 of file MaestroLib.hpp.
Referenced by Simulator::GetConfiguration().
|
inlinenoexceptinherited |
Definition at line 112 of file Library.h.
Referenced by MaestroLibrary::Init(), and Simulators::QuestLibSim::Init().
|
inlineinherited |
Definition at line 496 of file MaestroLib.hpp.
Referenced by Simulator::GetGateFusionMaxQubits().
|
inlineinherited |
Definition at line 506 of file MaestroLib.hpp.
Referenced by Simulator::GetGateFusionStatistics().
|
inlinenoexceptinherited |
|
inlineinherited |
Definition at line 582 of file MaestroLib.hpp.
Referenced by Simulator::GetMultithreading().
|
inlineinherited |
Definition at line 380 of file MaestroLib.hpp.
Referenced by Simulator::GetNumberOfQubits(), and GetStateVector().
|
inlineinherited |
Definition at line 487 of file MaestroLib.hpp.
Referenced by Simulator::GetSimulationType().
|
inlineinherited |
Definition at line 316 of file MaestroLib.hpp.
Referenced by Simulator::CreateSimulator(), and Simulator::GetSimulator().
|
inlineinherited |
Definition at line 478 of file MaestroLib.hpp.
Referenced by Simulator::GetSimulatorType().
|
inlineinherited |
Definition at line 922 of file MaestroLib.hpp.
References GetNumberOfQubits().
Referenced by Simulator::GetStateVector().
|
inlineoverridevirtualnoexcept |
Reimplemented from MaestroLibrary.
Definition at line 21 of file Simulator.hpp.
References MaestroLibrary::Init().
Referenced by main().
|
inlineinherited |
Definition at line 332 of file MaestroLib.hpp.
Referenced by Simulator::InitializeSimulator().
|
inlineinherited |
Definition at line 501 of file MaestroLib.hpp.
Referenced by Simulator::IsGateFusionEnabled().
|
inlinenoexceptinherited |
|
inlineinherited |
Definition at line 591 of file MaestroLib.hpp.
Referenced by Simulator::IsQcsim().
|
inlineinherited |
Definition at line 233 of file MaestroLib.hpp.
|
inlineinherited |
Definition at line 399 of file MaestroLib.hpp.
Referenced by Simulator::Measure().
|
inlineinherited |
Definition at line 600 of file MaestroLib.hpp.
Referenced by Simulator::MeasureNoCollapse().
|
inlineinherited |
Definition at line 963 of file MaestroLib.hpp.
Referenced by Simulator::MoveAtBeginningOfChain().
|
inlineinherited |
Definition at line 460 of file MaestroLib.hpp.
Referenced by Simulator::Probabilities().
|
inlineinherited |
Definition at line 417 of file MaestroLib.hpp.
Referenced by Simulator::Probability().
|
inlineinherited |
Definition at line 256 of file MaestroLib.hpp.
Referenced by SimpleSimulator::RemoveAllOptimizationSimulatorsAndAdd().
|
inline |
Definition at line 39 of file Simulator.hpp.
References MaestroLibrary::RemoveAllOptimizationSimulatorsAndAdd().
Referenced by main().
|
inlineinherited |
Definition at line 342 of file MaestroLib.hpp.
Referenced by Simulator::ResetSimulator().
|
inlineinherited |
Definition at line 545 of file MaestroLib.hpp.
Referenced by Simulator::RestoreInternalDestructiveSavedState().
|
inlineinherited |
Definition at line 564 of file MaestroLib.hpp.
Referenced by Simulator::RestoreState().
|
inline |
Definition at line 912 of file MaestroLib.hpp.
|
inlineinherited |
Definition at line 469 of file MaestroLib.hpp.
Referenced by Simulator::SampleCounts().
|
inlineinherited |
Definition at line 555 of file MaestroLib.hpp.
Referenced by Simulator::SaveState().
|
inlineinherited |
Definition at line 535 of file MaestroLib.hpp.
Referenced by Simulator::SaveStateToInternalDestructive().
|
inlineinherited |
Definition at line 573 of file MaestroLib.hpp.
Referenced by Simulator::SetMultithreading().
|
inlinenoexceptinherited |
|
inlineinherited |
Definition at line 287 of file MaestroLib.hpp.
Referenced by SimpleSimulator::SimpleEstimate().
|
inline |
Definition at line 60 of file Simulator.hpp.
References MaestroLibrary::SimpleEstimate().
Referenced by main().
|
inlineinherited |
Definition at line 277 of file MaestroLib.hpp.
Referenced by SimpleSimulator::SimpleExecute().
|
inline |
Definition at line 55 of file Simulator.hpp.
References MaestroLibrary::SimpleExecute().
Referenced by main().
|
inline |
Definition at line 917 of file MaestroLib.hpp.