Skip to main content
IBM Quantum Platform

C1Register

class samplomatic.virtual_registers.C1Register(virtual_gates: ndarray)

GitHub

Bases: FiniteGroupRegister

Virtual register of C1 gates.

Here, we use an integer representation constructed from flattening the six cosets of the Pauli subgroup and the subgroup itself. Concretely, a value cc corresponds to the unitary GiHjP(k)G^i H^j P(k) where k=ck = c % 4, j = c // 4 % 2, i = c // 8 % 3 and G=HSG = HS.

Attributes Summary

Column 1
Column 2
CONVERTABLE_TYPESValid arguments for convert_to().
GATE_SHAPEThe array shape of any single virtual gate.
SUBSYSTEM_SIZEThe number of qubits each virtual gate acts on.
TYPEThe group name in 1-1 correspondence with this virtual gate type.
inverse_tableThe lookup table for the inverse.
lookup_tableThe lookup table for the group operation.

Methods Summary

Column 1
Column 2
convert_to(register_type)Convert this register type to some other type, if possible.
from_tableau(tableaus)Return a new register from an array of tableaus.
identity(num_subsystems, num_samples)Instantiate a new register of identity virtual gates.
to_tableau()Return an array of tableaus with the same shape as this.

Attributes Documentation

CONVERTABLE_TYPES

Type: frozenset[VirtualType]

Default value: frozenset({VirtualType.C1, VirtualType.U2})

Valid arguments for convert_to().

GATE_SHAPE

Type: tuple[int, ...]

Default value: ()

The array shape of any single virtual gate.

SUBSYSTEM_SIZE

Type: int

Default value: 1

The number of qubits each virtual gate acts on.

TYPE

Type: VirtualType

Default value: 'c1'

The group name in 1-1 correspondence with this virtual gate type.

inverse_table

lookup_table

Methods Documentation

convert_to

convert_to(register_type)

GitHub

Convert this register type to some other type, if possible.

Parameters

register_type – The type of register to convert to.

Returns

A new register of the specified output type, or this instance if its type is register_type.

Raises

VirtualGateError – If this type cannot be converted to the specified type.

from_tableau

classmethod from_tableau(tableaus: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) → C1Register

GitHub

Return a new register from an array of tableaus.

Parameters

tableaus – The tableaus corresponding the registers.

Returns

A virtual register in the enumerated representation.

identity

classmethod identity(num_subsystems, num_samples)

GitHub

Instantiate a new register of identity virtual gates.

to_tableau

to_tableau() → ndarray

GitHub

Return an array of tableaus with the same shape as this.

Returns

An array of tableaus.

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