|
1 | 1 | # This code is part of a Qiskit project.
|
2 | 2 | #
|
3 |
| -# (C) Copyright IBM 2019, 2024. |
| 3 | +# (C) Copyright IBM 2019, 2025. |
4 | 4 | #
|
5 | 5 | # This code is licensed under the Apache License, Version 2.0. You may
|
6 | 6 | # obtain a copy of this license in the LICENSE.txt file in the root directory
|
|
29 | 29 | from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
|
30 | 30 |
|
31 | 31 | from qiskit_ibm_runtime import Session, EstimatorV2
|
| 32 | +from qiskit_ibm_runtime.options import EstimatorOptions, SimulatorOptions |
32 | 33 |
|
33 | 34 | from qiskit_machine_learning.gradients import (
|
34 | 35 | LinCombEstimatorGradient,
|
@@ -461,7 +462,9 @@ class TestEstimatorGradientV2(QiskitAlgorithmsTestCase):
|
461 | 462 | def __init__(self, TestCase):
|
462 | 463 | backend = GenericBackendV2(num_qubits=3, seed=123)
|
463 | 464 | session = Session(backend=backend)
|
464 |
| - self.estimator = EstimatorV2(mode=session) |
| 465 | + simopts = SimulatorOptions(seed_simulator=123) |
| 466 | + estopts = EstimatorOptions(simulator=simopts) |
| 467 | + self.estimator = EstimatorV2(mode=session, options=estopts) |
465 | 468 | self.pass_manager = generate_preset_pass_manager(optimization_level=1, backend=backend)
|
466 | 469 | super().__init__(TestCase)
|
467 | 470 |
|
|
0 commit comments