Skip to main contentIBM Quantum Documentation

GateConfig

qiskit.providers.models.GateConfig(name, parameters, qasm_def, coupling_map=None, latency_map=None, conditional=None, description=None)GitHub(opens in a new tab)

Bases: object(opens in a new tab)

Class representing a Gate Configuration

name

the gate name as it will be referred to in OpenQASM.

parameters

variable names for the gate parameters (if any).

qasm_def

definition of this gate in terms of OpenQASM 2 primitives U and CX.

Initialize a GateConfig object

Parameters

  • name (str(opens in a new tab)) – the gate name as it will be referred to in OpenQASM.
  • parameters (list(opens in a new tab)) – variable names for the gate parameters (if any) as a list of strings.
  • qasm_def (str(opens in a new tab)) – definition of this gate in terms of OpenQASM 2 primitives U and CX.
  • coupling_map (list(opens in a new tab)) – An optional coupling map for the gate. In the form of a list of lists of integers representing the qubit groupings which are coupled by this gate.
  • latency_map (list(opens in a new tab)) – An optional map of latency for the gate. In the the form of a list of lists of integers of either 0 or 1 representing an array of dimension len(coupling_map) X n_registers that specifies the register latency (1: fast, 0: slow) conditional operations on the gate
  • conditional (bool(opens in a new tab)) – Optionally specify whether this gate supports conditional operations (true/false). If this is not specified, then the gate inherits the conditional property of the backend.
  • description (str(opens in a new tab)) – Description of the gate operation

Methods

from_dict

classmethod from_dict(data)

Create a new GateConfig object from a dictionary.

Parameters

data (dict(opens in a new tab)) – A dictionary representing the GateConfig to create. It will be in the same format as output by to_dict().

Returns

The GateConfig from the input dictionary.

Return type

GateConfig

to_dict

to_dict()

Return a dictionary format representation of the GateConfig.

Returns

The dictionary form of the GateConfig.

Return type

dict(opens in a new tab)

Was this page helpful?