---
title: GenericBackendV2 (v1.4)
description: API reference for qiskit.providers.fake_provider.GenericBackendV2 in qiskit v1.4
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit/1.4/qiskit.providers.fake_provider.GenericBackendV2
---

# GenericBackendV2

*class* `qiskit.providers.fake_provider.GenericBackendV2(num_qubits, basis_gates=None, *, coupling_map=None, control_flow=False, calibrate_instructions=None, dtm=None, seed=None, pulse_channels=True, noise_info=True)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.4/qiskit/providers/fake_provider/generic_backend_v2.py#L507-L1035)

Bases: [`BackendV2`](/docs/api/qiskit/1.4/qiskit.providers.BackendV2 "qiskit.providers.backend.BackendV2")

Generic [`BackendV2`](/docs/api/qiskit/1.4/qiskit.providers.BackendV2 "qiskit.providers.BackendV2") implementation with a configurable constructor. This class will return a [`BackendV2`](/docs/api/qiskit/1.4/qiskit.providers.BackendV2 "qiskit.providers.BackendV2") instance that runs on a local simulator (in the spirit of fake backends) and contains all the necessary information to test backend-interfacing components, such as the transpiler. A [`GenericBackendV2`](#qiskit.providers.fake_provider.GenericBackendV2 "qiskit.providers.fake_provider.GenericBackendV2") instance can be constructed from as little as a specified `num_qubits`, but users can additionally configure the basis gates, coupling map, ability to run dynamic circuits (control flow instructions), instruction calibrations and dtm. The remainder of the backend properties are generated by randomly sampling from default ranges extracted from historical IBM backend data. The seed for this random generation can be fixed to ensure the reproducibility of the backend output. This backend only supports gates in the standard library, if you need a more flexible backend, there is always the option to directly instantiate a [`Target`](/docs/api/qiskit/1.4/qiskit.transpiler.Target "qiskit.transpiler.Target") object to use for transpilation.

> **Deprecated since version 1.3**
>
> `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.__init__()`’s argument `calibrate_instructions` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package is being deprecated and this argument uses a dependency on the package.

> **Deprecated since version 1.3**
>
> `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.__init__()`’s argument `pulse_channels` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package is being deprecated and this argument uses a dependency on the package.

**Parameters**

- **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int)) – Number of qubits that will be used to construct the backend’s target. Note that, while there is no limit in the size of the target that can be constructed, this backend runs on local noisy simulators, and these might present limitations in the number of qubits that can be simulated.

- **basis\_gates** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*] | None*) – List of basis gate names to be supported by the target. These must be part of the standard qiskit circuit library. The default set of basis gates is `["id", "rz", "sx", "x", "cx"]` The `"reset"`, `"delay"`, and `"measure"` instructions are always supported by default, even if not specified via `basis_gates`.

- **coupling\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]] |* [*CouplingMap*](/docs/api/qiskit/1.4/qiskit.transpiler.CouplingMap "qiskit.transpiler.CouplingMap") *| None*) –

  Optional coupling map for the backend. Multiple formats are supported:

  1. [`CouplingMap`](/docs/api/qiskit/1.4/qiskit.transpiler.CouplingMap "qiskit.transpiler.CouplingMap") instance
  2. List, must be given as an edge list representing the two qubit interactions supported by the backend, for example: `[[0, 1], [0, 3], [1, 2], [1, 5], [2, 5], [4, 1], [5, 3]]`

  If `coupling_map` is specified, it must match the number of qubits specified in `num_qubits`. If `coupling_map` is not specified, a fully connected coupling map will be generated with `num_qubits` qubits.

- **control\_flow** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – Flag to enable control flow directives on the target (defaults to False).

- **calibrate\_instructions** ([*bool*](https://docs.python.org/3/library/functions.html#bool)  *|*[*InstructionScheduleMap*](/docs/api/qiskit/1.4/qiskit.pulse.InstructionScheduleMap "qiskit.pulse.InstructionScheduleMap") *| None*) –

  DEPRECATED. Instruction calibration settings, this argument supports both boolean and [`InstructionScheduleMap`](/docs/api/qiskit/1.4/qiskit.pulse.InstructionScheduleMap "qiskit.pulse.InstructionScheduleMap") as input types, and is `None` by default:

  1. If `calibrate_instructions==None`, no calibrations will be added to the target.

  2. **If `calibrate_instructions==True`, all gates will be calibrated for all**

     qubits using the default pulse schedules generated internally.

  3. **If `calibrate_instructions==False`, all gates will be “calibrated” for**

     all qubits with an empty pulse schedule.

  4. **If an [`InstructionScheduleMap`](/docs/api/qiskit/1.4/qiskit.pulse.InstructionScheduleMap "qiskit.pulse.InstructionScheduleMap") instance is given, the calibrations**

     in this instruction schedule map will be appended to the target instead of the default pulse schedules (this allows for custom calibrations).

- **dtm** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*) – System time resolution of output signals in nanoseconds. None by default.

- **seed** ([*int*](https://docs.python.org/3/library/functions.html#int) *| None*) – Optional seed for generation of default values.

- **pulse\_channels** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – DEPRECATED. If true, sets default pulse channel information on the backend.

- **noise\_info** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – If true, associates gates and qubits with default noise information.

## Attributes

### coupling\_map

Return the [`CouplingMap`](/docs/api/qiskit/1.4/qiskit.transpiler.CouplingMap "qiskit.transpiler.CouplingMap") object

### dt

Return the system time resolution of input signals

This is required to be implemented if the backend supports Pulse scheduling.

**Returns**

The input signal timestep in seconds. If the backend doesn’t define `dt`, `None` will be returned.

### dtm

Return the system time resolution of output signals

### instruction\_durations

Return the [`InstructionDurations`](/docs/api/qiskit/1.4/qiskit.transpiler.InstructionDurations "qiskit.transpiler.InstructionDurations") object.

### instruction\_schedule\_map

Return the [`InstructionScheduleMap`](/docs/api/qiskit/1.4/qiskit.pulse.InstructionScheduleMap "qiskit.pulse.InstructionScheduleMap") for the instructions defined in this backend’s target.

> **Deprecated since version 1.3**
>
> The property `qiskit.providers.backend.BackendV2.instruction_schedule_map` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package has been deprecated. Once removed, `qiskit.providers.backend.BackendV2.instruction_schedule_map` will have no alternative in Qiskit.

### instructions

A list of Instruction tuples on the backend of the form `(instruction, (qubits)`

### max\_circuits

### meas\_map

### num\_qubits

Return the number of qubits the backend has.

### operation\_names

A list of instruction names that the backend supports.

### operations

A list of [`Instruction`](/docs/api/qiskit/1.4/qiskit.circuit.Instruction "qiskit.circuit.Instruction") instances that the backend supports.

### options

Return the options for the backend

The options of a backend are the dynamic parameters defining how the backend is used. These are used to control the [`run()`](#qiskit.providers.fake_provider.GenericBackendV2.run "qiskit.providers.fake_provider.GenericBackendV2.run") method.

### provider

Return the backend Provider.

**Returns**

the Provider responsible for the backend.

**Return type**

[Provider](/docs/api/qiskit/1.4/qiskit.providers.Provider "qiskit.providers.Provider")

### target

### version

Default value: `2`

### name

Name of the backend.

### description

Optional human-readable description.

### online\_date

Date that the backend came online.

### backend\_version

Version of the backend being provided. This is not the same as [`BackendV2.version`](/docs/api/qiskit/1.4/qiskit.providers.BackendV2#version "qiskit.providers.BackendV2.version"), which is the version of the [`Backend`](/docs/api/qiskit/1.4/qiskit.providers.Backend "qiskit.providers.Backend") abstract interface.

## Methods

### acquire\_channel

`acquire_channel(qubit)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.4/qiskit/providers/fake_provider/generic_backend_v2.py#L1021-L1027)

> **Deprecated since version 1.3**
>
> The method `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.acquire_channel()` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package has been deprecated. Once removed, `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.acquire_channel()` will have no alternative in Qiskit.

**Parameters**

**qubit** ([*int*](https://docs.python.org/3/library/functions.html#int)) –

### control\_channel

`control_channel(qubits)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.4/qiskit/providers/fake_provider/generic_backend_v2.py#L1029-L1035)

> **Deprecated since version 1.3**
>
> The method `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.control_channel()` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package has been deprecated. Once removed, `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.control_channel()` will have no alternative in Qiskit.

**Parameters**

**qubits** ([*Iterable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*) –

### drive\_channel

`drive_channel(qubit)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.4/qiskit/providers/fake_provider/generic_backend_v2.py#L1005-L1011)

> **Deprecated since version 1.3**
>
> The method `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.drive_channel()` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package has been deprecated. Once removed, `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.drive_channel()` will have no alternative in Qiskit.

**Parameters**

**qubit** ([*int*](https://docs.python.org/3/library/functions.html#int)) –

### measure\_channel

`measure_channel(qubit)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.4/qiskit/providers/fake_provider/generic_backend_v2.py#L1013-L1019)

> **Deprecated since version 1.3**
>
> The method `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.measure_channel()` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package has been deprecated. Once removed, `qiskit.providers.fake_provider.generic_backend_v2.GenericBackendV2.measure_channel()` will have no alternative in Qiskit.

**Parameters**

**qubit** ([*int*](https://docs.python.org/3/library/functions.html#int)) –

### qubit\_properties

`qubit_properties(qubit)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.4/qiskit/providers/backend.py#L500-L532)

Return QubitProperties for a given qubit.

If there are no defined or the backend doesn’t support querying these details this method does not need to be implemented.

**Parameters**

**qubit** ([*int*](https://docs.python.org/3/library/functions.html#int)  *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*) – The qubit to get the [`QubitProperties`](/docs/api/qiskit/1.4/qiskit.providers.QubitProperties "qiskit.providers.QubitProperties") object for. This can be a single integer for 1 qubit or a list of qubits and a list of [`QubitProperties`](/docs/api/qiskit/1.4/qiskit.providers.QubitProperties "qiskit.providers.QubitProperties") objects will be returned in the same order

**Returns**

The [`QubitProperties`](/docs/api/qiskit/1.4/qiskit.providers.QubitProperties "qiskit.providers.QubitProperties") object for the specified qubit. If a list of qubits is provided a list will be returned. If properties are missing for a qubit this can be `None`.

**Raises**

[**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError) – if the backend doesn’t support querying the qubit properties

**Return type**

[*QubitProperties*](/docs/api/qiskit/1.4/qiskit.providers.QubitProperties "qiskit.providers.backend.QubitProperties") | [*List*](https://docs.python.org/3/library/typing.html#typing.List)\[[*QubitProperties*](/docs/api/qiskit/1.4/qiskit.providers.QubitProperties "qiskit.providers.backend.QubitProperties")]

### run

`run(run_input, **options)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.4/qiskit/providers/fake_provider/generic_backend_v2.py#L922-L980)

Run on the backend using a simulator.

This method runs circuit jobs (an individual or a list of [`QuantumCircuit`](/docs/api/qiskit/1.4/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") ) and pulse jobs (an individual or a list of [`Schedule`](/docs/api/qiskit/1.4/qiskit.pulse.Schedule "qiskit.pulse.Schedule") or [`ScheduleBlock`](/docs/api/qiskit/1.4/qiskit.pulse.ScheduleBlock "qiskit.pulse.ScheduleBlock")) using [`BasicSimulator`](/docs/api/qiskit/1.4/qiskit.providers.basic_provider.BasicSimulator "qiskit.providers.basic_provider.BasicSimulator") or Aer simulator and returns a [`Job`](/docs/api/qiskit/1.4/qiskit.providers.Job "qiskit.providers.Job") object.

If qiskit-aer is installed, jobs will be run using the `AerSimulator` with noise model of the backend. Otherwise, jobs will be run using the `BasicSimulator` simulator without noise.

Noisy simulations of pulse jobs are not yet supported in [`GenericBackendV2`](#qiskit.providers.fake_provider.GenericBackendV2 "qiskit.providers.fake_provider.GenericBackendV2").

**Parameters**

- **run\_input** ([*QuantumCircuit*](/docs/api/qiskit/1.4/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")  *or*[*Schedule*](/docs/api/qiskit/1.4/qiskit.pulse.Schedule "qiskit.pulse.Schedule")  *or*[*ScheduleBlock*](/docs/api/qiskit/1.4/qiskit.pulse.ScheduleBlock "qiskit.pulse.ScheduleBlock")  *or*[*list*](https://docs.python.org/3/library/stdtypes.html#list)) – An individual or a list of [`QuantumCircuit`](/docs/api/qiskit/1.4/qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"), [`ScheduleBlock`](/docs/api/qiskit/1.4/qiskit.pulse.ScheduleBlock "qiskit.pulse.ScheduleBlock"), or [`Schedule`](/docs/api/qiskit/1.4/qiskit.pulse.Schedule "qiskit.pulse.Schedule") objects to run on the backend.
- **options** – Any kwarg options to pass to the backend for running the config. If a key is also present in the options attribute/object, then the expectation is that the value specified will be used instead of what’s set in the options object.

**Returns**

The job object for the run

**Return type**

[Job](/docs/api/qiskit/1.4/qiskit.providers.Job "qiskit.providers.Job")

**Raises**

[**QiskitError**](/docs/api/qiskit/1.4/exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") – If a pulse job is supplied and qiskit\_aer is not installed.

### set\_options

`set_options(**fields)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/1.4/qiskit/providers/backend.py#L605-L622)

Set the options fields for the backend

This method is used to update the options of a backend. If you need to change any of the options prior to running just pass in the kwarg with the new value for the options.

**Parameters**

**fields** – The fields to update the options

**Raises**

[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError) – If the field passed in is not part of the options
