qrunch.quantum.gates.gate_encoding
Composite gate functionality and implementations.
Classes
Mixin class that provide encode and decode methods to Gate Classes. |
- class GateEncodingMixin
Bases:
HasCustomEncoding,ABCMixin class that provide encode and decode methods to Gate Classes.
- __init__(*args, **kwargs)
- classmethod decode(data: dict[str, Any]) T
Decode a dictionary.
- Parameters:
data (dict[str, Any]) – The dictionary representation.
- Return type:
T
- encode() dict[str, Any]
Encode the instance into a dictionary.
- Return type:
dict[str, Any]
- abstract property parameters: list[float | Parameter | ParameterExpression]
List of parameters for the gate.
- abstract property qubit_indices: tuple[int, ...]
Tuple containing the qubit indices for the gate as (qubit_index).