Skip to content

Commit

Permalink
CR: Add a code comment for a helper function
Browse files Browse the repository at this point in the history
Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
  • Loading branch information
1tnguyen committed Feb 3, 2025
1 parent a7e964b commit 80741ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/nvqir/cutensornet/simulator_cutensornet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ void SimulatorTensorNetBase::applyGate(const GateApplicationTask &task) {
}
}

// Helper to check whether a matrix is a scaled unitary matrix, i.e., `k * U`
// where U is a unitary matrix. If so, it also returns the `k` factor.
// Otherwise, return a nullopt.
template <typename T>
std::optional<double> isScaledUnitary(const std::vector<std::complex<T>> &mat,
double eps) {
Expand Down

0 comments on commit 80741ec

Please sign in to comment.