160 lines
6.1 KiB
Plaintext
160 lines
6.1 KiB
Plaintext
---
|
||
title: Fake20QV1 (v1.2)
|
||
description: API reference for qiskit.providers.fake_provider.Fake20QV1 in qiskit v1.2
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.providers.fake_provider.Fake20QV1
|
||
---
|
||
|
||
# Fake20QV1
|
||
|
||
<Class id="qiskit.providers.fake_provider.Fake20QV1" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/fake_provider/backends_v1/fake_20q/fake_20q.py#L21-L43" signature="qiskit.providers.fake_provider.Fake20QV1" modifiers="class">
|
||
Bases: [`FakeQasmBackend`](providers_fake_provider#qiskit.providers.fake_provider.FakeQasmBackend "qiskit.providers.fake_provider.fake_qasm_backend.FakeQasmBackend")
|
||
|
||
A fake backend with the following characteristics:
|
||
|
||
* num\_qubits: 20
|
||
|
||
* coupling\_map:
|
||
|
||
> ```text
|
||
> 00 ↔ 01 ↔ 02 ↔ 03 ↔ 04
|
||
> ↕ ↕
|
||
> 05 ↔ 06 ↔ 07 ↔ 08 ↔ 09
|
||
> ↕ ↕ ↕
|
||
> 10 ↔ 11 ↔ 12 ↔ 13 ↔ 14
|
||
> ↕ ↕
|
||
> 15 ↔ 16 ↔ 17 ↔ 18 ↔ 19
|
||
> ```
|
||
|
||
* basis\_gates: `["id", "u1", "u2", "u3", "cx"]`
|
||
|
||
FakeBackend initializer.
|
||
|
||
<Admonition title="Deprecated since version 1.2" type="danger">
|
||
The class `qiskit.providers.fake_provider.fake_backend.FakeBackend` is deprecated as of qiskit 1.2. It will be removed in the 2.0 release. Fake backends using BackendV1 are deprecated in favor of [`GenericBackendV2`](qiskit.providers.fake_provider.GenericBackendV2 "qiskit.providers.fake_provider.GenericBackendV2"). You can convert BackendV1 to [`BackendV2`](qiskit.providers.BackendV2 "qiskit.providers.BackendV2") with [`BackendV2Converter`](qiskit.providers.BackendV2Converter "qiskit.providers.BackendV2Converter").
|
||
</Admonition>
|
||
|
||
**Parameters**
|
||
|
||
* **configuration** ([*BackendConfiguration*](qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration")) – backend configuration
|
||
* **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – time to wait before returning result
|
||
|
||
## Attributes
|
||
|
||
### backend\_name
|
||
|
||
<Attribute id="qiskit.providers.fake_provider.Fake20QV1.backend_name" attributeValue="'fake_20q_v1'" />
|
||
|
||
### conf\_filename
|
||
|
||
<Attribute id="qiskit.providers.fake_provider.Fake20QV1.conf_filename" attributeValue="'conf_singapore.json'" />
|
||
|
||
### dirname
|
||
|
||
<Attribute id="qiskit.providers.fake_provider.Fake20QV1.dirname" attributeValue="'/home/runner/work/qiskit/qiskit/.tox/docs/lib/python3.9/site-packages/qiskit/providers/fake_provider/backends_v1/fake_20q'" />
|
||
|
||
### options
|
||
|
||
<Attribute id="qiskit.providers.fake_provider.Fake20QV1.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.Fake20QV1.run "qiskit.providers.fake_provider.Fake20QV1.run") method.
|
||
</Attribute>
|
||
|
||
### props\_filename
|
||
|
||
<Attribute id="qiskit.providers.fake_provider.Fake20QV1.props_filename" attributeValue="'props_singapore.json'" />
|
||
|
||
### version
|
||
|
||
<Attribute id="qiskit.providers.fake_provider.Fake20QV1.version" attributeValue="1" />
|
||
|
||
## Methods
|
||
|
||
### configuration
|
||
|
||
<Function id="qiskit.providers.fake_provider.Fake20QV1.configuration" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/backend.py#L144-L150" signature="configuration()">
|
||
Return the backend configuration.
|
||
|
||
**Returns**
|
||
|
||
the configuration for the backend.
|
||
|
||
**Return type**
|
||
|
||
[BackendConfiguration](qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration")
|
||
</Function>
|
||
|
||
### name
|
||
|
||
<Function id="qiskit.providers.fake_provider.Fake20QV1.name" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/backend.py#L183-L189" signature="name()">
|
||
Return the backend name.
|
||
|
||
**Returns**
|
||
|
||
the name of the backend.
|
||
|
||
**Return type**
|
||
|
||
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")
|
||
</Function>
|
||
|
||
### properties
|
||
|
||
<Function id="qiskit.providers.fake_provider.Fake20QV1.properties" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/fake_provider/fake_qasm_backend.py#L46-L50" signature="properties()">
|
||
Returns a snapshot of device properties
|
||
</Function>
|
||
|
||
### provider
|
||
|
||
<Function id="qiskit.providers.fake_provider.Fake20QV1.provider" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/backend.py#L161-L167" signature="provider()">
|
||
Return the backend Provider.
|
||
|
||
**Returns**
|
||
|
||
the Provider responsible for the backend.
|
||
|
||
**Return type**
|
||
|
||
[Provider](qiskit.providers.Provider "qiskit.providers.Provider")
|
||
</Function>
|
||
|
||
### run
|
||
|
||
<Function id="qiskit.providers.fake_provider.Fake20QV1.run" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/fake_provider/fake_backend.py#L137-L165" signature="run(run_input, **kwargs)">
|
||
Main job in simulator
|
||
</Function>
|
||
|
||
### set\_options
|
||
|
||
<Function id="qiskit.providers.fake_provider.Fake20QV1.set_options" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/backend.py#L125-L142" signature="set_options(**fields)">
|
||
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 "(in Python v3.13)") – If the field passed in is not part of the options
|
||
</Function>
|
||
|
||
### status
|
||
|
||
<Function id="qiskit.providers.fake_provider.Fake20QV1.status" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/backend.py#L169-L181" signature="status()">
|
||
Return the backend status.
|
||
|
||
**Returns**
|
||
|
||
the status of the backend.
|
||
|
||
**Return type**
|
||
|
||
[BackendStatus](qiskit.providers.models.BackendStatus "qiskit.providers.models.BackendStatus")
|
||
</Function>
|
||
</Class>
|
||
|