Skip to main content
IBM Quantum Platform

qiskit_noise_learning.sequences.ApplyGate

class qiskit_noise_learning.sequences.ApplyGate(gate_name: str)

GitHub

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

Column 1
Column 2
__init__(gate_name)
complete()Returns self.
is_mergeable_with(other)Whether or not this apply gate is mergeable with another one.
merge(other)Merge self and other into a single instruction.

Attributes

Column 1
Column 2
gate_nameThe name of the gate to apply.
is_completeApply gate instructions are always complete.
structure_tokenA hashable summary of this instruction that constrains mergeability.

gate_name

Type: str

The name of the gate to apply.

is_complete

Type: bool

Apply gate instructions are always complete.

structure_token

Type: 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 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.

Was this page helpful?
Report a bug, typo, or request content on GitHub.