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

칼럼 1
칼럼 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.

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.