qat.ir.gates.native module
- class NativeGate(**data)
Bases:
GateBase,ABCMarks a gate as a native gate.
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 X_pi_2(**data)
Bases:
Gate1Q,NativeGateA native \(X(\pi/2)\) gate.
Mathematically equivalent to \(R_{x}(\pi/2)\), but semantically represents part of a decomposed gate.
- Parameters:
qubit¶ – Index for the qubit that the gate acts on.
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.
-
inst:
Literal['X_pi_2']
- property matrix
- 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 ZX_pi_4(**data)
Bases:
Gate2Q,NativeGateA native \(ZX(\pi/4)\) gate.
Warning
While this gate mathematically represents a \(ZX(\pi/4)\) gate, it is frequently used as a block within an
ECRgate, and is calibrated for this use. Using this gate on its own might yield unexpected results.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.
-
inst:
Literal['ZX_pi_4']
- property matrix
- 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].
-
inst:
- class Z_phase(**data)
Bases:
Rz,NativeGateA native implementation of \(R_{z}(\theta)\) gate via a phase shift.
Derived from the
Rzgate as its mathematically no different. However, this class is used to mark it as aNativeGatefor hardware that support virtual-Z gates.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.
-
inst:
Literal['Z_phase']
- 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].
-
inst: