Skip to content

Commit

Permalink
add assert back as comment for posterity
Browse files Browse the repository at this point in the history
  • Loading branch information
timmysilv committed Jun 20, 2024
1 parent 7b227d8 commit f7358e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions thewalrus/internal_modes/fock_density_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ def _density_matrix_single_mode(
glynn_edges_heralding = spatial_reps_to_schmidt_reps(glynn_edges[3:], K) - (K - 1)
edge_weights = np.concatenate((glynn_edges[:3], glynn_edges_heralding))

# assertions are not allowed in numba.prange contexts, but the below should always be true
# assert len(edge_weights) == n_edges

AX_S = np.empty_like(Ax)
AX_S[:, :n_edges] = edge_weights * Ax[:, n_edges:]
AX_S[:, n_edges:] = edge_weights * Ax[:, :n_edges]
Expand Down

0 comments on commit f7358e6

Please sign in to comment.