Skip to content

Commit 36692a5

Browse files
committed
chore: Use updated application.properties and venv
1 parent 0a0a49a commit 36692a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/edu/kit/provideq/toolbox/demonstrators/MoleculeEnergySimulator.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,19 @@
2121
@Component
2222
public class MoleculeEnergySimulator implements Demonstrator {
2323
private final String scriptPath;
24+
private final String venv;
2425
private final ApplicationContext context;
2526

2627
private static final String SETTING_MOLECULE = "Molecule";
2728
private static final String DEFAULT_MOLECULE = "H .0 .0 .0; H .0 .0 0.74279";
2829

2930
@Autowired
3031
public MoleculeEnergySimulator(
31-
@Value("${demonstrators.qiskit.script.molecule-energy}") String scriptPath,
32+
@Value("${path.demonstrators.qiskit.molecule-energy}") String scriptPath,
33+
@Value("${venv.demonstrators.qiskit.molecule-energy}") String venv,
3234
ApplicationContext context) {
3335
this.scriptPath = scriptPath;
36+
this.venv = venv;
3437
this.context = context;
3538
}
3639

@@ -66,7 +69,7 @@ public Mono<Solution<String>> solve(String input, SubRoutineResolver subRoutineR
6669
.orElse(DEFAULT_MOLECULE);
6770

6871
var processResult = context
69-
.getBean(PythonProcessRunner.class, scriptPath)
72+
.getBean(PythonProcessRunner.class, scriptPath, venv)
7073
.withArguments(molecule)
7174
.readOutputString()
7275
.run(getProblemType(), solution.getId());

0 commit comments

Comments
 (0)