Maestro 0.3.11
Unified interface for quantum circuit simulation
Loading...
Searching...
No Matches
FactoryAerComposite.cpp
Go to the documentation of this file.
1
15
16#define _CRT_SECURE_NO_WARNINGS 1
17
18#ifndef NO_QISKIT_AER
19#ifndef __APPLE__
20#ifndef _QV_AVX2_IMPL
21#define _QV_AVX2_IMPL
22#pragma warning(push)
23#pragma warning(disable : 4789)
24#include "simulators/statevector/qv_avx2.cpp"
25#pragma warning(pop)
26#endif
27#endif
28#endif
29
30#include "FactoryBackends.h"
31
32#define INCLUDED_BY_FACTORY
33#ifndef NO_QISKIT_AER
34#include "../Aer/AerSimulator.h"
35#endif
37
39{
40
41#ifndef NO_QISKIT_AER
42std::unique_ptr<ISimulator> CreateAerSimulator(SimulationType method)
43{
44 auto sim = std::make_unique<Private::AerSimulator>();
46 sim->Configure("method", "matrix_product_state");
47 else if (method == SimulationType::kStabilizer)
48 sim->Configure("method", "stabilizer");
49 else if (method == SimulationType::kTensorNetwork)
50 sim->Configure("method", "tensor_network");
51 else if (method == SimulationType::kExtendedStabilizer)
52 sim->Configure("method", "extended_stabilizer");
53 else if (method == SimulationType::kDensityMatrix)
54 sim->Configure("method", "density_matrix");
55 else if (method == SimulationType::kStatevector)
56 sim->Configure("method", "statevector");
57 else
58 throw std::invalid_argument("Simulation Type not supported for Qiskit Aer");
59
60 return sim;
61}
62#endif
63
64std::unique_ptr<ISimulator> CreateCompositeSimulator(SimulatorType type)
65{
66 return std::make_unique<Private::CompositeSimulator>(type);
67}
68
69std::unique_ptr<ISimulator> CreateImmediateCompositeSimulator(SimulatorType type)
70{
71 return std::make_unique<Private::ImmediateCompositeSimulator>(type);
72}
73
74} // namespace Simulators::FactoryBackends
std::unique_ptr< ISimulator > CreateAerSimulator(SimulationType method)
std::unique_ptr< ISimulator > CreateCompositeSimulator(SimulatorType type)
std::unique_ptr< ISimulator > CreateImmediateCompositeSimulator(SimulatorType type)
SimulationType
The type of simulation.
Definition State.h:109
@ kExtendedStabilizer
Extended stabilizer simulation type.
Definition State.h:115
@ kStatevector
statevector simulation type
Definition State.h:110
@ kMatrixProductState
matrix product state simulation type
Definition State.h:111
@ kDensityMatrix
Density matrix simulation type.
Definition State.h:117
@ kStabilizer
Clifford gates simulation type.
Definition State.h:112
@ kTensorNetwork
Tensor network simulation type.
Definition State.h:113
SimulatorType
The type of simulator.
Definition State.h:79