Skip to content

Commit c301a55

Browse files
authored
Merge pull request #180 from OriginQ/develop
Develop
2 parents ce06ec1 + 1787667 commit c301a55

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+7926
-1659
lines changed

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,4 @@ CMakeSettings.json
1919
*.dat
2020
/mingw-build
2121
/CMakeLists.txt.user
22-
Extensions/QAlg/*
23-
Extensions/QCircuitOptimize/*
24-
Extensions/QMapping/*
22+
out/*

CHANGELOG.md

+71-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,77 @@
1010
> - **Removed**: 删除的功能.
1111
> - **Fixed**: Bug修复.
1212
13-
[UNRELEASED](https://github.com/OriginQ/QPanda-2/compare/v2.1.8...HEAD)
13+
[UNRELEASED](https://github.com/OriginQ/QPanda-2/compare/v2.1.10...HEAD)
1414
========================================================================
1515

16-
[v2.1.8](https://github.com/OriginQ/QPanda-2/compare/v2.1.7...v2.1.8) - 2020-8-24
16+
[v2.1.8](https://github.com/OriginQ/QPanda-2/compare/v2.1.9...v2.1.10) - 2021-11-29
17+
=====================================================================================
18+
19+
QPanda
20+
-----------
21+
22+
Added
23+
*********
24+
25+
- 添加LaTeX可视化量子线路方法
26+
27+
Changed
28+
*********
29+
30+
- 去除无用代码
31+
- 修改schmdit编码orcle实现,添加mottonen编码python实现
32+
- 修改qst接口使用方法
33+
34+
pyqpanda
35+
-------------
36+
37+
Added
38+
*********
39+
40+
- 添加LaTeX可视化量子线路方法
41+
42+
Changed
43+
*********
44+
45+
- 去除无用代码
46+
- 修改schmdit编码orcle实现,添加mottonen编码python实现
47+
- 修改qst接口使用方法
48+
49+
50+
[v2.1.8](https://github.com/OriginQ/QPanda-2/compare/v2.1.8...v2.1.9) - 2021-10-12
51+
==================================================================================
52+
53+
QPanda
54+
-----------
55+
56+
Added
57+
*********
58+
59+
60+
61+
Changed
62+
*********
63+
64+
- 线路优化算法
65+
- 字符画接口优化
66+
- 添加测试框架
67+
68+
69+
pyqpanda
70+
-------------
71+
72+
Added
73+
*********
74+
75+
76+
Changed
77+
*********
78+
79+
- 线路优化算法
80+
- 字符画接口优化
81+
- 添加测试框架
82+
83+
[v2.1.8](https://github.com/OriginQ/QPanda-2/compare/v2.1.7...v2.1.8) - 2021-8-24
1784
==================================================================================
1885

1986
QPanda
@@ -47,7 +114,7 @@ Changed
47114
- 添加测试框架
48115

49116

50-
[v2.1.7](https://github.com/OriginQ/QPanda-2/compare/v2.1.5...v2.1.7) - 2020-7-27
117+
[v2.1.7](https://github.com/OriginQ/QPanda-2/compare/v2.1.5...v2.1.7) - 2021-7-27
51118
==================================================================================
52119

53120
QPanda
@@ -86,7 +153,7 @@ Changed
86153
- HHL应用程序优化
87154

88155

89-
[v2.1.6](https://github.com/OriginQ/QPanda-2/compare/v2.1.5...v2.1.6) - 2020-6-17
156+
[v2.1.6](https://github.com/OriginQ/QPanda-2/compare/v2.1.5...v2.1.6) - 2021-6-17
90157
==================================================================================
91158

92159
QPanda

CMakeLists.txt

+23-19
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ project(QPANDA)
33

44
set(QPANDA_MAJOR_VERSION 2)
55
set(QPANDA_MINOR_VERSION 1)
6-
set(QPANDA_PATCH_VERSION 8)
6+
set(QPANDA_PATCH_VERSION 10)
77
set(QPANDA_VERSION "${QPANDA_MAJOR_VERSION}.${QPANDA_MINOR_VERSION}.${QPANDA_PATCH_VERSION}")
88
message(STATUS "QPANDA VERSION = " "[${QPANDA_VERSION}]")
99

@@ -65,6 +65,9 @@ set(LIB_PYQPANDA_PAUL pyQPandaPauliOperator)
6565
set(LIB_PYQPANDA_CHEMIQ pyQPandaChemiQ)
6666

6767
option(USE_EXTENSION "EXTENSION FUNTIONS" OFF)
68+
option(USE_MSVC_RUNTIME_LIBRARY_DLL "MD/MT" OFF)
69+
70+
6871

6972
if(NOT CMAKE_BUILD_TYPE)
7073
message(STATUS ": No build type selected, default is Release")
@@ -77,34 +80,35 @@ if (MSVC)
7780
list(APPEND EXTRA_LDFLAGS
7881
-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
7982
-D_CRT_SECURE_NO_WARNINGS
83+
-DNOMINMAX
8084
/bigobj)
8185

82-
if (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
83-
foreach (flag
84-
CMAKE_C_FLAGS
85-
CMAKE_C_FLAGS_DEBUG
86-
CMAKE_C_FLAGS_RELEASE
87-
CMAKE_C_FLAGS_MINSIZEREL
88-
CMAKE_C_FLAGS_RELWITHDEBINFO
89-
CMAKE_CXX_FLAGS
90-
CMAKE_CXX_FLAGS_DEBUG
91-
CMAKE_CXX_FLAGS_RELEASE
92-
CMAKE_CXX_FLAGS_MINSIZEREL
93-
CMAKE_CXX_FLAGS_RELWITHDEBINFO)
94-
86+
foreach (flag
87+
CMAKE_C_FLAGS
88+
CMAKE_C_FLAGS_DEBUG
89+
CMAKE_C_FLAGS_RELEASE
90+
CMAKE_C_FLAGS_MINSIZEREL
91+
CMAKE_C_FLAGS_RELWITHDEBINFO
92+
CMAKE_CXX_FLAGS
93+
CMAKE_CXX_FLAGS_DEBUG
94+
CMAKE_CXX_FLAGS_RELEASE
95+
CMAKE_CXX_FLAGS_MINSIZEREL
96+
CMAKE_CXX_FLAGS_RELWITHDEBINFO)
97+
98+
if (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
9599
if (${flag} MATCHES "/MDd")
96100
string(REGEX REPLACE "/MDd" "/MTd" ${flag} "${${flag}}")
97101
endif()
98102

99103
if (${flag} MATCHES "/MD")
100104
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
101105
endif()
106+
endif()
102107

103-
if (${flag} MATCHES "/W3")
104-
string(REGEX REPLACE "/W3" "/W0" ${flag} "${${flag}}")
105-
endif()
106-
endforeach()
107-
endif()
108+
if (${flag} MATCHES "/W3")
109+
string(REGEX REPLACE "/W3" "/W0" ${flag} "${${flag}}")
110+
endif()
111+
endforeach()
108112
elseif (MINGW)
109113
list(APPEND EXTRA_LDFLAGS
110114
-w

Core/QuantumCircuit/ClassicalConditionInterface.cpp

+24-11
Original file line numberDiff line numberDiff line change
@@ -73,24 +73,37 @@ ClassicalCondition::ClassicalCondition(CExpr *_Expr)
7373
expr = shared_ptr<CExpr>(_Expr);
7474
}
7575

76-
ClassicalCondition
77-
ClassicalCondition::operator=(ClassicalCondition newcond)
76+
ClassicalCondition&
77+
ClassicalCondition::operator=(const ClassicalCondition& old)
7878
{
79-
return CExprFactory::GetFactoryInstance().
80-
GetCExprByOperation(expr->deepcopy(),
81-
newcond.expr->deepcopy(),
82-
ASSIGN);
79+
if (this == &old)
80+
{
81+
return *this;
82+
}
83+
84+
expr = shared_ptr<CExpr>(old.expr->deepcopy());
85+
//auto &fac = CExprFactory::GetFactoryInstance();
86+
//fac.GetCExprByOperation(expr->deepcopy(),
87+
// old.expr->deepcopy(),
88+
// ASSIGN);
89+
return *this;
8390
}
8491

85-
ClassicalCondition
92+
ClassicalCondition &
8693
ClassicalCondition::operator=(const cbit_size_t value)
8794
{
95+
//auto cbit = expr->getCBit();
96+
//cbit->set_val(value);
97+
8898
auto &fac = CExprFactory::GetFactoryInstance();
8999
auto value_expr = fac.GetCExprByValue(value);
90-
return CExprFactory::GetFactoryInstance().
91-
GetCExprByOperation(expr->deepcopy(),
92-
value_expr->deepcopy(),
93-
ASSIGN);
100+
expr = shared_ptr<CExpr>(value_expr);
101+
/*
102+
CExprFactory::GetFactoryInstance().GetCExprByOperation(expr->deepcopy(),
103+
value_expr->deepcopy(),
104+
ASSIGN);
105+
*/
106+
return *this;
94107
}
95108

96109

Core/QuantumCircuit/QGate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,7 @@ QCircuit QPanda::CU(QStat& matrix, const QVec& control_qubits, const QVec& targe
19261926

19271927
QGate QPanda::QDouble(QStat& matrix, Qubit* qubit1, Qubit* qubit2)
19281928
{
1929-
string name = ":QDoubleGate";
1929+
string name = "QDoubleGate";
19301930
return _gs_pGateNodeFactory->getGateNode(name, { qubit1, qubit2 }, matrix);
19311931
}
19321932

0 commit comments

Comments
 (0)