Skip to content

Commit

Permalink
🐛 failed to deduct type ZYZ<float_type>
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLau0220 committed Mar 16, 2024
1 parent e8dca25 commit 531d773
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tensor/decomposer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,9 +445,9 @@ bool Decomposer::_decompose_cnx(const std::vector<size_t>& ctrls, const size_t e
template <typename U>
bool Decomposer::_decompose_cu(Tensor<U> const& t, size_t ctrl, size_t targ) {
using dvlab::Phase;
using float_type = typename U::value_type;
constexpr float_type eps = 1e-6;
auto const angles = _decompose_zyz<float_type>(t);
using float_type = typename U::value_type;
constexpr float_type eps = 1e-6;
ZYZ<float_type> const angles = _decompose_zyz(t);
if (!angles.correct) return false;

if (std::abs((angles.alpha - angles.gamma) / 2) > eps) {
Expand Down

0 comments on commit 531d773

Please sign in to comment.