---
title: ApplyGate (latest version)
description: API reference for qiskit_noise_learning.sequences.ApplyGate in the latest version of qiskit-noise-learning
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit-noise-learning/generated/sequences-apply-gate
---

# qiskit\_noise\_learning.sequences.ApplyGate

*class* `qiskit_noise_learning.sequences.ApplyGate(gate_name: str)`

[GitHub](https://github.com/Qiskit/qiskit-noise-learning/tree/stable/0.1/qiskit_noise_learning/sequences/apply_gate.py)

Bases: `Instruction`

An instruction that applies a fixed gate.

**Parameters**

**gate\_name** – The name of the gate to apply.

### \_\_init\_\_

`__init__(gate_name: str)`

## Methods

|                                                                                                                                                          |                                                               |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| [`__init__`](#qiskit_noise_learning.sequences.ApplyGate.__init__ "qiskit_noise_learning.sequences.ApplyGate.__init__")(gate\_name)                       |                                                               |
| [`complete`](#qiskit_noise_learning.sequences.ApplyGate.complete "qiskit_noise_learning.sequences.ApplyGate.complete")()                                 | Returns self.                                                 |
| [`is_mergeable_with`](#qiskit_noise_learning.sequences.ApplyGate.is_mergeable_with "qiskit_noise_learning.sequences.ApplyGate.is_mergeable_with")(other) | Whether or not this apply gate is mergeable with another one. |
| [`merge`](#qiskit_noise_learning.sequences.ApplyGate.merge "qiskit_noise_learning.sequences.ApplyGate.merge")(other)                                     | Merge self and other into a single instruction.               |

## Attributes

|                                                                                                                                             |                                                                      |
| ------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`gate_name`](#qiskit_noise_learning.sequences.ApplyGate.gate_name "qiskit_noise_learning.sequences.ApplyGate.gate_name")                   | The name of the gate to apply.                                       |
| [`is_complete`](#qiskit_noise_learning.sequences.ApplyGate.is_complete "qiskit_noise_learning.sequences.ApplyGate.is_complete")             | Apply gate instructions are always complete.                         |
| [`structure_token`](#qiskit_noise_learning.sequences.ApplyGate.structure_token "qiskit_noise_learning.sequences.ApplyGate.structure_token") | A hashable summary of this instruction that constrains mergeability. |

### gate\_name

Type: [`str`](https://docs.python.org/3/library/stdtypes.html#str)

The name of the gate to apply.

### is\_complete

Type: [`bool`](https://docs.python.org/3/library/functions.html#bool)

Apply gate instructions are always complete.

### structure\_token

Type: [`Hashable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Hashable)

A hashable summary of this instruction that constrains mergeability.

This token serves as a cheap check of non-mergeability: instructions with unequal structure tokens are never mergeable. The token must therefore distinguish instruction types from one another.

### complete

`complete() → Self`

Returns self.

### is\_mergeable\_with

`is_mergeable_with(other: Instruction) → bool`

Whether or not this apply gate is mergeable with another one.

Mergeability of two [`ApplyGate`](#qiskit_noise_learning.sequences.ApplyGate "qiskit_noise_learning.sequences.ApplyGate") instructions is based on equality of the gate names.

**Parameters**

**other** – The other instruction to check mergeablitity with.

**Returns**

Whether this instruction is mergeable with the other.

### merge

`merge(other)`

Merge self and other into a single instruction.

**Parameters**

**other** – The other instruction to merge with.

**Returns**

Some instruction (possibly the same instance) that simultaneously implements the action of this instruction and the other instruction.
