(More a feature removal request, actually)
Both second_q.hamiltonians.hamiltonian.Hamiltonian and second_q.operators.SparseLabelOp (and accordingly all their children) require a .register_length() method. However, this method does not seem to be used anywhere at the moment? What is the point of having this method?
From a logical point of view, it seems weird to associate a register length with an operator, as the size of a qubit register should only be clear after mapping?
The docstrings are rather cryptic, with SparseLabelOp.register_length() simply saying: "Returns the register length" and Hamiltonian.register_length() the not much more informative "The size of the operator generated by the second_q_op method." How does one measure the size of an operator? Especially since SparseLabelOp is supposed to be rather generic and not make any assumptions about the types of string labels it holds, I am not really sure what I should expect from this method as a return value?
(More a feature removal request, actually)
Both
second_q.hamiltonians.hamiltonian.Hamiltonianandsecond_q.operators.SparseLabelOp(and accordingly all their children) require a.register_length()method. However, this method does not seem to be used anywhere at the moment? What is the point of having this method?From a logical point of view, it seems weird to associate a register length with an operator, as the size of a qubit register should only be clear after mapping?
The docstrings are rather cryptic, with
SparseLabelOp.register_length()simply saying: "Returns the register length" andHamiltonian.register_length()the not much more informative "The size of the operator generated by thesecond_q_opmethod." How does one measure the size of an operator? Especially sinceSparseLabelOpis supposed to be rather generic and not make any assumptions about the types of string labels it holds, I am not really sure what I should expect from this method as a return value?