Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
90ec2cf
🐛 Fix RL Training and Improve Structure (#573)
flowerthrower Mar 11, 2026
4a0ed8d
Merge commit '90ec2cf' into fix-RL-training-bug
flowerthrower May 11, 2026
68eb338
🎨 improve seed and training defaults
flowerthrower May 11, 2026
f9de637
🎨 adjust test step limits
flowerthrower May 11, 2026
55e5e08
⏪ revert unrelated changes
flowerthrower May 11, 2026
ba9042d
🎨 pre-commit fixes
pre-commit-ci[bot] May 11, 2026
dca4827
🎨 improve comments
flowerthrower May 11, 2026
1e523e1
✅ fix synthesis size limit for bqskit passes
flowerthrower May 11, 2026
6d6487a
🎨 pre-commit fixes
pre-commit-ci[bot] May 11, 2026
7a300a2
🎨 reduce test training overhead
flowerthrower May 12, 2026
d64a97f
🎨 add comments
flowerthrower May 12, 2026
9f2697e
🎨 reduce number of training steps
flowerthrower May 12, 2026
f685fdd
🚚 move actions imports
flowerthrower May 12, 2026
74a0f9a
🚚 move parsing logic
flowerthrower May 12, 2026
512d2b0
🎨 add changelog entry
flowerthrower May 12, 2026
c398324
✅ add tests
flowerthrower May 12, 2026
010fa68
🎨 add changelog entry
flowerthrower May 12, 2026
59bdf52
🎨 pre-commit fixes
pre-commit-ci[bot] May 12, 2026
2dd86dd
🔀 pull changes from #679
flowerthrower May 12, 2026
ad83a28
Merge commit '59bdf52374e47aaf2ba6107453430adf37c458b9' into 668-impr…
flowerthrower May 12, 2026
86d078a
🎨 improve docstring
flowerthrower May 12, 2026
788ec25
Merge remote-tracking branch 'origin/main' into fix-RL-training-bug
flowerthrower May 29, 2026
a474a8f
🎨 imporve error reporting
flowerthrower May 29, 2026
51b20af
✅ improve coverage
flowerthrower May 29, 2026
7e9a369
✅ fix test for qiskit<2
flowerthrower Jun 1, 2026
0694749
🎨 pre-commit fixes
pre-commit-ci[bot] Jun 1, 2026
ce7491a
Merge branch 'main' into fix-RL-training-bug
flowerthrower Jun 1, 2026
067c6de
Merge branch 'fix-RL-training-bug' into 668-improve-action-pass-impor…
flowerthrower Jun 1, 2026
59c0beb
✅ fix test
flowerthrower Jun 2, 2026
8b7678b
Merge remote-tracking branch 'origin/main' into 668-improve-action-pa…
flowerthrower Jun 5, 2026
19ed9c1
🎨 imporve changelog
flowerthrower Jun 5, 2026
3d600d1
🎨 pre-commit fixes
pre-commit-ci[bot] Jun 5, 2026
b73c286
🔥 remove GENERAL pass origin
flowerthrower Jun 5, 2026
514acfb
Merge commit '3d600d14576b04dcc29fbaafb5667ae0b7467b6d' into 668-impr…
flowerthrower Jun 5, 2026
95c2f7b
🎨 move validity check into sdk specific modules
flowerthrower Jun 5, 2026
1815f5b
🔥 remove parsing shell module
flowerthrower Jun 5, 2026
7ddf267
🎨 add invariants
flowerthrower Jun 5, 2026
3ec22c7
✅ update tests with individual passes
flowerthrower Jun 5, 2026
32c1edd
🎨 fix changelog
flowerthrower Jun 5, 2026
760fc57
🎨 improve docstrings
flowerthrower Jun 5, 2026
65527f3
Apply suggestions from code review
flowerthrower Jun 5, 2026
4e090ab
Merge commit '65527f3d2121ffb6c58080c3d9e54e12b69072e0' into 668-impr…
flowerthrower Jun 5, 2026
a7f5bc8
🎨 update post-layout in qiskit pass
flowerthrower Jun 5, 2026
a02ecec
🎨 improve test
flowerthrower Jun 5, 2026
9774e4d
🎨 pre-commit fixes
flowerthrower Jun 8, 2026
06f6f61
🎨 comply with goolge docstings
flowerthrower Jun 8, 2026
aa24d03
🎨 calm down rabbit complaining about Arguments
flowerthrower Jun 8, 2026
93a714d
🎨 improve tests
flowerthrower Jun 8, 2026
09389f3
Merge branch 'main' into 668-improve-action-pass-imports-and-wrappers
flowerthrower Jun 8, 2026
69f42b3
🎨 remove import forwarding
flowerthrower Jun 8, 2026
846bb39
🎨 improve tests
flowerthrower Jun 8, 2026
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ venv.bak/
.mypy_cache/

src/**/_version.py

# RL training checkpoints and logs
events.out.*
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning], with the exception that minor rel

### Changed

- ♻️ Restructure existing RL passes into SDK-level action modules ([#680]) ([**@flowerthrower**])
- 🎨 Improve the RL state machine logic ([#677]) ([**@flowerthrower**])
- 🐛 Support BQSKit conversion of IQM's native `r` gate ([#679]) ([**@flowerthrower**])
- 🔧 Replace `mypy` with `ty` ([#572]) ([**@denialhaag**])
Expand Down Expand Up @@ -48,6 +49,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool

<!-- PR links -->

[#680]: https://github.com/munich-quantum-toolkit/predictor/pull/680
[#677]: https://github.com/munich-quantum-toolkit/predictor/pull/677
[#679]: https://github.com/munich-quantum-toolkit/predictor/pull/679
[#572]: https://github.com/munich-quantum-toolkit/predictor/pull/572
Expand Down
2 changes: 1 addition & 1 deletion src/mqt/predictor/hellinger/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def calc_device_specific_features(
) -> NDArray[np.float64]:
"""Creates and returns a device-specific feature vector for a given quantum circuit and device.
Arguments:
Args:
qc: The quantum circuit for which the features are calculated.
device: The device for which the features are calculated.
ignore_gates: A list of gates to be ignored when calculating the features. Defaults to ["barrier", "id", "measure", "if_else"].
Expand Down
2 changes: 1 addition & 1 deletion src/mqt/predictor/ml/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def dict_to_featurevector(gate_dict: dict[str, int]) -> dict[str, int]:
def create_feature_vector(qc: QuantumCircuit) -> list[int | float]:
"""Creates and returns a feature dictionary for a given quantum circuit.
Arguments:
Args:
qc: The quantum circuit to be compiled.
Returns:
Expand Down
16 changes: 8 additions & 8 deletions src/mqt/predictor/ml/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def setup_device_predictor(
) -> bool:
"""Sets up the device predictor for the given figure of merit.

Arguments:
Args:
devices: The devices to be used for training.
figure_of_merit: The figure of merit to be used for training. Defaults to "expected_fidelity".
path_uncompiled_circuits: The path to the directory containing the circuits to be compiled. Defaults to None.
Expand Down Expand Up @@ -127,7 +127,7 @@ def __init__(
) -> None:
"""Initializes the Predictor class.

Arguments:
Args:
figure_of_merit: The figure of merit to be used for training.
devices: The devices to be used for training.
logger_level: The level of the logger. Defaults to logging.INFO.
Expand All @@ -151,7 +151,7 @@ def _compile_all_circuits_devicewise(
) -> None:
"""Compiles all circuits in the given directory with the given timeout and saves them in the given directory.

Arguments:
Args:
device: The device to be used for compilation.
timeout: The timeout in seconds for the compilation of a single circuit.
path_uncompiled_circuits: The path to the directory containing the circuits to be compiled. Defaults to None.
Expand Down Expand Up @@ -204,7 +204,7 @@ def compile_training_circuits(
) -> None:
"""Compiles all circuits in the given directory with the given timeout and saves them in the given directory.

Arguments:
Args:
path_uncompiled_circuits: The path to the directory containing the circuits to be compiled. Defaults to None.
path_compiled_circuits: The path to the directory where the compiled circuits should be saved. Defaults to None.
timeout: The timeout in seconds for the compilation of a single circuit. Defaults to 600.
Expand Down Expand Up @@ -237,7 +237,7 @@ def generate_training_data(
) -> None:
"""Creates and saves training data from all generated training samples.

Arguments:
Args:
path_uncompiled_circuits: The path to the directory containing the uncompiled circuits. Defaults to None.
path_compiled_circuits: The path to the directory containing the compiled circuits. Defaults to None.
path_training_data: The path to the directory where the generated training data should be saved. Defaults to None.
Expand Down Expand Up @@ -295,7 +295,7 @@ def _generate_training_sample(
) -> tuple[tuple[list[Any], Any], str, list[float]]:
"""Handles to create a training sample from a given file.

Arguments:
Args:
file: The name of the file to be used for training.
path_uncompiled_circuit: The path to the directory containing the uncompiled circuits. Defaults to None.
path_compiled_circuits: The path to the directory containing the compiled circuits. Defaults to None.
Expand Down Expand Up @@ -365,7 +365,7 @@ def train_random_forest_model(
) -> RandomForestRegressor | RandomForestClassifier:
"""Trains a random forest model for the given figure of merit.

Arguments:
Args:
training_data: The training data to be used for training the model. If None, the training data is loaded from the pre-prepared training data files.

Returns:
Expand Down Expand Up @@ -453,7 +453,7 @@ def predict_device_for_figure_of_merit(
) -> Target:
"""Returns the probabilities for all supported quantum devices to be the most suitable one for the given quantum circuit.

Arguments:
Args:
qc: The QuantumCircuit or Path to the respective qasm file.
figure_of_merit: The figure of merit to be used for compilation.

Expand Down
2 changes: 1 addition & 1 deletion src/mqt/predictor/qcompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def qcompile(
) -> tuple[QuantumCircuit, list[str], str]:
"""Compiles a given quantum circuit to a device with the highest predicted figure of merit.
Arguments:
Args:
qc: The quantum circuit to be compiled.
figure_of_merit: The figure of merit to be used for compilation. Defaults to "expected_fidelity".
Expand Down
8 changes: 4 additions & 4 deletions src/mqt/predictor/reward.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def crit_depth(qc: QuantumCircuit, precision: int = 10) -> float:
def expected_fidelity(qc: QuantumCircuit, device: Target, precision: int = 10) -> float:
"""Calculates the expected fidelity of a given quantum circuit on a given device.

Arguments:
Args:
qc: The quantum circuit to be compiled.
device: The device to be used for compilation.
precision: The precision of the returned value. Defaults to 10.
Expand Down Expand Up @@ -83,7 +83,7 @@ def estimated_success_probability(qc: QuantumCircuit, device: Target, precision:
It is calculated by multiplying the expected fidelity with a min(T1,T2)-dependent
decay factor during qubit idle times. To this end, the circuit is scheduled using ASAP scheduling.

Arguments:
Args:
qc: The quantum circuit to be compiled.
device: The device to be used for compilation.
precision: The precision of the returned value. Defaults to 10.
Expand Down Expand Up @@ -210,7 +210,7 @@ def estimated_success_probability(qc: QuantumCircuit, device: Target, precision:
def esp_data_available(device: Target) -> bool:
"""Check if calibration data to calculate ESP is available for the device.

Arguments:
Args:
device: The device to be checked for calibration data.

Returns:
Expand Down Expand Up @@ -310,7 +310,7 @@ def estimated_hellinger_distance(
) -> float:
"""Calculates the estimated Hellinger distance of a given quantum circuit on a given device.

Arguments:
Args:
qc: The quantum circuit to be compiled.
device: The device to be used for compilation.
model: The pre-trained model to use for prediction (optional). If not provided, the model will try to be loaded from files.
Expand Down
Loading
Loading