-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Currently, creation and annihilation operators can be defined on a LocalSpace of arbitrary dimension. The algebra will consider these as having bosonic commutation relations, regardless of LocalSpace dimensionality. This can be considered:
- A feature, if the
LocalSpaceis understood as representing a true bosonic degree of freedom, and the dimension only as the size we eventually want to truncate the basis to when writing out numerical representations of operators; - A bug, if the dimensionality of the
LocalSpaceis understood as the true dimensionality of the physical system we're modeling, and bycreatewe mean the operator that acts like a truncated bosonic creation operator on the states in this finite ladder (except for necessarily annihilating the top level).
In the latter case, the operators represented by Create and Destroy satisfy bosonic commutation relations only in the limit that the dimension is taken to infinity. This is most egregious in the case of a two-level system, for which it seems reasonable to interpret Create and Destroy as fermionic creation and annihilation operators, satisfying fermionic anticommutation relations a * a.dag() + a.dag() * a = 1. This is also the relation satisfied by the matrices that QNET writes for these operators when asked: a -> [[0, 1], [0, 0]]; a.dag() -> [[0, 0], [1, 0]]. When doing symbolic algebra, however, QNET will unapologetically assume bosonic commutation relations regardless of dimension.
I think the solution to this is to treat the dimension of LocalSpace solely as the physical dimension. Thus, bosonic degrees of freedom should always use infinite dimension (i.e., LocalSpace(..., dimension=None)), and a finite dimension should be reserved for subspaces that actually have finite dimension in the physical model, such as angular momenta, spins, and fermions.
If this is carried through, in order to avoid confusion, it should only be possible to instantiate Create and Destroy with spaces of dimension either infinity or 2, i.e., bosons or fermions, since these are the only two cases where creation and annihilation operators are unambiguously and universally defined. Symbolically they should satisfy bosonic commutation relations in the case of infinite dimension, and fermionic anticommutation relations in the case of two-level systems. For other spaces of finite dimension, one should use angular momentum operators Jplus, Jminus to traverse the ladder.
The notion of basis truncation should come into play only upon conversion to numerical matrices in convert_to_qutip and convert_to_sympy_matrix. These functions should take a mapping from all infinite-dimensional LocalSpace instances to the corresponding desired truncated basis sizes.
This issue must be clarified to make sure that two-level systems can be safely used as fermionic degrees of freedom before considering a generalization of the supermode/Bogoliubov transformation idea (#89) to fermions.