Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVIDIA/cuda-quantum
/ create_matrix
Function
create_matrix
python/tests/operator/op_utils.py:47–49 ·
view source on GitHub ↗
(size)
Source
from the content-addressed store, hash-verified
45
46
47
def
create_matrix(size):
48
diag = np.sqrt(np.arange(1, size, dtype=np.complex128))
49
return
np.diag(diag, -1)
50
51
52
def
annihilate_matrix(size):
Callers
14
test_definitions
Function · 0.70
test_commutation_relations
Function · 0.70
test_properties
Function · 0.70
test_arithmetics
Function · 0.70
sigmam_matrix
Function · 0.70
position_matrix
Function · 0.70
momentum_matrix
Function · 0.70
squeeze_matrix
Function · 0.70
displace_matrix
Function · 0.70
test_product_conversions
Function · 0.70
test_sum_conversions
Function · 0.70
test_scalar_arithmetics
Function · 0.70
Calls
no outgoing calls
Tested by
9
test_definitions
Function · 0.56
test_commutation_relations
Function · 0.56
test_properties
Function · 0.56
test_arithmetics
Function · 0.56
test_product_conversions
Function · 0.56
test_sum_conversions
Function · 0.56
test_scalar_arithmetics
Function · 0.56
test_definitions
Function · 0.56
test_commutation_relations
Function · 0.56