Skip to content

Commit

Permalink
Fix docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
rathishcholarajan committed Apr 6, 2022
1 parent 00eb6d5 commit db6b498
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 8 deletions.
8 changes: 8 additions & 0 deletions qiskit_ibm_provider/ibm_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,14 @@ def qubit_properties(
self, qubit: Union[int, List[int]]
) -> Union[QubitProperties, List[QubitProperties]]:
"""Return QubitProperties for a given qubit.
Args:
qubit: The qubit to get the
:class:`~qiskit.provider.QubitProperties` object for. This can
be a single integer for 1 qubit or a list of qubits and a list
of :class:`~qiskit.provider.QubitProperties` objects will be
returned in the same order
Returns:
QubitProperties or a list of QubitProperties
"""
Expand Down Expand Up @@ -881,32 +883,38 @@ def configuration(

def drive_channel(self, qubit: int) -> DriveChannel:
"""Return the drive channel for the given qubit.
Returns:
DriveChannel: The Qubit drive channel
"""
return self._configuration.drive(qubit=qubit)

def measure_channel(self, qubit: int) -> MeasureChannel:
"""Return the measure stimulus channel for the given qubit.
Returns:
MeasureChannel: The Qubit measurement stimulus line
"""
return self._configuration.measure(qubit=qubit)

def acquire_channel(self, qubit: int) -> AcquireChannel:
"""Return the acquisition channel for the given qubit.
Returns:
AcquireChannel: The Qubit measurement acquisition line.
"""
return self._configuration.acquire(qubit=qubit)

def control_channel(self, qubits: Iterable[int]) -> List[ControlChannel]:
"""Return the secondary drive channel for the given qubit.
This is typically utilized for controlling multiqubit interactions.
This channel is derived from other channels.
Args:
qubits: Tuple or list of qubits of the form
``(control_qubit, target_qubit)``.
Returns:
List[ControlChannel]: The Qubit measurement acquisition line.
"""
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/jupyter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

from IPython import get_ipython # pylint: disable=import-error
from .dashboard.dashboard import IBMDashboardMagic
from qiskit.test.mock import FakeBackend
from qiskit.test.mock import FakeBackendV2 as FakeBackend
from ..ibm_backend import IBMBackend
from .backend_info import backend_widget

Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/jupyter/backend_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import ipyvuetify as vue
from IPython.display import display # pylint: disable=import-error
from qiskit.test.mock.fake_backend import FakeBackend
from qiskit.test.mock import FakeBackendV2 as FakeBackend

from qiskit_ibm_provider.ibm_backend import IBMBackend
from .config_widget import config_tab
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/jupyter/config_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing import Union

import ipywidgets as wid
from qiskit.test.mock.fake_backend import FakeBackend
from qiskit.test.mock import FakeBackendV2 as FakeBackend

from qiskit_ibm_provider.ibm_backend import IBMBackend
from qiskit_ibm_provider.utils.converters import duration_difference
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/jupyter/gates_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from typing import Union

import ipywidgets as wid
from qiskit.test.mock.fake_backend import FakeBackend
from qiskit.test.mock import FakeBackendV2 as FakeBackend

from qiskit_ibm_provider.ibm_backend import IBMBackend

Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/jupyter/jobs_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import ipywidgets as wid
import plotly.graph_objects as go
from qiskit.test.mock.fake_backend import FakeBackend
from qiskit.test.mock import FakeBackendV2 as FakeBackend

from ..ibm_backend import IBMBackend
from ..visualization.interactive.plotly_wrapper import PlotlyWidget
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/jupyter/live_data_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import numpy as np
from sklearn.decomposition import PCA
from qiskit.providers.jobstatus import JobStatus
from qiskit.test.mock.fake_backend import FakeBackend
from qiskit.test.mock import FakeBackendV2 as FakeBackend

# PLOTS
ENABLE_LEVEL_0 = False
Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/jupyter/qubits_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing import Union

import ipywidgets as wid
from qiskit.test.mock.fake_backend import FakeBackend
from qiskit.test.mock import FakeBackendV2 as FakeBackend

from qiskit_ibm_provider.ibm_backend import IBMBackend

Expand Down
2 changes: 1 addition & 1 deletion qiskit_ibm_provider/jupyter/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from datetime import datetime, timedelta
from typing import Optional, Union

from qiskit.test.mock.fake_backend import FakeBackend
from qiskit.test.mock import FakeBackendV2 as FakeBackend

from qiskit_ibm_provider.backendreservation import BackendReservation
from qiskit_ibm_provider.ibm_backend import IBMBackend
Expand Down
4 changes: 4 additions & 0 deletions releasenotes/notes/backend-v2-2166235edb1f4de7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ upgrade:
:class:`qiskit_ibm_provider.IBMBackend` class now implements the
:class:`qiskit.providers.BackendV2` interface and provides flatter access to the configuration
of a backend, for example::
# BackendV1:
backend.configuration().n_qubits
# BackendV2:
backend.num_qubits
Only breaking change when compared to `BackendV1` is backend.name is now an attribute
instead of a method.
Refer to the :class:`qiskit_ibm_provider.IBMBackend` class doc string for a list of all
available attributes.

0 comments on commit db6b498

Please sign in to comment.