Skip to main content
IBM Quantum Platform

GroupRegister

class samplomatic.virtual_registers.GroupRegister(virtual_gates: ndarray)

GitHub

Bases: VirtualRegister

A virtual register whose elements form a group.

Methods Summary

Column 1
Column 2
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

inplace_multiply

abstractmethod inplace_multiply(other: T, subsystem_idxs: list[int] | slice = slice(None, None, None))

GitHub

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.

invert

abstractmethod invert() → T

GitHub

Return a new virtual register that inverts each virtual gate.

left_inplace_multiply

left_inplace_multiply(other: T, subsystem_idxs: list[int] | slice = slice(None, None, None))

GitHub

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

left_multiply(other: T, subsystem_idxs: list[int] | slice = slice(None, None, None)) → T

GitHub

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.

multiply

abstractmethod multiply(other: T, subsystem_idxs: list[int] | slice = slice(None, None, None)) → T

GitHub

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.

Was this page helpful?
Report a bug, typo, or request content on GitHub.