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
I have searched exisisting GitHub issues to make sure the issue does not already exist.
Expected behavior
fromthewalrus.randomimportrandom_covariancefromthewalrus.quantumimportQmatdefrmat(l, hbar=2):
""" This is the R matrix in https://the-walrus.readthedocs.io/en/latest/gbs.html """idl=np.identity(l)/np.sqrt(2*hbar)
returnnp.block([[idl, 1j*idl],[idl, -1j*idl]])
cov=random_covariance(m)
Q=Qmat(cov)
rr=rmat(m)
Qp=rr @ cov @ (rr.T.conj()) +np.identity(len(cov))*0.5print(np.allclose(Q, Qp)) # Comes out to be False
Actual behavior
fromthewalrus.randomimportrandom_covariancefromthewalrus.quantumimportQmatdefrmat(l, hbar=2):
""" This is the R matrix in https://the-walrus.readthedocs.io/en/latest/gbs.html """idl=np.identity(l)/np.sqrt(2*hbar)
returnnp.block([[idl, 1j*idl],[idl, -1j*idl]])
cov=random_covariance(m)
Q=Qmat(cov)
rr=rmat(m)
Qp=rr @ cov @ (rr.T.conj()) +np.identity(len(cov))*0.5print(np.allclose(Q, Qp.conj())) # Comes out to be True
Reproduces how often
Always
System information
Linux
Source code
No response
Tracebacks
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
Before posting a bug report
Expected behavior
Actual behavior
Reproduces how often
Always
System information
Source code
No response
Tracebacks
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: