Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extras = [
"clifford.rb_default" = "qiskit_experiments.library.randomized_benchmarking.clifford_synthesis:RBDefaultCliffordSynthesis"

[dependency-groups]
formatting = ["black~=22.0"]
formatting = ["black~=25.1"]
devbase = []
testing = [
{include-group = "devbase"},
Expand Down Expand Up @@ -89,8 +89,7 @@ docs = [
]
linting = [
# Linters
"pylint~=3.3.1",
"astroid~=3.3.4", # Must be kept aligned to what pylint wants
"pylint~=4.0.3",
# Test dependencies needed because the test files are linted
{include-group = "testing"},
]
Expand Down
2 changes: 1 addition & 1 deletion qiskit_experiments/curve_analysis/base_curve_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def _default_options(cls) -> Options:
database as a dedicated entry. This is a list of parameter representation
which is either string or ParameterRepr object. If you provide more
information other than name, you can specify
``[ParameterRepr("alpha", "\u03B1", "a.u.")]`` for example.
``[ParameterRepr("alpha", "\u03b1", "a.u.")]`` for example.
The parameter name should be defined in the series definition.
Representation should be printable in standard output, i.e. no latex syntax.
extra (Dict[str, Any]): A dictionary that is appended to all database entries
Expand Down
4 changes: 2 additions & 2 deletions qiskit_experiments/curve_analysis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ def _format_val(value):
if result.value.std_dev is not None and np.isfinite(result.value.std_dev):
s_repr, s_unit = _format_val(result.value.std_dev)
if n_unit == s_unit:
value_repr = f" {n_repr} \u00B1 {s_repr}{n_unit}"
value_repr = f" {n_repr} \u00b1 {s_repr}{n_unit}"
else:
value_repr = f" {n_repr + n_unit} \u00B1 {s_repr + s_unit}"
value_repr = f" {n_repr + n_unit} \u00b1 {s_repr + s_unit}"
else:
value_repr = n_repr + n_unit

Expand Down
4 changes: 2 additions & 2 deletions qiskit_experiments/framework/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ def _write_deprecation_msg(
removal_timeline: str,
) -> tuple[str, Type[DeprecationWarning] | Type[PendingDeprecationWarning]]:
if pending:
category: Type[DeprecationWarning] | Type[
category: Type[DeprecationWarning] | Type[PendingDeprecationWarning] = (
PendingDeprecationWarning
] = PendingDeprecationWarning
)
deprecation_status = "pending deprecation"
removal_desc = f"marked deprecated in a future release, and then removed {removal_timeline}"
else:
Expand Down
5 changes: 4 additions & 1 deletion qiskit_experiments/framework/experiment_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,10 @@ def add_figures(
else:
fig_name = figure_names[idx]
if not fig_name.endswith(".svg"):
LOG.info("File name %s does not have an SVG extension. A '.svg' is added.")
LOG.info(
"File name %s does not have an SVG extension. A '.svg' is added.",
fig_name,
)
fig_name += ".svg"

existing_figure = fig_name in self._figures
Expand Down
3 changes: 1 addition & 2 deletions qiskit_experiments/library/quantum_volume/qv_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ def _calc_ideal_heavy_output(probabilities_vector, depth):
format_spec = f"{{0:0{depth}b}}"
# Keys are bit strings and values are probabilities of observing those strings
all_output_prob_ideal = {
format_spec.format(b): float(np.real(probabilities_vector[b]))
for b in range(2**depth)
format_spec.format(b): float(np.real(probabilities_vector[b])) for b in range(2**depth)
}

median_probabilities = float(np.real(np.median(probabilities_vector)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@

There are a few built-in options for the Clifford synthesis method:

* ``rb_default`` (default) for n<=2 Cliffords this methods will transpile using ``optimization_level=1``.
* ``rb_default`` (default) for n<=2 Cliffords this methods will transpile using ``optimization_level=1``.
For 3 or more qubits the behavior is similar but a custom transpilation sequence is used to avoid
the transpiler changing the layout of the circuit.

* ``clifford_synthesis_method='basis_only'`` will use ``optimization_level=0``.

* ``clifford_synthesis_method='1Q_fixed`` will use a ``rz-sx-rz-sx-rz`` decomposition for the 1Q
Cliffords and the default for the 2Q cliffords. This is most relevant for :class:`.LayerFidelity`
* ``clifford_synthesis_method='1Q_fixed`` will use a ``rz-sx-rz-sx-rz`` decomposition for the 1Q
Cliffords and the default for the 2Q cliffords. This is most relevant for :class:`.LayerFidelity`
experiments because it will keep a fixed structure.

"""
Expand Down
5 changes: 4 additions & 1 deletion test/database_service/test_fake_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ def test_creation(self):

def test_query_for_single(self):
"""Test FakeService methods experiment and analysis_result"""
for (query_method, reference_dict,) in zip(
for (
query_method,
reference_dict,
) in zip(
[self.service.experiment, self.service.analysis_result], [self.expdict, self.resdict]
):
for id_value in range(len(reference_dict)):
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ commands =
python -m build -o .tox/dist

[testenv:cover]
basepython = python3
setenv =
{[testenv]setenv}
PYTHON=coverage3 run --source qiskit_experiments --parallel-mode
Expand Down