Open cianibegood opened 3 years ago
Hi, just took a look at this. As far as I can see this issue currently only happens in the TomoEnv
(let me know if there are other instances).
A simple (and I think elegant) solution that I propose is the following: make all systems methods used by the tomography dual to QubitSystem
and Qubit
:
Add qubits
as an abstract property to Qubit
. Then for each Qubit
instance (like Transmon
, Fluxonium
) they'd have a simple definition, which would look like this:
@property def qubits(self) -> List[Qubit]: return [self]
so basically it returns a list of itself. This will allow the functions that assemble the jump operators and drives compatible. The hamiltonian
syntax is already dual.
Add the size
property to Qubit
class, so this is basically a direct copy-paste now.
Finally make the functions state
and state_index
to be dual. These are kinda trivial for a single qubit, but I think that's ok.
So basically that should allow a single qubit to be treated as a system of... 1 qubit. Let me know what you think and I can fix this.
This is just to highlight the fact that currently many functions and classes can take QubitSystem as argument, but not Qubit (for instance TomoEnv). This of course has to be corrected.