Browse Source

change quantum simulator position

pull/15064/head
donghufeng 4 years ago
parent
commit
a9a96c9a9c
28 changed files with 51 additions and 51 deletions
  1. +1
    -1
      mindspore/ccsrc/CMakeLists.txt
  2. +4
    -4
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/evolution_cpu_kernel.h
  3. +4
    -4
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/pqc_cpu_kernel.h
  4. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/CMakeLists.txt
  5. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.cc
  6. +3
    -3
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.h
  7. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.cc
  8. +2
    -2
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.h
  9. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/gates.cc
  10. +2
    -2
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/gates.h
  11. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/intrinsic_one_para_gate.cc
  12. +2
    -2
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/intrinsic_one_para_gate.h
  13. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/non_parameter_gate.cc
  14. +2
    -2
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/non_parameter_gate.h
  15. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/parameter_gate.cc
  16. +2
    -2
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/parameter_gate.h
  17. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/hamiltonian.cc
  18. +3
    -3
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/hamiltonian.h
  19. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.cc
  20. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.h
  21. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/pqc_simulator.cc
  22. +6
    -6
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/pqc_simulator.h
  23. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/sparse.cc
  24. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/sparse.h
  25. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.cc
  26. +5
    -5
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.h
  27. +1
    -1
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.cc
  28. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h

+ 1
- 1
mindspore/ccsrc/CMakeLists.txt View File

@@ -223,7 +223,7 @@ set(SUB_COMP
frontend/operator
pipeline/jit
pipeline/pynative
common debug pybind_api utils vm profiler ps mindquantum
common debug pybind_api utils vm profiler ps
)

foreach(_comp ${SUB_COMP})


+ 4
- 4
mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/evolution_cpu_kernel.h View File

@@ -19,10 +19,10 @@
#include <vector>
#include "backend/kernel_compiler/cpu/cpu_kernel.h"
#include "backend/kernel_compiler/cpu/cpu_kernel_factory.h"
#include "mindquantum/pqc_simulator.h"
#include "mindquantum/transformer.h"
#include "mindquantum/circuit.h"
#include "mindquantum/parameter_resolver.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/pqc_simulator.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.h"

namespace mindspore {
namespace kernel {


+ 4
- 4
mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/pqc_cpu_kernel.h View File

@@ -21,10 +21,10 @@
#include <string>
#include "backend/kernel_compiler/cpu/cpu_kernel.h"
#include "backend/kernel_compiler/cpu/cpu_kernel_factory.h"
#include "mindquantum/pqc_simulator.h"
#include "mindquantum/transformer.h"
#include "mindquantum/circuit.h"
#include "mindquantum/parameter_resolver.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/pqc_simulator.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.h"

namespace mindspore {
namespace kernel {


mindspore/ccsrc/mindquantum/CMakeLists.txt → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/CMakeLists.txt View File

@@ -1,6 +1,6 @@
if(ENABLE_CPU AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux"
AND ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "x86_64")
message("compiled mindquantum")
message("compiled quantum simulator")
file(GLOB_RECURSE _MINDQUANTUM_SRC_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.cc")
set_property(SOURCE ${_MINDQUANTUM_SRC_LIST} PROPERTY COMPILE_DEFINITIONS
SUBMODULE_ID=mindspore::SubModuleId::SM_MINDQUANTUM)

mindspore/ccsrc/mindquantum/circuit.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "mindquantum/circuit.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/circuit.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.h View File

@@ -19,9 +19,9 @@
#include <vector>
#include <string>
#include <memory>
#include "mindquantum/gates/non_parameter_gate.h"
#include "mindquantum/gates/gates.h"
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/non_parameter_gate.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/gates.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/gates/basic_gates.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.cc View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mindquantum/gates/basic_gates.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.h"

#include <string>


mindspore/ccsrc/mindquantum/gates/basic_gates.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.h View File

@@ -17,8 +17,8 @@
#ifndef MINDQUANTUM_ENGINE_BASIC_GATES_H_
#define MINDQUANTUM_ENGINE_BASIC_GATES_H_
#include <string>
#include "mindquantum/parameter_resolver.h"
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/gates/gates.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/gates.cc View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mindquantum/gates/gates.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/gates.h"

#include <cmath>


mindspore/ccsrc/mindquantum/gates/gates.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/gates.h View File

@@ -16,8 +16,8 @@

#ifndef MINDQUANTUM_ENGINE_GATES_H_
#define MINDQUANTUM_ENGINE_GATES_H_
#include "mindquantum/gates/intrinsic_one_para_gate.h"
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/intrinsic_one_para_gate.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/gates/intrinsic_one_para_gate.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/intrinsic_one_para_gate.cc View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mindquantum/gates/intrinsic_one_para_gate.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/intrinsic_one_para_gate.h"

#include <string>


mindspore/ccsrc/mindquantum/gates/intrinsic_one_para_gate.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/intrinsic_one_para_gate.h View File

@@ -17,8 +17,8 @@
#ifndef MINDQUANTUM_ENGINE_INTRINSIC_ONE_PARAGATE_H_
#define MINDQUANTUM_ENGINE_INTRINSIC_ONE_PARAGATE_H_
#include <string>
#include "mindquantum/gates/parameter_gate.h"
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/parameter_gate.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/gates/non_parameter_gate.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/non_parameter_gate.cc View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mindquantum/gates/non_parameter_gate.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/non_parameter_gate.h"

#include <string>


mindspore/ccsrc/mindquantum/gates/non_parameter_gate.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/non_parameter_gate.h View File

@@ -17,8 +17,8 @@
#ifndef MINDQUANTUM_ENGINE_NON_PARAMETER_GATE_H_
#define MINDQUANTUM_ENGINE_NON_PARAMETER_GATE_H_
#include <string>
#include "mindquantum/gates/basic_gates.h"
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/gates/parameter_gate.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/parameter_gate.cc View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mindquantum/gates/parameter_gate.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/parameter_gate.h"

#include <string>


mindspore/ccsrc/mindquantum/gates/parameter_gate.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/parameter_gate.h View File

@@ -17,8 +17,8 @@
#ifndef MINDQUANTUM_ENGINE_PARAMETER_GATE_H_
#define MINDQUANTUM_ENGINE_PARAMETER_GATE_H_
#include <string>
#include "mindquantum/gates/basic_gates.h"
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/hamiltonian.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/hamiltonian.cc View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mindquantum/hamiltonian.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/hamiltonian.h"

#include <utility>
namespace mindspore {

mindspore/ccsrc/mindquantum/hamiltonian.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/hamiltonian.h View File

@@ -17,9 +17,9 @@
#ifndef MINDQUANTUM_ENGINE_CHAMILTONIAN_H_
#define MINDQUANTUM_ENGINE_CHAMILTONIAN_H_
#include "projectq/backends/_sim/_cppkernels/simulator.hpp"
#include "mindquantum/gates/basic_gates.h"
#include "mindquantum/sparse.h"
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/sparse.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/parameter_resolver.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "mindquantum/parameter_resolver.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/parameter_resolver.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.h View File

@@ -19,7 +19,7 @@
#include <map>
#include <string>
#include <set>
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/pqc_simulator.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/pqc_simulator.cc View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mindquantum/pqc_simulator.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/pqc_simulator.h"

#include <omp.h>
#include <numeric>

mindspore/ccsrc/mindquantum/pqc_simulator.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/pqc_simulator.h View File

@@ -22,12 +22,12 @@
#include <memory>
#include "projectq/backends/_sim/_cppkernels/simulator.hpp"
#include "utils/log_adapter.h"
#include "mindquantum/gates/basic_gates.h"
#include "mindquantum/parameter_resolver.h"
#include "mindquantum/circuit.h"
#include "mindquantum/hamiltonian.h"
#include "mindquantum/utils.h"
#include "mindquantum/transformer.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/basic_gates.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/hamiltonian.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/sparse.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/sparse.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "mindquantum/sparse.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/sparse.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/sparse.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/sparse.h View File

@@ -24,7 +24,7 @@
#include <utility>
#include <iostream>
#include <vector>
#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/transformer.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.cc View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "mindquantum/transformer.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.h"

#include <algorithm>
#include <utility>

mindspore/ccsrc/mindquantum/transformer.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/transformer.h View File

@@ -18,11 +18,11 @@
#define MINDQUANTUM_ENGINE_TRANSFORMER_H_
#include <vector>
#include <string>
#include "mindquantum/gates/gates.h"
#include "mindquantum/circuit.h"
#include "mindquantum/utils.h"
#include "mindquantum/parameter_resolver.h"
#include "mindquantum/hamiltonian.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/gates/gates.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/circuit.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/parameter_resolver.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/hamiltonian.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/utils.cc → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.cc View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "mindquantum/utils.h"
#include "backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h"

namespace mindspore {
namespace mindquantum {

mindspore/ccsrc/mindquantum/utils.h → mindspore/ccsrc/backend/kernel_compiler/cpu/quantum/quantum_simulator/utils.h View File


Loading…
Cancel
Save