qat.ir.gates.base module
- class GateBase(**data)
- Bases: - QubitInstruction,- ABC- Base implementation of a gate in a quantum circuit that acts on some qubits, and if needed, defined by some parameters. - Create a new model by parsing and validating input data from keyword arguments. - Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. - self is explicitly positional-only to allow self as a field name. - model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
- Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. 
 
- class QubitInstruction(**data)
- Bases: - Instruction,- ABC- Denotes that an instruction is done at the level of a qubit (as opposed to a pulse channel level instruction). - Create a new model by parsing and validating input data from keyword arguments. - Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model. - self is explicitly positional-only to allow self as a field name. - model_config: ClassVar[ConfigDict] = {'extra': 'ignore', 'use_enum_values': False, 'validate_assignment': True}
- Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict]. 
 
- constrain_angle(theta)
- Constrains a rotation angle between [-np.pi, np.pi). - Return type:
- float
 
- is_equal_angle(angle1, angle2)
- Return type:
- bool