GroupRegister¶
- class samplomatic.virtual_registers.GroupRegister(virtual_gates: ndarray)[source]¶
- Bases: - VirtualRegister- A virtual register whose elements form a group. - Methods Summary - inplace_multiply(other[, subsystem_idxs])- Inplace-multiply each virtual gate with the corresponding element of - other.- invert()- Return a new virtual register that inverts each virtual gate. - left_inplace_multiply(other[, subsystem_idxs])- Left inplace-multiply each virtual gate with the corresponding element of - other.- left_multiply(other[, subsystem_idxs])- Left multiply each virtual gate with the corresponding element of - other.- multiply(other[, subsystem_idxs])- Multiply each virtual gate with the corresponding element of - other.- Methods Documentation - abstractmethod inplace_multiply(other: T, subsystem_idxs: list[int] | slice = slice(None, None, None))[source]¶
- Inplace-multiply each virtual gate with the corresponding element of - other.- Parameters:
- other – Another virtual register of the same type. 
- subsystem_idxs – The indices of the subsystems to multiply, in self. 
 
- Raises:
- VirtualGateError – When the shapes do not match. 
 
 - left_inplace_multiply(other: T, subsystem_idxs: list[int] | slice = slice(None, None, None))[source]¶
- Left inplace-multiply each virtual gate with the corresponding element of - other.- Parameters:
- other – Another virtual register of the same type. 
- subsystem_idxs – The indices of the subsystems to multiply, in self. 
 
- Raises:
- VirtualGateError – When the shapes do not match. 
 
 - left_multiply(other: T, subsystem_idxs: list[int] | slice = slice(None, None, None)) T[source]¶
- Left multiply each virtual gate with the corresponding element of - other.- Parameters:
- other – Another virtual register of the same type. 
- subsystem_idxs – The indices of the subsystems to multiply, in self. 
 
- Returns:
- A new virtual register of the same type. 
- Raises:
- VirtualGateError – When the shapes do not match. 
 
 - abstractmethod multiply(other: T, subsystem_idxs: list[int] | slice = slice(None, None, None)) T[source]¶
- Multiply each virtual gate with the corresponding element of - other.- Parameters:
- other – Another virtual register of the same type. 
- subsystem_idxs – The indices of the subsystems to multiply, in self. 
 
- Returns:
- A new virtual register of the same type. 
- Raises:
- VirtualGateError – When the shapes do not match.