MCPcopy 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
47def create_matrix(size):
48 diag = np.sqrt(np.arange(1, size, dtype=np.complex128))
49 return np.diag(diag, -1)
50
51
52def annihilate_matrix(size):

Callers 14

test_definitionsFunction · 0.70
test_propertiesFunction · 0.70
test_arithmeticsFunction · 0.70
sigmam_matrixFunction · 0.70
position_matrixFunction · 0.70
momentum_matrixFunction · 0.70
squeeze_matrixFunction · 0.70
displace_matrixFunction · 0.70
test_product_conversionsFunction · 0.70
test_sum_conversionsFunction · 0.70
test_scalar_arithmeticsFunction · 0.70

Calls

no outgoing calls

Tested by 9

test_definitionsFunction · 0.56
test_propertiesFunction · 0.56
test_arithmeticsFunction · 0.56
test_product_conversionsFunction · 0.56
test_sum_conversionsFunction · 0.56
test_scalar_arithmeticsFunction · 0.56
test_definitionsFunction · 0.56