-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge_gate for control/dense with new cmake #183
Conversation
@@ -267,7 +267,8 @@ FLOAT_DECLARE_CLASS(SqrtYGateImpl) | |||
FLOAT(Fp) | |||
ComplexMatrix<Fp> SqrtYdagGateImpl<Fp>::get_matrix() const { | |||
internal::ComplexMatrix<Fp> mat(2, 2); | |||
mat << 0, StdComplex<Fp>(0, -1), StdComplex<Fp>(0, 1), 0; | |||
mat << StdComplex<Fp>(0.5, -0.5), StdComplex<Fp>(0.5, -0.5), StdComplex<Fp>(-0.5, 0.5), | |||
StdComplex<Fp>(0.5, -0.5); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#182 の時に間違って貼り付けてしまったようです…
@@ -328,7 +329,7 @@ FLOAT(Fp) | |||
ComplexMatrix<Fp> RXGateImpl<Fp>::get_matrix() const { | |||
internal::ComplexMatrix<Fp> mat(2, 2); | |||
mat << std::cos(this->_angle / 2), StdComplex<Fp>(0, -std::sin(this->_angle / 2)), | |||
StdComplex<Fp>(0, std::sin(this->_angle / 2)), std::cos(this->_angle / 2); | |||
StdComplex<Fp>(0, -std::sin(this->_angle / 2)), std::cos(this->_angle / 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#177 で移植ミスがあったようです
static_assert(internal::lazy_false_v<void>, "unknown GateImpl"); | ||
} | ||
template <std::floating_point Fp> | ||
constexpr Fp eps = eps_<Fp>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
他のテストでも精度ごとのepsを使えるようにしました
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#180 を新しいcmake用に移動したものです。