c3
c3 copied to clipboard
Hilbert space kronecker product ignores dimension
Describe the bug
Using https://github.com/q-optimize/c3/blob/2b4625ffe99fad1cf8b26e76300f50bfa8eb53a9/c3/utils/qt_utils.py#L68 the dimension of the target subspace is ignored.
To Reproduce
hilbert_space_kron(PAULIS["Z"], 1, dims=[3, 3]) has dimension 6, because PAULIS["Z"] has dimension 2 and is kroneckerd with an identity of dim 3.
Expected behavior
The dimensions given in dims=[3, 3] should be respected to result in final dimension 9. The given operator should be extended to fit.
Environment
- OS: Pop OS Linux
- Python 3.8.8
-
c3-toolsetVersion 1.2.2