12#include "../../composer/composer/Estimators/ExecutionEstimator.h"
39 Estimators::ExecutionEstimator<>::InitializeRegressors();
56 Estimators::ExecutionEstimator<>::InitializeRegressors();
87 int simType,
int simExecType) {
111 const char *jsonConfig) {
136 std::shared_ptr<Circuits::Circuit<>> circuit;
138 if (circuitStr[0] ==
'{' || circuitStr[0] ==
'[') {
145 std::string qasmInput(circuitStr);
147 if (parser.
Failed())
return nullptr;
157 if (configJson.is_object()) {
158 const auto configObject = configJson.as_object();
163 if (configObject.contains(
"shots") &&
164 configObject.at(
"shots").is_number()) {
165 auto number = configObject.at(
"shots");
166 nrShots = number.is_int64() ? (size_t)number.as_int64()
167 : (size_t)number.as_uint64();
171 bool configured =
false;
173 "gpu_device", configJson);
174 if (!gpuDevice.empty()) {
177 if (network->GetSimulator()) network->GetSimulator()->Clear();
178 network->Configure(
"gpu_device", gpuDevice.c_str());
182 "matrix_product_state_max_bond_dimension", configJson);
183 if (!maxBondDim.empty()) {
185 if (network->GetSimulator()) network->GetSimulator()->Clear();
186 network->Configure(
"matrix_product_state_max_bond_dimension",
190 const std::string singularValueThreshold =
192 "matrix_product_state_truncation_threshold", configJson);
193 if (!singularValueThreshold.empty()) {
195 if (network->GetSimulator()) network->GetSimulator()->Clear();
196 network->Configure(
"matrix_product_state_truncation_threshold",
197 singularValueThreshold.c_str());
201 "matrix_product_state_truncation_mode", configJson);
202 if (!truncationMode.empty()) {
204 if (network->GetSimulator()) network->GetSimulator()->Clear();
205 network->Configure(
"matrix_product_state_truncation_mode",
206 truncationMode.c_str());
210 "mps_sample_measure_algorithm", configJson);
211 if (!mpsSample.empty()) {
213 if (network->GetSimulator()) network->GetSimulator()->Clear();
214 network->Configure(
"mps_sample_measure_algorithm", mpsSample.c_str());
217 if (configured || !network->GetSimulator()) network->CreateSimulator();
220 auto start = std::chrono::high_resolution_clock::now();
221 auto results = network->RepeatedExecuteOnHost(circuit, 0, nrShots);
222 auto end = std::chrono::high_resolution_clock::now();
224 std::chrono::duration<double> duration = end - start;
225 double time_taken = duration.count();
226 std::string timeStr = std::to_string(time_taken);
232 boost::json::object jsonResult;
233 jsonResult.reserve(results.size());
235 for (
auto &result : results) {
236 boost::json::string bits;
237 bits.reserve(result.first.size());
238 for (
const auto bit : result.first) bits.append(bit ?
"1" :
"0");
240 jsonResult.emplace(std::move(bits), std::move(result.second));
243 boost::json::object response;
246 response.emplace(
"counts", std::move(jsonResult));
247 response.emplace(
"time_taken", timeStr);
249 auto simulatorType = network->GetLastSimulatorType();
251 switch (simulatorType) {
254 response.emplace(
"simulator",
"aer");
258 response.emplace(
"simulator",
"qcsim");
262 response.emplace(
"simulator",
"composite_aer");
266 response.emplace(
"simulator",
"composite_qcsim");
269 response.emplace(
"simulator",
"quest");
273 response.emplace(
"simulator",
"distributed_gpu_simulator");
276 response.emplace(
"simulator",
"distributed_mpi_gpu_simulator");
279 response.emplace(
"simulator",
"gpu_simulator");
280 response.emplace(
"gpu_device", network->GetLastGpuDevice());
284 response.emplace(
"simulator",
"unknown");
288 auto simulationType = network->GetLastSimulationType();
289 switch (simulationType) {
291 response.emplace(
"method",
"statevector");
294 response.emplace(
"method",
"matrix_product_state");
297 response.emplace(
"method",
"stabilizer");
300 response.emplace(
"method",
"tensor_network");
303 response.emplace(
"method",
"pauli_propagation");
306 response.emplace(
"method",
"extended_stabilizer");
309 response.emplace(
"method",
"path_integral");
312 response.emplace(
"method",
"density_matrix");
315 response.emplace(
"method",
"unknown");
319 const std::string responseStr = boost::json::serialize(response);
320 const size_t responseSize = responseStr.length();
321 char *result =
new char[responseSize + 1];
323 const char *responseData = responseStr.c_str();
324 std::copy(responseData, responseData + responseSize, result);
326 result[responseSize] = 0;
335 const char *observableStr,
const char *jsonConfig) {
336 if (simpleSim == 0 || !circuitStr || !observableStr || !jsonConfig ||
342 std::shared_ptr<Circuits::Circuit<>> circuit;
344 if (circuitStr[0] ==
'{' || circuitStr[0] ==
'[') {
349 std::string qasmInput(circuitStr);
351 if (parser.
Failed())
return nullptr;
356 bool configured =
false;
358 "gpu_device", configJson);
359 if (!gpuDevice.empty()) {
362 if (network->GetSimulator()) network->GetSimulator()->Clear();
363 network->Configure(
"gpu_device", gpuDevice.c_str());
367 "matrix_product_state_max_bond_dimension", configJson);
368 if (!maxBondDim.empty()) {
370 if (network->GetSimulator()) network->GetSimulator()->Clear();
371 network->Configure(
"matrix_product_state_max_bond_dimension",
375 const std::string singularValueThreshold =
377 "matrix_product_state_truncation_threshold", configJson);
378 if (!singularValueThreshold.empty()) {
380 if (network->GetSimulator()) network->GetSimulator()->Clear();
381 network->Configure(
"matrix_product_state_truncation_threshold",
382 singularValueThreshold.c_str());
386 "matrix_product_state_truncation_mode", configJson);
387 if (!truncationMode.empty()) {
389 if (network->GetSimulator()) network->GetSimulator()->Clear();
390 network->Configure(
"matrix_product_state_truncation_mode",
391 truncationMode.c_str());
395 "mps_sample_measure_algorithm", configJson);
396 if (!mpsSample.empty()) {
398 if (network->GetSimulator()) network->GetSimulator()->Clear();
399 network->Configure(
"mps_sample_measure_algorithm", mpsSample.c_str());
402 if (configured || !network->GetSimulator()) network->CreateSimulator();
405 std::vector<std::string> paulis;
406 std::string obsStr(observableStr);
407 std::stringstream ss(obsStr);
409 while (std::getline(ss, item,
';')) {
410 if (!item.empty()) paulis.push_back(item);
413 auto start = std::chrono::high_resolution_clock::now();
414 auto expectations = network->ExecuteOnHostExpectations(circuit, 0, paulis);
415 auto end = std::chrono::high_resolution_clock::now();
417 std::chrono::duration<double> duration = end - start;
418 double time_taken = duration.count();
419 std::string timeStr = std::to_string(time_taken);
421 boost::json::object response;
424 boost::json::array jsonExpectations;
425 jsonExpectations.reserve(expectations.size());
426 for (
double val : expectations) {
427 jsonExpectations.push_back(val);
430 response.emplace(
"expectation_values", std::move(jsonExpectations));
431 response.emplace(
"time_taken", timeStr);
433 auto simulatorType = network->GetLastSimulatorType();
435 switch (simulatorType) {
438 response.emplace(
"simulator",
"aer");
442 response.emplace(
"simulator",
"qcsim");
445 response.emplace(
"simulator",
"quest");
449 response.emplace(
"simulator",
"composite_aer");
453 response.emplace(
"simulator",
"composite_qcsim");
457 response.emplace(
"simulator",
"distributed_gpu_simulator");
460 response.emplace(
"simulator",
"distributed_mpi_gpu_simulator");
463 response.emplace(
"simulator",
"gpu_simulator");
464 response.emplace(
"gpu_device", network->GetLastGpuDevice());
468 response.emplace(
"simulator",
"unknown");
472 auto simulationType = network->GetLastSimulationType();
473 switch (simulationType) {
475 response.emplace(
"method",
"statevector");
478 response.emplace(
"method",
"matrix_product_state");
481 response.emplace(
"method",
"stabilizer");
484 response.emplace(
"method",
"tensor_network");
487 response.emplace(
"method",
"pauli_propagation");
490 response.emplace(
"method",
"extended_stabilizer");
493 response.emplace(
"method",
"path_integral");
496 response.emplace(
"method",
"density_matrix");
499 response.emplace(
"method",
"unknown");
503 const std::string responseStr = boost::json::serialize(response);
504 const size_t responseSize = responseStr.length();
505 char *result =
new char[responseSize + 1];
507 const char *responseData = responseStr.c_str();
508 std::copy(responseData, responseData + responseSize, result);
510 result[responseSize] = 0;
519 if (result)
delete[] result;
674 int ApplyP(
void *sim,
int qubit,
double theta) {
677 simulator->
ApplyP(qubit, theta);
685 int ApplyRx(
void *sim,
int qubit,
double theta) {
688 simulator->
ApplyRx(qubit, theta);
696 int ApplyRy(
void *sim,
int qubit,
double theta) {
699 simulator->
ApplyRy(qubit, theta);
707 int ApplyRz(
void *sim,
int qubit,
double theta) {
710 simulator->
ApplyRz(qubit, theta);
718 int ApplyU(
void *sim,
int qubit,
double theta,
double phi,
double lambda,
722 simulator->
ApplyU(qubit, theta, phi, lambda, gamma);
730 int ApplyCX(
void *sim,
int controlQubit,
int targetQubit) {
733 simulator->
ApplyCX(controlQubit, targetQubit);
741 int ApplyCY(
void *sim,
int controlQubit,
int targetQubit) {
744 simulator->
ApplyCY(controlQubit, targetQubit);
752 int ApplyCZ(
void *sim,
int controlQubit,
int targetQubit) {
755 simulator->
ApplyCZ(controlQubit, targetQubit);
763 int ApplyCH(
void *sim,
int controlQubit,
int targetQubit) {
766 simulator->
ApplyCH(controlQubit, targetQubit);
774 int ApplyCSX(
void *sim,
int controlQubit,
int targetQubit) {
777 simulator->
ApplyCSx(controlQubit, targetQubit);
785 int ApplyCSXDG(
void *sim,
int controlQubit,
int targetQubit) {
796 int ApplyCP(
void *sim,
int controlQubit,
int targetQubit,
double theta) {
799 simulator->
ApplyCP(controlQubit, targetQubit, theta);
807 int ApplyCRx(
void *sim,
int controlQubit,
int targetQubit,
double theta) {
810 simulator->
ApplyCRx(controlQubit, targetQubit, theta);
818 int ApplyCRy(
void *sim,
int controlQubit,
int targetQubit,
double theta) {
821 simulator->
ApplyCRy(controlQubit, targetQubit, theta);
829 int ApplyCRz(
void *sim,
int controlQubit,
int targetQubit,
double theta) {
832 simulator->
ApplyCRz(controlQubit, targetQubit, theta);
840 int ApplyCCX(
void *sim,
int controlQubit1,
int controlQubit2,
844 simulator->
ApplyCCX(controlQubit1, controlQubit2, targetQubit);
863 int ApplyCSwap(
void *sim,
int controlQubit,
int qubit1,
int qubit2) {
866 simulator->
ApplyCSwap(controlQubit, qubit1, qubit2);
874 int ApplyCU(
void *sim,
int controlQubit,
int targetQubit,
double theta,
875 double phi,
double lambda,
double gamma) {
878 simulator->
ApplyCU(controlQubit, targetQubit, theta, phi, lambda, gamma);
907 if (!sim || !key || !value)
return 0;
917 if (!sim || !key)
return nullptr;
920 if (value.empty())
return nullptr;
923 const size_t valueSize = value.length();
924 char *result =
new char[valueSize + 1];
925 std::copy(value.c_str(), value.c_str() + valueSize, result);
926 result[valueSize] = 0;
934 if (!sim || nrQubits == 0)
return 0;
938 return static_cast<unsigned long int>(res);
948 return static_cast<unsigned long int>(res);
964 unsigned long long int Measure(
void *sim,
const unsigned long int *qubits,
965 unsigned long int nrQubits) {
966 if (!sim || !qubits || nrQubits == 0)
return 0;
969 const size_t res = simulator->Measure(qubitVector);
970 return static_cast<unsigned long long int>(res);
977 unsigned long int nrQubits) {
978 if (!sim || !qubits || nrQubits == 0)
return 0;
981 simulator->ApplyReset(qubitVector);
989 if (!sim)
return 0.0;
991 const double res = simulator->
Probability(outcome);
999 if (vec)
delete[] vec;
1003__declspec(dllexport)
1006 if (vec)
delete[] vec;
1010__declspec(dllexport)
1012 double *
Amplitude(
void *sim,
unsigned long long int outcome) {
1013 if (!sim)
return nullptr;
1015 const std::complex<double> amp = simulator->
Amplitude(outcome);
1017 double *result =
new double[2];
1018 result[0] = amp.real();
1019 result[1] = amp.imag();
1024__declspec(dllexport)
1027 if (!sim)
return nullptr;
1031 double *result =
new double[probabilities.size()];
1032 std::copy(probabilities.begin(), probabilities.end(), result);
1037__declspec(dllexport)
1040 unsigned long int nrQubits) {
1041 if (!sim || !qubits || nrQubits == 0)
return nullptr;
1044 const auto probabilities = simulator->Probabilities(qubitVector);
1046 double *result =
new double[probabilities.size()];
1047 std::copy(probabilities.begin(), probabilities.end(), result);
1052__declspec(dllexport)
1055 const unsigned long long int *qubits,
1056 unsigned long int nrQubits,
1057 unsigned long int shots) {
1058 if (!sim || !qubits || nrQubits == 0 || shots == 0)
return nullptr;
1062 const auto counts = simulator->SampleCounts(qubitVector, shots);
1064 unsigned long long int *result =
1065 new unsigned long long int[counts.size() * 2];
1067 for (
const auto &count : counts) {
1068 result[index] = count.first;
1070 result[index] = count.second;
1077__declspec(dllexport)
1080 if (!sim)
return -1;
1082 return static_cast<int>(simulator->GetType());
1086__declspec(dllexport)
1089 if (!sim)
return -1;
1091 return static_cast<int>(simulator->GetSimulationType());
1095__declspec(dllexport)
1105__declspec(dllexport)
1115__declspec(dllexport)
1125__declspec(dllexport)
1135__declspec(dllexport)
1145__declspec(dllexport)
1155__declspec(dllexport)
1164__declspec(dllexport)
1169 return simulator->
IsQcsim() ? 1 : 0;
1173__declspec(dllexport)
1178 return static_cast<unsigned long long int>(simulator->MeasureNoCollapse());
int ApplyK(void *sim, int qubit)
double Probability(void *sim, unsigned long long int outcome)
char * GetConfiguration(void *sim, const char *key)
int InitializeSimulator(void *sim)
int RestoreState(void *sim)
void FreeDoubleVector(double *vec)
int ApplyRx(void *sim, int qubit, double theta)
int ApplyReset(void *sim, const unsigned long int *qubits, unsigned long int nrQubits)
int ApplyX(void *sim, int qubit)
int ApplyU(void *sim, int qubit, double theta, double phi, double lambda, double gamma)
int AddOptimizationSimulator(unsigned long int simHandle, int simType, int simExecType)
unsigned long int CreateSimulator(int simType, int simExecType)
int ApplyCRy(void *sim, int controlQubit, int targetQubit, double theta)
int ApplyTDG(void *sim, int qubit)
int ApplyCSXDG(void *sim, int controlQubit, int targetQubit)
static std::atomic_bool isInitialized
void FreeResult(char *result)
int ApplyS(void *sim, int qubit)
int ApplyCX(void *sim, int controlQubit, int targetQubit)
unsigned long int AllocateQubits(void *sim, unsigned long int nrQubits)
char * SimpleExecute(unsigned long int simpleSim, const char *circuitStr, const char *jsonConfig)
int ApplyCRz(void *sim, int controlQubit, int targetQubit, double theta)
unsigned long int GetNumberOfQubits(void *sim)
double * AllProbabilities(void *sim)
void * GetMaestroObjectWithMute()
unsigned long long int MeasureNoCollapse(void *sim)
int ApplyCP(void *sim, int controlQubit, int targetQubit, double theta)
int ApplySXDG(void *sim, int qubit)
void * GetMaestroObject()
int GetMultithreading(void *sim)
int ApplySDG(void *sim, int qubit)
unsigned long long int Measure(void *sim, const unsigned long int *qubits, unsigned long int nrQubits)
int ApplyCSwap(void *sim, int controlQubit, int qubit1, int qubit2)
void DestroySimpleSimulator(unsigned long int simHandle)
int ApplyCCX(void *sim, int controlQubit1, int controlQubit2, int targetQubit)
int ApplyY(void *sim, int qubit)
double * Amplitude(void *sim, unsigned long long int outcome)
int ApplyZ(void *sim, int qubit)
int ApplyH(void *sim, int qubit)
int ApplyCY(void *sim, int controlQubit, int targetQubit)
char * SimpleEstimate(unsigned long int simpleSim, const char *circuitStr, const char *observableStr, const char *jsonConfig)
double * Probabilities(void *sim, const unsigned long long int *qubits, unsigned long int nrQubits)
int SetMultithreading(void *sim, int multithreading)
int ApplyCU(void *sim, int controlQubit, int targetQubit, double theta, double phi, double lambda, double gamma)
void DestroySimulator(unsigned long int simHandle)
int ApplySwap(void *sim, int qubit1, int qubit2)
void * GetSimulator(unsigned long int simHandle)
static std::unique_ptr< Maestro > maestroInstance
int ApplyRy(void *sim, int qubit, double theta)
int ApplyP(void *sim, int qubit, double theta)
int SaveStateToInternalDestructive(void *sim)
int ApplyCH(void *sim, int controlQubit, int targetQubit)
int FlushSimulator(void *sim)
unsigned long int CreateSimpleSimulator(int nrQubits)
int GetSimulationType(void *sim)
int ResetSimulator(void *sim)
unsigned long long int * SampleCounts(void *sim, const unsigned long long int *qubits, unsigned long int nrQubits, unsigned long int shots)
int ApplySX(void *sim, int qubit)
int ApplyCZ(void *sim, int controlQubit, int targetQubit)
int ApplyRz(void *sim, int qubit, double theta)
int GetSimulatorType(void *sim)
int RestoreInternalDestructiveSavedState(void *sim)
int ApplyT(void *sim, int qubit)
int ApplyCRx(void *sim, int controlQubit, int targetQubit, double theta)
int ConfigureSimulator(void *sim, const char *key, const char *value)
int ApplyCSX(void *sim, int controlQubit, int targetQubit)
int ClearSimulator(void *sim)
int RemoveAllOptimizationSimulatorsAndAdd(unsigned long int simHandle, int simType, int simExecType)
void FreeULLIVector(unsigned long long int *vec)
static boost::json::value ParseString(const char *str)
Parses a string containing json.
std::shared_ptr< Circuits::Circuit< Time > > ParseCircuit(const char *str) const
static std::string GetConfigString(const std::string &config, const boost::json::value &jsonConfig)
static int ParseGpuDevice(const std::string &value)
Set a configuration value.
Interface class for a quantum computing simulator.
virtual void ApplyCRz(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit, double theta)=0
Applies a CRz gate to the qubits.
virtual void ApplySDG(Types::qubit_t qubit)=0
Applies a S dagger gate to the qubit.
virtual void ApplyCCX(Types::qubit_t qubit0, Types::qubit_t qubit1, Types::qubit_t qubit2)=0
Applies a controlled controlled not gate to the qubits.
virtual void ApplyX(Types::qubit_t qubit)=0
Applies a not gate to the qubit.
virtual void ApplyCSxDAG(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit)=0
Applies a CSx dagger gate to the qubits.
virtual void ApplyU(Types::qubit_t qubit, double theta, double phi, double lambda, double gamma)=0
Applies a U gate to the qubit.
virtual void ApplyP(Types::qubit_t qubit, double lambda)=0
Applies a phase shift gate to the qubit.
virtual void ApplySx(Types::qubit_t qubit)=0
Applies a Sx gate to the qubit.
virtual void ApplyTDG(Types::qubit_t qubit)=0
Applies a T dagger gate to the qubit.
virtual void ApplyCU(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit, double theta, double phi, double lambda, double gamma)=0
Applies a controlled U gate to the qubits.
virtual void ApplyCRy(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit, double theta)=0
Applies a CRy gate to the qubits.
virtual void ApplyCX(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit)=0
Applies a CX gate to the qubits.
virtual void ApplyRy(Types::qubit_t qubit, double theta)=0
Applies a Ry gate to the qubit.
virtual void ApplyCH(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit)=0
Applies a CH gate to the qubits.
virtual void ApplySwap(Types::qubit_t qubit0, Types::qubit_t qubit1)=0
Applies a swap gate to the qubits.
virtual void ApplyCSx(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit)=0
Applies a CSx gate to the qubits.
virtual void ApplyK(Types::qubit_t qubit)=0
Applies a K gate to the qubit.
virtual void ApplyY(Types::qubit_t qubit)=0
Applies a Y gate to the qubit.
virtual void ApplyT(Types::qubit_t qubit)=0
Applies a T gate to the qubit.
virtual void ApplyS(Types::qubit_t qubit)=0
Applies a S gate to the qubit.
virtual void ApplyCSwap(Types::qubit_t ctrl_qubit, Types::qubit_t qubit0, Types::qubit_t qubit1)=0
Applies a controlled swap gate to the qubits.
virtual void ApplyZ(Types::qubit_t qubit)=0
Applies a Z gate to the qubit.
virtual void ApplyRz(Types::qubit_t qubit, double theta)=0
Applies a Rz gate to the qubit.
virtual void ApplyCRx(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit, double theta)=0
Applies a CRx gate to the qubits.
virtual void ApplyCY(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit)=0
Applies a CY gate to the qubits.
virtual void ApplyCZ(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit)=0
Applies a CZ gate to the qubits.
virtual void ApplyH(Types::qubit_t qubit)=0
Applies a Hadamard gate to the qubit.
virtual void ApplyRx(Types::qubit_t qubit, double theta)=0
Applies a Rx gate to the qubit.
virtual void ApplySxDAG(Types::qubit_t qubit)=0
Applies a Sx dagger gate to the qubit.
virtual void ApplyCP(Types::qubit_t ctrl_qubit, Types::qubit_t tgt_qubit, double lambda)=0
Applies a CP gate to the qubits.
virtual bool IsQcsim() const =0
Returns if the simulator is a qcsim simulator.
virtual void SaveStateToInternalDestructive()=0
Saves the state to internal storage.
virtual void RestoreState()=0
Restores the state from the internally saved state.
virtual void SaveState()=0
Saves the state to internal storage.
virtual double Probability(Types::qubit_t outcome)=0
Returns the probability of the specified outcome.
virtual void Initialize()=0
Initializes the state.
virtual size_t AllocateQubits(size_t num_qubits)=0
Allocates qubits.
virtual std::vector< double > AllProbabilities()=0
Returns the probabilities of all possible outcomes.
virtual void RestoreInternalDestructiveSavedState()=0
Restores the state from the internally saved state.
virtual void SetMultithreading(bool multithreading=true)=0
Enable/disable multithreading.
virtual std::complex< double > Amplitude(Types::qubit_t outcome)=0
Returns the amplitude of the specified state.
virtual size_t GetNumberOfQubits() const =0
Returns the number of qubits.
virtual void Flush()=0
Flushes the applied operations.
virtual void Configure(const char *key, const char *value)=0
Configures the state.
virtual void Clear()=0
Clears the state.
virtual bool GetMultithreading() const =0
Get the multithreading flag.
virtual void Reset()=0
Just resets the state to 0.
virtual std::string GetConfiguration(const char *key) const =0
Returns configuration value.
static bool InitQuestLibrary()
static bool InitQuestLibraryWithMute()
std::shared_ptr< Circuits::Circuit< Time > > ParseAndTranslate(const std::string &qasmInputStr)
SimulationType
The type of simulation.
@ kExtendedStabilizer
Extended stabilizer simulation type.
@ kStatevector
statevector simulation type
@ kMatrixProductState
matrix product state simulation type
@ kDensityMatrix
Density matrix simulation type.
@ kStabilizer
Clifford gates simulation type.
@ kPauliPropagator
Pauli propagator simulation type.
@ kTensorNetwork
Tensor network simulation type.
@ kPathIntegral
Path integral simulation type.
SimulatorType
The type of simulator.
@ kCompositeQCSim
composite qcsim simulator type
@ kQCSim
qcsim simulator type
@ kQiskitAer
qiskit aer simulator type
@ kQuestSim
quest simulator type
@ kDistMpiGpuSim
state distributed across MPI ranks/GPUs
@ kCompositeQiskitAer
composite qiskit aer simulator type
@ kDistGpuSim
state distributed across local GPUs
@ kGpuSim
gpu simulator type
std::vector< qubit_t > qubits_vector
The type of a vector of qubits.