C1Register
class samplomatic.virtual_registers.C1Register(virtual_gates: ndarray)
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 corresponds to the unitary where and .
Attributes Summary
Column 1 | Column 2 |
|---|---|
CONVERTABLE_TYPES | Valid arguments for convert_to(). |
GATE_SHAPE | The array shape of any single virtual gate. |
SUBSYSTEM_SIZE | The number of qubits each virtual gate acts on. |
TYPE | The group name in 1-1 correspondence with this virtual gate type. |
inverse_table | The lookup table for the inverse. |
lookup_table | The 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
SUBSYSTEM_SIZE
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)
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
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)
Instantiate a new register of identity virtual gates.
to_tableau
to_tableau() → ndarray
Return an array of tableaus with the same shape as this.
Returns
An array of tableaus.