But since NumPy 1.10.0 (~2015) an alternative syntax is supported:
einsum also provides an alternative way to provide the subscripts and operands as einsum(op0, sublist0, op1, sublist1, ..., [sublistout]). If the output shape is not provided in this format einsum will be calculated in implicit mode, otherwise it will be performed explicitly. The examples below have corresponding einsum calls with the two parameter methods.
It could be worth to spend a little of effort to implement it, and lift this limitation to 52 qubits (though for pure state vector is pretty much irrelevant...).
While reviewing the potential content of
qibo-core
, I found the following interesting pieces of code:https://github.com/qiboteam/qibo-core/blob/13a1294460ce4a61f9938b4de649224f615b65bf/src/qibo_core/config.py#L23-L24 https://github.com/qiboteam/qibo-core/blob/13a1294460ce4a61f9938b4de649224f615b65bf/src/qibo_core/backends/einsum_utils.py#L11-L12 https://github.com/qiboteam/qibo-core/blob/13a1294460ce4a61f9938b4de649224f615b65bf/src/qibo_core/backends/einsum_utils.py#L50-L51 ...
But since NumPy 1.10.0 (~2015) an alternative syntax is supported:
https://numpy.org/doc/stable/reference/generated/numpy.einsum.html
It could be worth to spend a little of effort to implement it, and lift this limitation to 52 qubits (though for pure state vector is pretty much irrelevant...).