You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task: Function that allows one to generate a random circulant Gram matrix of a requested dimension.
In toqito/rand, adding the following function:
importnumpyasnpdefrandom_circulant_gram(dim: int) ->np.ndarray:
# Step 1: Generate a random diagonal matrix with non-negative entriesdiag_mat=np.diag(np.random.rand(dim))
# Step 2: Construct the normalized DFT matrixdft_mat=np.fft.fft(np.eye(dim)) /np.sqrt(dim)
# Step 3: Compute the circulant matrix. Since circ_mat is formed from the DFT of a real # diagonal matrix, it should be realreturnnp.real(np.conj(dft_mat.T) @ diag_mat @ dft_mat)
Would also need to add appropriate tests in rand/tests as well adding a link in the .rst docs.
The text was updated successfully, but these errors were encountered:
Task: Function that allows one to generate a random circulant Gram matrix of a requested dimension.
In
toqito/rand
, adding the following function:Would also need to add appropriate tests in
rand/tests
as well adding a link in the.rst
docs.The text was updated successfully, but these errors were encountered: