simulator.hpp
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <cstdlib>
5 #include "type.hpp"
6 #include "circuit.hpp"
7 class QuantumStateBase;
8 class Observable;
9 
10 
15 private:
16  QuantumCircuit* _circuit;
17  QuantumStateBase* _state;
18  QuantumStateBase* _buffer;
19 public:
26  QuantumCircuitSimulator(QuantumCircuit* circuit, QuantumStateBase* initial_state = NULL);
27 
32 
38  void initialize_state(ITYPE computationl_basis = 0);
42  void initialize_random_state();
43 
47  void simulate();
48 
55  void simulate_range(UINT start, UINT end);
56 
63  double get_expectation_value(const Observable* observable);
64 
70  UINT get_gate_count();
71 
75  void copy_state_to_buffer();
79  void copy_state_from_buffer();
83  void swap_state_and_buffer();
84 
90  const QuantumStateBase* get_state_ptr() const { return _state; }
91 };
92 
93 
#define DllExport
Definition: type.hpp:30
Definition: circuit.hpp:25
QuantumCircuitクラスの詳細
Definition: state.hpp:23
Definition: observable.hpp:23
Definition: observable.cpp:51
Definition: simulator.hpp:14
const QuantumStateBase * get_state_ptr() const
Definition: simulator.hpp:90