Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ repos:

## Ensure uv.lock is up to date
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.21
rev: 0.11.23
hooks:
- id: uv-lock
priority: 0
Expand Down Expand Up @@ -112,7 +112,7 @@ repos:

## Format Markdown files with rumdl
- repo: https://github.com/rvben/rumdl-pre-commit
rev: v0.2.18
rev: v0.2.20
hooks:
- id: rumdl
args: [--fix]
Expand Down Expand Up @@ -145,7 +145,7 @@ repos:

## Format and lint Python files with ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.17
rev: v0.15.18
hooks:
- id: ruff-format
types_or: [python, pyi, jupyter, markdown]
Expand All @@ -156,7 +156,7 @@ repos:

## Check Python types with ty
- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.49
rev: v0.0.51
hooks:
- id: ty
args: [--only-dev]
Expand Down
8 changes: 4 additions & 4 deletions bindings/fomac/fomac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,16 @@ All authentication parameters are optional and can be provided as keyword argume
"Returns the sparse probabilities from the job (typically only "
"available from simulator devices).");

job.def_prop_ro("id", &fomac::Session::Job::getId, "Returns the job ID.");
job.def_prop_ro("id", &fomac::Session::Job::getId, "The job ID.");

job.def_prop_ro("program_format", &fomac::Session::Job::getProgramFormat,
"Returns the program format used for the job.");
"The format of the submitted program.");

job.def_prop_ro("program", &fomac::Session::Job::getProgram,
"Returns the quantum program submitted for the job.");
"The submitted program.");

job.def_prop_ro("num_shots", &fomac::Session::Job::getNumShots,
"Returns the number of shots for the job.");
"The number of shots.");

job.def(nb::self == nb::self,
nb::sig("def __eq__(self, arg: object, /) -> bool"));
Expand Down
6 changes: 1 addition & 5 deletions python/mqt/core/_compat/optional.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,7 @@ def disable_locally(self) -> Generator[None, None, None]:

@property
def module_name(self) -> str:
"""Get the module name being tested.

Returns:
The module name string.
"""
"""The name of the module being tested."""
return self._module

def __repr__(self) -> str:
Expand Down
8 changes: 4 additions & 4 deletions python/mqt/core/fomac.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,19 @@ class Job:

@property
def id(self) -> str:
"""Returns the job ID."""
"""The job ID."""

@property
def program_format(self) -> ProgramFormat:
"""Returns the program format used for the job."""
"""The format of the submitted program."""

@property
def program(self) -> str:
"""Returns the quantum program submitted for the job."""
"""The submitted program."""

@property
def num_shots(self) -> int:
"""Returns the number of shots for the job."""
"""The number of shots."""

def __eq__(self, arg: object, /) -> bool: ...
def __ne__(self, arg: object, /) -> bool: ...
Expand Down
8 changes: 4 additions & 4 deletions python/mqt/core/plugins/qiskit/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,22 @@ def __init__(self, device: fomac.Device, provider: QDMIProvider | None = None) -

@property
def target(self) -> Target:
"""Return the Target describing backend capabilities."""
"""The Target describing the capabilities of the backend."""
return self._target

@property
def provider(self) -> Any | None: # noqa: ANN401
"""Return the provider that created this backend."""
"""The provider that created the backend."""
return self._provider

@property
def max_circuits(self) -> int | None:
"""Maximum number of circuits that can be run in a single job."""
"""The maximum number of circuits that can be run in a single job."""
return None # No limit, processed sequentially

@property
def options(self) -> Options:
"""Return backend options."""
"""The backend options."""
return self._options

@classmethod
Expand Down
4 changes: 2 additions & 2 deletions python/mqt/core/plugins/qiskit/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(

@property
def backend(self) -> QDMIBackend:
"""Return the backend used by this estimator."""
"""The backend used by the estimator."""
return self._backend

def run(
Expand Down Expand Up @@ -136,7 +136,7 @@ def _run_pub(self, pub: EstimatorPub) -> PubResult:

# Flatten all combinations of bound circuits and measurement preparations
total_circuits_to_run = []
metadata_map = [] # type: list[tuple[tuple[int, ...], complex, NDArray[np.int_]]]
metadata_map = []

for index in np.ndindex(*bc_bound_circuits.shape):
bound_circuit = bc_bound_circuits[index]
Expand Down
2 changes: 1 addition & 1 deletion python/mqt/core/plugins/qiskit/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(

@property
def backend(self) -> QDMIBackend:
"""Return the backend used by this sampler."""
"""The backend used by the sampler."""
return self._backend

def run(
Expand Down
4 changes: 2 additions & 2 deletions test/python/plugins/qiskit/test_mock_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@ def __init__(self, num_clbits: int, shots: int) -> None:

@property
def id(self) -> str:
"""Return job ID."""
"""The job ID."""
return self._id

@property
def num_shots(self) -> int:
"""Return number of shots."""
"""The number of shots."""
return self._shots

def check(self) -> fomac.Job.Status:
Expand Down
Loading