| 11 | #include <gtest/gtest.h> |
| 12 | |
| 13 | TEST(OperatorExpressions, checkSpinOpsUnary) { |
| 14 | auto op = cudaq::spin_op::x(0); |
| 15 | utils::checkEqual((+op).to_matrix(), utils::PauliX_matrix()); |
| 16 | utils::checkEqual((-op).to_matrix(), -1.0 * utils::PauliX_matrix()); |
| 17 | utils::checkEqual(op.to_matrix(), utils::PauliX_matrix()); |
| 18 | } |
| 19 | |
| 20 | TEST(OperatorExpressions, checkSpinOpsConstruction) { |
| 21 | auto prod = cudaq::spin_op::identity(); |
nothing calls this directly
no test coverage detected