qat.ir.gates.native module
- class NativeGate(**data)
Bases:
GateBase
,ABC
Marks 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': 'forbid', 'ser_json_inf_nan': 'constants', '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
,NativeGate
A 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': 'forbid', 'ser_json_inf_nan': 'constants', '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
,NativeGate
A 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
ECR
gate, 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': 'forbid', 'ser_json_inf_nan': 'constants', '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
,NativeGate
A native implementation of \(R_{z}(\theta)\) gate via a phase shift.
Derived from the
Rz
gate as its mathematically no different. However, this class is used to mark it as aNativeGate
for 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': 'forbid', 'ser_json_inf_nan': 'constants', 'use_enum_values': False, 'validate_assignment': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
inst: