Copilot commented on code in PR #1380:
URL: https://github.com/apache/mahout/pull/1380#discussion_r3366508945


##########
qdp/qdp-kernels/src/phase.cu:
##########
@@ -53,13 +53,15 @@ __global__ void phase_encode_kernel(
 
     // φ(idx) = Σ_k phases[k] * b_k,  b_k = (idx >> k) & 1
     double phi = 0.0;
+    double norm = 1.0 ;

Review Comment:
   There is an extra space before the semicolon in the new `norm` 
initialization, which is inconsistent with the surrounding formatting and may 
trip whitespace/format checks.



##########
qdp/qdp-kernels/src/phase.cu:
##########
@@ -53,13 +53,15 @@ __global__ void phase_encode_kernel(
 
     // φ(idx) = Σ_k phases[k] * b_k,  b_k = (idx >> k) & 1
     double phi = 0.0;
+    double norm = 1.0 ;
     for (unsigned int bit = 0; bit < num_qubits; ++bit) {
         if ((idx >> bit) & 1U) {
             phi += phases[bit];
         }
+        
+        norm *= M_SQRT1_2;

Review Comment:
   This blank line contains trailing whitespace. Trailing whitespace tends to 
create noisy diffs and can fail style checks; please remove it (either delete 
the blank line or keep it fully empty).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to