   auto dev_workspace = cuda::allocate<float>(workspace_size);
   auto dev_info = cuda::allocate<int>(1);
 
-  auto dev_q = cuda::allocate<float>(matrix.size());
+  auto dev_q = cuda::copy_to_device(identity);
+  auto dev_eigvecs = cuda::copy_on_device(dev_q, matrix.size());
 
   cuda::copy_on_device(dev_qr, dev_matrix, matrix.size());
-
-  auto dev_eigvecs = cuda::copy_to_device(std::vector<float> {
-    1, 0, 0, 0,
-    0, 1, 0, 0,
-    0, 0, 1, 0,
-    0, 0, 0, 1,
-  });
 
   for (auto k = 0; k < K_MAX; ++k) {
     // Compute QR factorization.

    int info;
    cuda::copy_to_host(&info, dev_info, 1);
    assert(info == 0);

    const dim3 blocks(2, 2);
    const dim3 threads(2, 2);


  if (idx >= n * n) return;

  for (auto k = 0; k < n; ++k) {
    auto inner_product = 0.0f;

