From e0b4975b846ac6b685d112f0c6081365b2a1f6b9 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Mon, 13 Jun 2022 21:42:15 -0400 Subject: [PATCH 01/22] Add IsingXY --- pennylane_lightning/src/gates/Constant.hpp | 4 + .../src/gates/GateOperation.hpp | 1 + .../src/gates/OpToMemberFuncPtr.hpp | 6 + .../cpu_kernels/GateImplementationsLM.hpp | 44 +++++ .../cpu_kernels/GateImplementationsPI.hpp | 30 ++++ .../src/simulator/KernelMap.cpp | 3 + .../tests/Test_GateImplementations_Param.cpp | 155 ++++++++++++++++++ .../src/tests/Test_OpToMemberFuncPtr.cpp | 1 + tests/test_apply.py | 7 + tests/test_gates.py | 1 + 10 files changed, 252 insertions(+) diff --git a/pennylane_lightning/src/gates/Constant.hpp b/pennylane_lightning/src/gates/Constant.hpp index 33d72caa39..d9b26d8052 100644 --- a/pennylane_lightning/src/gates/Constant.hpp +++ b/pennylane_lightning/src/gates/Constant.hpp @@ -63,6 +63,8 @@ namespace Pennylane::Gates::Constant { std::pair{GateOperation::CZ, "CZ"}, std::pair{GateOperation::IsingXX, "IsingXX"}, + std::pair{GateOperation::IsingXY, + "IsingXY"}, std::pair{GateOperation::IsingYY, "IsingYY"}, std::pair{GateOperation::IsingZZ, @@ -173,6 +175,7 @@ namespace Pennylane::Gates::Constant { std::pair{GateOperation::CZ, 2}, std::pair{GateOperation::SWAP, 2}, std::pair{GateOperation::IsingXX, 2}, + std::pair{GateOperation::IsingXY, 2}, std::pair{GateOperation::IsingYY, 2}, std::pair{GateOperation::IsingZZ, 2}, std::pair{GateOperation::ControlledPhaseShift, 2}, @@ -242,6 +245,7 @@ namespace Pennylane::Gates::Constant { std::pair{GateOperation::CZ, 0}, std::pair{GateOperation::SWAP, 0}, std::pair{GateOperation::IsingXX, 1}, + std::pair{GateOperation::IsingXY, 1}, std::pair{GateOperation::IsingYY, 1}, std::pair{GateOperation::IsingZZ, 1}, std::pair{GateOperation::ControlledPhaseShift, 1}, diff --git a/pennylane_lightning/src/gates/GateOperation.hpp b/pennylane_lightning/src/gates/GateOperation.hpp index 9a6d26a9fd..25ecf41657 100644 --- a/pennylane_lightning/src/gates/GateOperation.hpp +++ b/pennylane_lightning/src/gates/GateOperation.hpp @@ -45,6 +45,7 @@ enum class GateOperation : uint32_t { CZ, SWAP, IsingXX, + IsingXY, IsingYY, IsingZZ, ControlledPhaseShift, diff --git a/pennylane_lightning/src/gates/OpToMemberFuncPtr.hpp b/pennylane_lightning/src/gates/OpToMemberFuncPtr.hpp index 9758918155..e385dcc588 100644 --- a/pennylane_lightning/src/gates/OpToMemberFuncPtr.hpp +++ b/pennylane_lightning/src/gates/OpToMemberFuncPtr.hpp @@ -145,6 +145,12 @@ struct GateOpToMemberFuncPtr; }; template +struct GateOpToMemberFuncPtr { + constexpr static auto value = + &GateImplementation::template applyIsingXY; +}; +template struct GateOpToMemberFuncPtr { constexpr static auto value = diff --git a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp index aaa53445f9..ce607ae7e9 100644 --- a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp +++ b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp @@ -98,6 +98,7 @@ class GateImplementationsLM : public PauliGenerator { GateOperation::CRZ, GateOperation::CRot, GateOperation::IsingXX, + GateOperation::IsingXY, GateOperation::IsingYY, GateOperation::IsingZZ, GateOperation::SingleExcitation, @@ -762,6 +763,49 @@ class GateImplementationsLM : public PauliGenerator { } } + template + static void + applyIsingXY(std::complex *arr, const size_t num_qubits, + const std::vector &wires, bool inverse, ParamT angle) { + using ComplexPrecisionT = std::complex; + using std::imag; + using std::real; + PL_ASSERT(wires.size() == 2); + + const size_t rev_wire0 = num_qubits - wires[1] - 1; + const size_t rev_wire1 = num_qubits - wires[0] - 1; // Control qubit + + const size_t rev_wire0_shift = static_cast(1U) << rev_wire0; + const size_t rev_wire1_shift = static_cast(1U) << rev_wire1; + + const auto [parity_high, parity_middle, parity_low] = + revWireParity(rev_wire0, rev_wire1); + + const PrecisionT cr = std::cos(angle / 2); + const PrecisionT sj = + inverse ? -std::sin(angle / 2) : std::sin(angle / 2); + + for (size_t k = 0; k < Util::exp2(num_qubits - 2); k++) { + const size_t i00 = ((k << 2U) & parity_high) | + ((k << 1U) & parity_middle) | (k & parity_low); + const size_t i10 = i00 | rev_wire1_shift; + const size_t i01 = i00 | rev_wire0_shift; + const size_t i11 = i00 | rev_wire0_shift | rev_wire1_shift; + + const ComplexPrecisionT v00 = arr[i00]; + const ComplexPrecisionT v01 = arr[i01]; + const ComplexPrecisionT v10 = arr[i10]; + const ComplexPrecisionT v11 = arr[i11]; + + arr[i00] = ComplexPrecisionT{real(v00), imag(v00)}; + arr[i01] = ComplexPrecisionT{cr * real(v01) - sj * imag(v10), + cr * imag(v01) + sj * real(v10)}; + arr[i10] = ComplexPrecisionT{cr * real(v10) - sj * imag(v01), + cr * imag(v10) + sj * real(v01)}; + arr[i11] = ComplexPrecisionT{real(v11), imag(v11)}; + } + } + template static void applyIsingYY(std::complex *arr, size_t num_qubits, const std::vector &wires, bool inverse, diff --git a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp index 2bfbc898d0..84781b1e2e 100644 --- a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp +++ b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp @@ -74,6 +74,7 @@ class GateImplementationsPI : public PauliGenerator { GateOperation::CZ, GateOperation::SWAP, GateOperation::IsingXX, + GateOperation::IsingXY, GateOperation::IsingYY, GateOperation::IsingZZ, GateOperation::CRX, @@ -599,6 +600,35 @@ class GateImplementationsPI : public PauliGenerator { cr * real(v3) + sj * imag(v0), cr * imag(v3) - sj * real(v0)}; } } + + template + static void applyIsingXY(std::complex *arr, size_t num_qubits, + const std::vector &wires, bool inverse, + ParamT angle) { + using ComplexPrecisionT = std::complex; + PL_ASSERT(wires.size() == 2); + const auto [indices, externalIndices] = GateIndices(wires, num_qubits); + + const PrecisionT cr = std::cos(angle / 2); + const PrecisionT sj = + inverse ? -std::sin(angle / 2) : std::sin(angle / 2); + + for (const size_t &externalIndex : externalIndices) { + std::complex *shiftedState = arr + externalIndex; + + const auto v0 = shiftedState[indices[0]]; + const auto v1 = shiftedState[indices[1]]; + const auto v2 = shiftedState[indices[2]]; + const auto v3 = shiftedState[indices[3]]; + + shiftedState[indices[0]] = ComplexPrecisionT{ real(v0), imag(v0)}; + shiftedState[indices[1]] = ComplexPrecisionT{ + cr * real(v1) - sj * imag(v2), cr * imag(v1) + sj * real(v2)}; + shiftedState[indices[2]] = ComplexPrecisionT{ + cr * real(v2) - sj * imag(v1), cr * imag(v2) + sj * real(v1)}; + shiftedState[indices[3]] = ComplexPrecisionT{real(v3), imag(v3)}; + } + } template static void applyIsingYY(std::complex *arr, size_t num_qubits, diff --git a/pennylane_lightning/src/simulator/KernelMap.cpp b/pennylane_lightning/src/simulator/KernelMap.cpp index 3ea6b6e9bd..e1179874a7 100644 --- a/pennylane_lightning/src/simulator/KernelMap.cpp +++ b/pennylane_lightning/src/simulator/KernelMap.cpp @@ -92,6 +92,9 @@ int assignDefaultKernelsForGateOp() { instance.assignKernelForOp(GateOperation::IsingXX, all_threading, all_memory_model, all_qubit_numbers, Gates::KernelType::LM); + instance.assignKernelForOp(GateOperation::IsingXY, all_threading, + all_memory_model, all_qubit_numbers, + Gates::KernelType::LM); instance.assignKernelForOp(GateOperation::IsingYY, all_threading, all_memory_model, all_qubit_numbers, Gates::KernelType::LM); diff --git a/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp b/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp index 8ecc347485..9d9026d7ca 100644 --- a/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp +++ b/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp @@ -411,6 +411,161 @@ void testApplyIsingXX() { } PENNYLANE_RUN_TEST(IsingXX); +template +void testApplyIsingXY() { + using ComplexPrecisionT = std::complex; + using std::cos; + using std::sin; + + DYNAMIC_SECTION(GateImplementation::name + << ", IsingXY0,1 |000> -> a|000> - " + << PrecisionToName::value) { + const size_t num_qubits = 3; + const auto ini_st = createZeroState(num_qubits); + ParamT angle = 0.312; + + const std::vector expected_results{ + ComplexPrecisionT{1.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + }; + + auto st = ini_st; + GateImplementation::applyIsingXY(st.data(), num_qubits, {0, 1}, false, + angle); + REQUIRE(st == approx(expected_results).margin(1e-7)); + } + DYNAMIC_SECTION(GateImplementation::name + << ", IsingXY0,1 |100> -> a|100> + b|010> - " + << PrecisionToName::value) { + const size_t num_qubits = 3; + const auto ini_st = createProductState("100"); + ParamT angle = 0.312; + + const std::vector expected_results{ + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, sin(angle / 2)}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{cos(angle / 2), 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + }; + + auto st = ini_st; + GateImplementation::applyIsingXY(st.data(), num_qubits, {0, 1}, false, + angle); + REQUIRE(st == approx(expected_results).margin(1e-7)); + } + + DYNAMIC_SECTION(GateImplementation::name + << ", IsingXY0,1 |010> -> a|010> + b|100> - " + << PrecisionToName::value) { + const size_t num_qubits = 3; + const auto ini_st = createProductState("010"); + ParamT angle = 0.312; + + const std::vector expected_results{ + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{cos(angle / 2), 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, sin(angle / 2)}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + }; + + auto st = ini_st; + GateImplementation::applyIsingXY(st.data(), num_qubits, {0, 1}, false, + angle); + REQUIRE(st == approx(expected_results).margin(1e-7)); + } + + DYNAMIC_SECTION(GateImplementation::name + << ", IsingXY0,1 |110> -> a|110> - " + << PrecisionToName::value) { + const size_t num_qubits = 3; + const auto ini_st = createProductState("110"); + ParamT angle = 0.312; + + const std::vector expected_results{ + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{1.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, + }; + + auto st = ini_st; + GateImplementation::applyIsingXY(st.data(), num_qubits, {0, 1}, false, + angle); + REQUIRE(st == approx(expected_results).margin(1e-7)); + } + + DYNAMIC_SECTION(GateImplementation::name + << ", IsingXY0,1 - " + << PrecisionToName::value) { + const size_t num_qubits = 4; + + std::vector ini_st{ + ComplexPrecisionT{0.267462841882, 0.010768564798}, + ComplexPrecisionT{0.228575129706, 0.010564590956}, + ComplexPrecisionT{0.099492749900, 0.260849823392}, + ComplexPrecisionT{0.093690204310, 0.189847108173}, + ComplexPrecisionT{0.033390732374, 0.203836830144}, + ComplexPrecisionT{0.226979395737, 0.081852150975}, + ComplexPrecisionT{0.031235505729, 0.176933497281}, + ComplexPrecisionT{0.294287602843, 0.145156781198}, + ComplexPrecisionT{0.152742706049, 0.111628061129}, + ComplexPrecisionT{0.012553863703, 0.120027860480}, + ComplexPrecisionT{0.237156555364, 0.154658769755}, + ComplexPrecisionT{0.117001120872, 0.228059505033}, + ComplexPrecisionT{0.041495873225, 0.065934827444}, + ComplexPrecisionT{0.089653239407, 0.221581340372}, + ComplexPrecisionT{0.217892322429, 0.291261296999}, + ComplexPrecisionT{0.292993251871, 0.186570798697}, + }; + + const std::vector wires = {0, 1}; + const ParamT angle = 0.312; + + std::vector expected{ + ComplexPrecisionT{0.267462849617, 0.010768564418}, + ComplexPrecisionT{0.228575125337, 0.010564590804}, + ComplexPrecisionT{0.099492751062, 0.260849833488}, + ComplexPrecisionT{0.093690201640, 0.189847111702}, + ComplexPrecisionT{0.015641822883, 0.225092900621}, + ComplexPrecisionT{0.205574608177, 0.082808663337}, + ComplexPrecisionT{0.006827173322, 0.211631480575}, + ComplexPrecisionT{0.255280800811, 0.161572331669}, + ComplexPrecisionT{0.119218164572, 0.115460377284}, + ComplexPrecisionT{-0.000315789761, 0.153835664378}, + ComplexPrecisionT{0.206786872079, 0.157633689097}, + ComplexPrecisionT{0.093027614553, 0.271012980118}, + ComplexPrecisionT{0.041495874524, 0.065934829414}, + ComplexPrecisionT{0.089653238654, 0.221581339836}, + ComplexPrecisionT{0.217892318964, 0.291261285543}, + ComplexPrecisionT{0.292993247509, 0.186570793390}, + }; + + auto st = ini_st; + GateImplementation::applyIsingXY(st.data(), num_qubits, wires, false, + angle); + REQUIRE(st == approx(expected).margin(1e-5)); + } +} +PENNYLANE_RUN_TEST(IsingXY); + template void testApplyIsingYY() { using ComplexPrecisionT = std::complex; diff --git a/pennylane_lightning/src/tests/Test_OpToMemberFuncPtr.cpp b/pennylane_lightning/src/tests/Test_OpToMemberFuncPtr.cpp index bddf1525bc..0e1211f8e2 100644 --- a/pennylane_lightning/src/tests/Test_OpToMemberFuncPtr.cpp +++ b/pennylane_lightning/src/tests/Test_OpToMemberFuncPtr.cpp @@ -124,6 +124,7 @@ class DummyImplementation { PENNYLANE_TESTS_DEFINE_GATE_OP(SWAP, 0) PENNYLANE_TESTS_DEFINE_GATE_OP(ControlledPhaseShift, 1) PENNYLANE_TESTS_DEFINE_GATE_OP(IsingXX, 1) + PENNYLANE_TESTS_DEFINE_GATE_OP(IsingXY, 1) PENNYLANE_TESTS_DEFINE_GATE_OP(IsingYY, 1) PENNYLANE_TESTS_DEFINE_GATE_OP(IsingZZ, 1) PENNYLANE_TESTS_DEFINE_GATE_OP(CRX, 1) diff --git a/tests/test_apply.py b/tests/test_apply.py index 063c19b2df..e4f075348d 100644 --- a/tests/test_apply.py +++ b/tests/test_apply.py @@ -360,6 +360,13 @@ def test_apply_operation_preserve_pointer_single_wire_with_parameters( [-0.5j, 0.5, -0.5j, 0.5], [math.pi / 2], ), + (qml.IsingXY, [1, 0, 0, 0], [1, 0, 0, 0], [math.pi / 2]), + ( + qml.IsingXY, + [0, 1 / math.sqrt(2), 0, 1 / math.sqrt(2)], + [0, 0.5, 0.5j, 1 / math.sqrt(2)], + [math.pi / 2], + ), (qml.IsingYY, [1, 0, 0, 0], [1 / math.sqrt(2), 0, 0, 1j / math.sqrt(2)], [math.pi / 2]), ( qml.IsingYY, diff --git a/tests/test_gates.py b/tests/test_gates.py index 528cb77418..7623cfb093 100644 --- a/tests/test_gates.py +++ b/tests/test_gates.py @@ -42,6 +42,7 @@ def op(op_name): "CSWAP": qml.CSWAP(wires=[0, 1, 2]), "PauliRot": qml.PauliRot(0.123, "Y", wires=0), "IsingXX": qml.IsingXX(0.123, wires=[0, 1]), + "IsingXY": qml.IsingXY(0.123, wires=[0, 1]), "IsingYY": qml.IsingYY(0.123, wires=[0, 1]), "IsingZZ": qml.IsingZZ(0.123, wires=[0, 1]), "Identity": qml.Identity(wires=0), From c0dfaf7ee12aec37482b47dcc3ee1e04164cd6e2 Mon Sep 17 00:00:00 2001 From: Dev version update bot Date: Tue, 14 Jun 2022 13:45:14 +0000 Subject: [PATCH 02/22] Auto update version --- pennylane_lightning/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/_version.py b/pennylane_lightning/_version.py index a630c753a5..ed26d5505b 100644 --- a/pennylane_lightning/_version.py +++ b/pennylane_lightning/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.24.0-dev14" +__version__ = "0.24.0-dev15" From 9913ca25831fa9569da52490f0faa9b2dc91a914 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 10:04:38 -0400 Subject: [PATCH 03/22] Trigger CI --- .DS_Store | Bin 0 -> 6148 bytes pennylane_lightning/.DS_Store | Bin 0 -> 6148 bytes pennylane_lightning/src/.DS_Store | Bin 0 -> 6148 bytes pennylane_lightning/src/gates/.DS_Store | Bin 0 -> 6148 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 .DS_Store create mode 100644 pennylane_lightning/.DS_Store create mode 100644 pennylane_lightning/src/.DS_Store create mode 100644 pennylane_lightning/src/gates/.DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ee8f111388e3c4c6e04d27c94ff1927a6fbab390 GIT binary patch literal 6148 zcmeHKOG*P#5UkcL0&W6sT)r!KgCWEd^!|1GJPwazpSK-9PFX1+1*Cu!kOETR7X`fc(w1k5ic&xdNP#Z}{QJ=8 zj$PrD7@rP?7y*b2ro*_7S%TO+LF@{rL}qA~RAN%CMhr_j^R4Q-!YMK7uo^zBZnm0G zENX}$7g3aT&DVV16;6pkXFlje{TXmwWK!U-75D^v7#Uyy literal 0 HcmV?d00001 diff --git a/pennylane_lightning/.DS_Store b/pennylane_lightning/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5172429f264de2441865cb4700216d4256da9242 GIT binary patch literal 6148 zcmeH~J!%6%427R!7lt%jx}3%b$PET#pTHLgIFQEJ;E>dF^gR7ES*H$5cmnB-G%I%Z zD|S`@Z2$T80!#olbXV*=%*>dt@PRwdU#I)^a=X5>;#J@&VrHyNnC;iLL0pQvfVyTmjO&;ssLc!1UOG})p;=82 zR;?Ceh}WZ?+UmMqI#RP8R>OzYoz15hnq@nzF`-!xQ4j$Um=RcIKKc27r2jVm&svm< zfC&6E0=7P!4tu^-ovjbA=k?dB`g+i*aXG_}p8zI)6mRKa+;6_1_R^8c3Qa!(fk8n8 H{*=HsM+*^= literal 0 HcmV?d00001 diff --git a/pennylane_lightning/src/.DS_Store b/pennylane_lightning/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..685725993711057c0ef5336c0422a4c5af26ba9a GIT binary patch literal 6148 zcmeH~J&pn~427RrkdU^a+%gRZ;06(5PrwD(1w?~H!ET?U^X#}`phhF~EIBWB;`#ZC z$rymG{|_r*0bovd#nOj?8RHpF_`x5JxE`+i^Y7(y_B1BB*8@7Qalf9+5)lvq5fA|p z5P=a9h(ny`|L2IFNsl4|A}|gD{(UHP*P7b8#;1crv;fp8(_x%PFF`Gypw`sZl^L34 z_h4CS(S~?F%Bdyy)zsFtm&3C8u)MQ*7eljN4l4|3Rzoz1fCvl-eDrwX=l?hTS^qyM zQ78f;@MZ*Ty4h~le5pKJA70P%yUhB$(W$YW!`)8+13!wt=wVzhKB3ms)|DBWegp!8 J1`&8Efg3@t6O8}> literal 0 HcmV?d00001 diff --git a/pennylane_lightning/src/gates/.DS_Store b/pennylane_lightning/src/gates/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..e6f8c948f6ca6a44da2531f95210955090e70abf GIT binary patch literal 6148 zcmeHKyG{c^3>-s>NNG}1?l15Mt0;T{ACQQIiW5OZ>969u_%z0k=5)}7CK^lj?0P+W zx+%_Q0JgatAAvQ1CEXEU9_Hrf?lZfqj1lR);|;I)#5?0KtNuOV+!YS^zy-Sr|9m_j zhL_W6@DiC6kOERb3P=Gda3uw*u`X9vx=+_g0V!}h3i$V-(H(o?m>8c9h8O{e3#P-k zj#+}(JVES*VLuSI;@5dt0!AcC>BrW{VmF2JyB5#NP(#W z_qknr|9_(YG5=3V+DQQ^a8nA{V*9+^@Rh2!&R))YZKLn$Uh_?N<2on|(T<7Hj=Ax6 e{18Q1*L=^)ukQ$fUr3EARuR4HgIh literal 0 HcmV?d00001 From edf3662f45fb3e214c8fe667fd2dfb42435c8583 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 11:00:48 -0400 Subject: [PATCH 04/22] Trigger CI From b7f513f282620484e502f7c7142972ec407ddaf7 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 11:12:50 -0400 Subject: [PATCH 05/22] Trigger CI From 819fee181fd5b5a501e4a686e7b7cfeee25fcb2f Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 11:19:18 -0400 Subject: [PATCH 06/22] Trigger CI From a2a70d82d0eee0479fe2b2788c04a3247cccdfec Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 11:22:48 -0400 Subject: [PATCH 07/22] Trigger CI From d9d3a69d68d3daa415ed288bb32b7489a87efead Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 11:30:13 -0400 Subject: [PATCH 08/22] Trigger CI From 96b847723c5e0597a9ec911be72544f121820c06 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 11:31:08 -0400 Subject: [PATCH 09/22] Trigger CI From c318004c97760ecb79f2121c14743cff33b77e13 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 12:15:22 -0400 Subject: [PATCH 10/22] Trigger CI From 7ca37a0a256ad67c100480a1c6b3c62806d4bee3 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 12:23:56 -0400 Subject: [PATCH 11/22] make format --- .../cpu_kernels/GateImplementationsLM.hpp | 6 ++--- .../cpu_kernels/GateImplementationsPI.hpp | 6 ++--- .../tests/Test_GateImplementations_Param.cpp | 26 +++++++------------ 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp index ce607ae7e9..4e88a72214 100644 --- a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp +++ b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp @@ -764,7 +764,7 @@ class GateImplementationsLM : public PauliGenerator { } template - static void + static void applyIsingXY(std::complex *arr, const size_t num_qubits, const std::vector &wires, bool inverse, ParamT angle) { using ComplexPrecisionT = std::complex; @@ -796,14 +796,14 @@ class GateImplementationsLM : public PauliGenerator { const ComplexPrecisionT v01 = arr[i01]; const ComplexPrecisionT v10 = arr[i10]; const ComplexPrecisionT v11 = arr[i11]; - + arr[i00] = ComplexPrecisionT{real(v00), imag(v00)}; arr[i01] = ComplexPrecisionT{cr * real(v01) - sj * imag(v10), cr * imag(v01) + sj * real(v10)}; arr[i10] = ComplexPrecisionT{cr * real(v10) - sj * imag(v01), cr * imag(v10) + sj * real(v01)}; arr[i11] = ComplexPrecisionT{real(v11), imag(v11)}; - } + } } template diff --git a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp index 84781b1e2e..2f75c2bfa5 100644 --- a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp +++ b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp @@ -600,7 +600,7 @@ class GateImplementationsPI : public PauliGenerator { cr * real(v3) + sj * imag(v0), cr * imag(v3) - sj * real(v0)}; } } - + template static void applyIsingXY(std::complex *arr, size_t num_qubits, const std::vector &wires, bool inverse, @@ -620,8 +620,8 @@ class GateImplementationsPI : public PauliGenerator { const auto v1 = shiftedState[indices[1]]; const auto v2 = shiftedState[indices[2]]; const auto v3 = shiftedState[indices[3]]; - - shiftedState[indices[0]] = ComplexPrecisionT{ real(v0), imag(v0)}; + + shiftedState[indices[0]] = ComplexPrecisionT{real(v0), imag(v0)}; shiftedState[indices[1]] = ComplexPrecisionT{ cr * real(v1) - sj * imag(v2), cr * imag(v1) + sj * real(v2)}; shiftedState[indices[2]] = ComplexPrecisionT{ diff --git a/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp b/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp index 9d9026d7ca..aced57bd06 100644 --- a/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp +++ b/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp @@ -425,14 +425,10 @@ void testApplyIsingXY() { ParamT angle = 0.312; const std::vector expected_results{ - ComplexPrecisionT{1.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{1.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, }; auto st = ini_st; @@ -496,14 +492,10 @@ void testApplyIsingXY() { ParamT angle = 0.312; const std::vector expected_results{ - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{1.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{1.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, }; auto st = ini_st; @@ -511,7 +503,7 @@ void testApplyIsingXY() { angle); REQUIRE(st == approx(expected_results).margin(1e-7)); } - + DYNAMIC_SECTION(GateImplementation::name << ", IsingXY0,1 - " << PrecisionToName::value) { From c0e034df61cf4a3819812c9ac98bd0ef50fdf861 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 12:23:56 -0400 Subject: [PATCH 12/22] make format --- .../cpu_kernels/GateImplementationsLM.hpp | 6 ++--- .../cpu_kernels/GateImplementationsPI.hpp | 6 ++--- .../tests/Test_GateImplementations_Param.cpp | 26 +++++++------------ 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp index ce607ae7e9..4e88a72214 100644 --- a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp +++ b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsLM.hpp @@ -764,7 +764,7 @@ class GateImplementationsLM : public PauliGenerator { } template - static void + static void applyIsingXY(std::complex *arr, const size_t num_qubits, const std::vector &wires, bool inverse, ParamT angle) { using ComplexPrecisionT = std::complex; @@ -796,14 +796,14 @@ class GateImplementationsLM : public PauliGenerator { const ComplexPrecisionT v01 = arr[i01]; const ComplexPrecisionT v10 = arr[i10]; const ComplexPrecisionT v11 = arr[i11]; - + arr[i00] = ComplexPrecisionT{real(v00), imag(v00)}; arr[i01] = ComplexPrecisionT{cr * real(v01) - sj * imag(v10), cr * imag(v01) + sj * real(v10)}; arr[i10] = ComplexPrecisionT{cr * real(v10) - sj * imag(v01), cr * imag(v10) + sj * real(v01)}; arr[i11] = ComplexPrecisionT{real(v11), imag(v11)}; - } + } } template diff --git a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp index 84781b1e2e..2f75c2bfa5 100644 --- a/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp +++ b/pennylane_lightning/src/gates/cpu_kernels/GateImplementationsPI.hpp @@ -600,7 +600,7 @@ class GateImplementationsPI : public PauliGenerator { cr * real(v3) + sj * imag(v0), cr * imag(v3) - sj * real(v0)}; } } - + template static void applyIsingXY(std::complex *arr, size_t num_qubits, const std::vector &wires, bool inverse, @@ -620,8 +620,8 @@ class GateImplementationsPI : public PauliGenerator { const auto v1 = shiftedState[indices[1]]; const auto v2 = shiftedState[indices[2]]; const auto v3 = shiftedState[indices[3]]; - - shiftedState[indices[0]] = ComplexPrecisionT{ real(v0), imag(v0)}; + + shiftedState[indices[0]] = ComplexPrecisionT{real(v0), imag(v0)}; shiftedState[indices[1]] = ComplexPrecisionT{ cr * real(v1) - sj * imag(v2), cr * imag(v1) + sj * real(v2)}; shiftedState[indices[2]] = ComplexPrecisionT{ diff --git a/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp b/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp index 9d9026d7ca..aced57bd06 100644 --- a/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp +++ b/pennylane_lightning/src/tests/Test_GateImplementations_Param.cpp @@ -425,14 +425,10 @@ void testApplyIsingXY() { ParamT angle = 0.312; const std::vector expected_results{ - ComplexPrecisionT{1.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{1.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, }; auto st = ini_st; @@ -496,14 +492,10 @@ void testApplyIsingXY() { ParamT angle = 0.312; const std::vector expected_results{ - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, - ComplexPrecisionT{1.0, 0.0}, - ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{0.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, + ComplexPrecisionT{1.0, 0.0}, ComplexPrecisionT{0.0, 0.0}, }; auto st = ini_st; @@ -511,7 +503,7 @@ void testApplyIsingXY() { angle); REQUIRE(st == approx(expected_results).margin(1e-7)); } - + DYNAMIC_SECTION(GateImplementation::name << ", IsingXY0,1 - " << PrecisionToName::value) { From be294fc13e5cb685c7d767993bcaf698fe8b3ba2 Mon Sep 17 00:00:00 2001 From: slshu <31480676+multiphaseCFD@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:21:13 -0400 Subject: [PATCH 13/22] Delete .DS_Store .DS_Store deleted --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index ee8f111388e3c4c6e04d27c94ff1927a6fbab390..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKOG*P#5UkcL0&W6sT)r!KgCWEd^!|1GJPwazpSK-9PFX1+1*Cu!kOETR7X`fc(w1k5ic&xdNP#Z}{QJ=8 zj$PrD7@rP?7y*b2ro*_7S%TO+LF@{rL}qA~RAN%CMhr_j^R4Q-!YMK7uo^zBZnm0G zENX}$7g3aT&DVV16;6pkXFlje{TXmwWK!U-75D^v7#Uyy From 0581e8ca8677a43484d7a1e68e50b52272628a4c Mon Sep 17 00:00:00 2001 From: slshu <31480676+multiphaseCFD@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:21:51 -0400 Subject: [PATCH 14/22] Delete .DS_Store --- pennylane_lightning/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 pennylane_lightning/.DS_Store diff --git a/pennylane_lightning/.DS_Store b/pennylane_lightning/.DS_Store deleted file mode 100644 index 5172429f264de2441865cb4700216d4256da9242..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~J!%6%427R!7lt%jx}3%b$PET#pTHLgIFQEJ;E>dF^gR7ES*H$5cmnB-G%I%Z zD|S`@Z2$T80!#olbXV*=%*>dt@PRwdU#I)^a=X5>;#J@&VrHyNnC;iLL0pQvfVyTmjO&;ssLc!1UOG})p;=82 zR;?Ceh}WZ?+UmMqI#RP8R>OzYoz15hnq@nzF`-!xQ4j$Um=RcIKKc27r2jVm&svm< zfC&6E0=7P!4tu^-ovjbA=k?dB`g+i*aXG_}p8zI)6mRKa+;6_1_R^8c3Qa!(fk8n8 H{*=HsM+*^= From ff42ee6c2244fdf23bac107d065c68eb98862ef3 Mon Sep 17 00:00:00 2001 From: slshu <31480676+multiphaseCFD@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:22:39 -0400 Subject: [PATCH 15/22] Delete .DS_store --- pennylane_lightning/src/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 pennylane_lightning/src/.DS_Store diff --git a/pennylane_lightning/src/.DS_Store b/pennylane_lightning/src/.DS_Store deleted file mode 100644 index 685725993711057c0ef5336c0422a4c5af26ba9a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~J&pn~427RrkdU^a+%gRZ;06(5PrwD(1w?~H!ET?U^X#}`phhF~EIBWB;`#ZC z$rymG{|_r*0bovd#nOj?8RHpF_`x5JxE`+i^Y7(y_B1BB*8@7Qalf9+5)lvq5fA|p z5P=a9h(ny`|L2IFNsl4|A}|gD{(UHP*P7b8#;1crv;fp8(_x%PFF`Gypw`sZl^L34 z_h4CS(S~?F%Bdyy)zsFtm&3C8u)MQ*7eljN4l4|3Rzoz1fCvl-eDrwX=l?hTS^qyM zQ78f;@MZ*Ty4h~le5pKJA70P%yUhB$(W$YW!`)8+13!wt=wVzhKB3ms)|DBWegp!8 J1`&8Efg3@t6O8}> From 54fe7381671d73825d4ae769a6d697ba5f13c811 Mon Sep 17 00:00:00 2001 From: slshu <31480676+multiphaseCFD@users.noreply.github.com> Date: Tue, 14 Jun 2022 15:22:57 -0400 Subject: [PATCH 16/22] Delete .DS_Store --- pennylane_lightning/src/gates/.DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 pennylane_lightning/src/gates/.DS_Store diff --git a/pennylane_lightning/src/gates/.DS_Store b/pennylane_lightning/src/gates/.DS_Store deleted file mode 100644 index e6f8c948f6ca6a44da2531f95210955090e70abf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKyG{c^3>-s>NNG}1?l15Mt0;T{ACQQIiW5OZ>969u_%z0k=5)}7CK^lj?0P+W zx+%_Q0JgatAAvQ1CEXEU9_Hrf?lZfqj1lR);|;I)#5?0KtNuOV+!YS^zy-Sr|9m_j zhL_W6@DiC6kOERb3P=Gda3uw*u`X9vx=+_g0V!}h3i$V-(H(o?m>8c9h8O{e3#P-k zj#+}(JVES*VLuSI;@5dt0!AcC>BrW{VmF2JyB5#NP(#W z_qknr|9_(YG5=3V+DQQ^a8nA{V*9+^@Rh2!&R))YZKLn$Uh_?N<2on|(T<7Hj=Ax6 e{18Q1*L=^)ukQ$fUr3EARuR4HgIh From 8d9f7094e77e06a48e999bf0b990e7b562f7c5a3 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Tue, 14 Jun 2022 15:35:23 -0400 Subject: [PATCH 17/22] Trigger CI From 13aac5bee5420645f783840bb7faa4b778a10023 Mon Sep 17 00:00:00 2001 From: Shuli Shu <08cnbj@gmail.com> Date: Wed, 15 Jun 2022 14:31:14 -0400 Subject: [PATCH 18/22] fix MacOS ARM64 wheels --- .github/workflows/wheel_macos_arm64.yml | 2 ++ .gitignore | 2 +- setup.py | 7 ++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheel_macos_arm64.yml b/.github/workflows/wheel_macos_arm64.yml index d380d21b29..8a7b0faccf 100644 --- a/.github/workflows/wheel_macos_arm64.yml +++ b/.github/workflows/wheel_macos_arm64.yml @@ -10,6 +10,8 @@ on: env: CIBW_BUILD: 'cp37-* cp38-* cp39-* cp310-*' + ARCHS: 'arm64' + # MacOS specific build settings CIBW_BEFORE_ALL_MACOS: | brew uninstall --force oclint diff --git a/.gitignore b/.gitignore index 0423bef437..25594ca7ee 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ doc/code/ *.so cpptests *.o - +.DS_Store .cache/* .vscode/* .ycm_extra_conf.py diff --git a/setup.py b/setup.py index c4c9d685f8..d2d12e4be6 100644 --- a/setup.py +++ b/setup.py @@ -77,11 +77,16 @@ def build_extension(self, ext: CMakeExtension): # Add more platform dependent options if platform.system() == "Darwin": + #To support ARM64 + if os.getenv('ARCHS') == "arm64": + configure_args += ["-DCMAKE_CXX_FLAGS='-target arm64-apple-macos11'"] + else: + configure_args += [] # Disable OpenMP in M1 Macs if os.environ.get("USE_OMP"): configure_args += [] else: - configure_args += ["-DENABLE_OPENMP=OFF"] + configure_args += ["-DENABLE_OPENMP=OFF"] elif platform.system() == "Linux": if platform.machine() == "x86_64": configure_args += ["-DENABLE_AVX=ON"] # Enable AVX if x64 on Linux From 63a14725ce86e8898bedb560f18739e56cb63b3e Mon Sep 17 00:00:00 2001 From: Dev version update bot Date: Wed, 15 Jun 2022 18:43:57 +0000 Subject: [PATCH 19/22] Auto update version --- pennylane_lightning/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pennylane_lightning/_version.py b/pennylane_lightning/_version.py index ed26d5505b..39fff18c09 100644 --- a/pennylane_lightning/_version.py +++ b/pennylane_lightning/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.24.0-dev15" +__version__ = "0.24.0-dev16" From ab06ad6f06c95c5010d1de118d7d9b979a2ee124 Mon Sep 17 00:00:00 2001 From: slshu <31480676+multiphaseCFD@users.noreply.github.com> Date: Wed, 15 Jun 2022 15:46:23 -0400 Subject: [PATCH 20/22] comment line 66 of wheel_macros_arm64.yml --- .github/workflows/wheel_macos_arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel_macos_arm64.yml b/.github/workflows/wheel_macos_arm64.yml index 8a7b0faccf..2273013653 100644 --- a/.github/workflows/wheel_macos_arm64.yml +++ b/.github/workflows/wheel_macos_arm64.yml @@ -63,7 +63,7 @@ jobs: CIBW_ARCHS_MACOS: ${{ matrix.arch }} - uses: actions/upload-artifact@v2 - if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }} + #if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }} with: name: ${{ runner.os }}-wheels-${{ matrix.arch }}.zip path: ./wheelhouse/*.whl From cb5a2e541f70a4e6cf4edf94b96ccb538f12d212 Mon Sep 17 00:00:00 2001 From: slshu <31480676+multiphaseCFD@users.noreply.github.com> Date: Thu, 16 Jun 2022 10:16:57 -0400 Subject: [PATCH 21/22] uncomment line 66 --- .github/workflows/wheel_macos_arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheel_macos_arm64.yml b/.github/workflows/wheel_macos_arm64.yml index 2273013653..8a7b0faccf 100644 --- a/.github/workflows/wheel_macos_arm64.yml +++ b/.github/workflows/wheel_macos_arm64.yml @@ -63,7 +63,7 @@ jobs: CIBW_ARCHS_MACOS: ${{ matrix.arch }} - uses: actions/upload-artifact@v2 - #if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }} + if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }} with: name: ${{ runner.os }}-wheels-${{ matrix.arch }}.zip path: ./wheelhouse/*.whl From 9fcafb2eb8cd0096fbdcbdd8812f42931d4245ae Mon Sep 17 00:00:00 2001 From: slshu <31480676+multiphaseCFD@users.noreply.github.com> Date: Thu, 16 Jun 2022 10:18:37 -0400 Subject: [PATCH 22/22] Remove space at the end of line 89 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d2d12e4be6..d62e652152 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ def build_extension(self, ext: CMakeExtension): if os.environ.get("USE_OMP"): configure_args += [] else: - configure_args += ["-DENABLE_OPENMP=OFF"] + configure_args += ["-DENABLE_OPENMP=OFF"] elif platform.system() == "Linux": if platform.machine() == "x86_64": configure_args += ["-DENABLE_AVX=ON"] # Enable AVX if x64 on Linux