-
Notifications
You must be signed in to change notification settings - Fork 1
Circuit processing #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ekulos-code
wants to merge
46
commits into
develop
Choose a base branch
from
circuit-processing
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Circuit processing #133
Changes from 5 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
1684491
Add basic structure for OpenQASM processing
ekulos-code ffe94da
Merge branch 'develop' into circuit-processing
ekulos-code 57e8ca0
Add execution and optimization solvers
ekulos-code b170c29
Merge branch 'develop' into circuit-processing
ekulos-code a7f335e
Merge dev, account for checkstyle errors
ekulos-code 1d63db9
feat: Update python process runner to execute via venv
Elscrux 4777948
feat: Restructure requirement files
Elscrux 4657c1c
feat: Restructure application.properties and pass venv to python proc…
Elscrux 7dad51f
chore: Update miniconda version
Elscrux f365a53
debug
Elscrux 49db2e6
feat: Make api token setting required
Elscrux 1194926
Merge pull request #134 from ProvideQ/feat/required-settings
koalamitice c8458e7
Implement suggestions
ekulos-code a765973
fix: changed cirq version because the defined one was not available o…
koalamitice 7b9277c
fix: checkstyle issues
koalamitice 383b9d6
fix: another checkstyle error
koalamitice be29e7c
fix: added command to Dockerfile to ensure that ganak binaries are ex…
koalamitice 6a4fa5d
fix: testing new GAMS version
koalamitice 771e17c
fix: removed chmod from dockerfile and applied it directly to solvers
koalamitice b5cd884
fix: improved error messages for testing / only print problem states …
koalamitice cf64b9a
fix: checkstyle issue
koalamitice 56febe6
fix: mentioned qiskit version explicitly because qiskit 2.0 does not …
koalamitice 5ee7eb6
fix: added networkx python dependency to gams setup, removed gams req…
koalamitice b5f70d1
fix: updated gams-maxcut cholesky transformation calls
koalamitice dc765c8
fix: trying some minor changes in maxcut gams script
koalamitice 6e5940b
fix: added exit to script to enforce ci pipeline failure when venv se…
koalamitice c238a4d
add: caching for gradle and venv dependencies
koalamitice 1e2a839
fix: fixed paths in caching jobs, removed unnecessary debug output
koalamitice ad3af91
fix: gradle path for caching
koalamitice 5b6b878
fix: removed gradle caching for now
koalamitice 89acbe9
feat: Make api token setting required
Elscrux 3b6a049
chore: adjusted readme for new venv installation, added python instal…
koalamitice 3c47662
fix: changed python version naming
koalamitice 600ff25
fix: reverted ci pipeline change
koalamitice 10fca2d
Merge pull request #137 from ProvideQ/feat/python-venvs
koalamitice ab60556
docs: Update path
Elscrux 4873ec2
refactor: Use demonstrator specific application property names for cp…
Elscrux 53aa6c8
updated release version
koalamitice 7687633
Merge pull request #139 from ProvideQ/release/0.4.1
koalamitice e803a09
Merge pull request #140 from ProvideQ/main
koalamitice 6f632d7
Add basic structure for OpenQASM processing
ekulos-code d36e66f
Add execution and optimization solvers
ekulos-code 0cb9b38
Merge dev, account for checkstyle errors
ekulos-code 347d7be
Implement suggestions
ekulos-code 4b52ab3
Merge remote-tracking branch 'origin/circuit-processing' into circuit…
ekulos-code 0ca1d22
Preliminary migration for circuit processing to venvs
ekulos-code File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
solvers/circuitoptimizing/decompose-multi-cx/decompose_multi_cx_optimizer.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import sys | ||
| from pytket.qasm import circuit_from_qasm_str, circuit_to_qasm_str | ||
| from pytket.predicates import CompilationUnit | ||
| from pytket.passes import DecomposeMultiQubitsCX | ||
|
|
||
|
|
||
| input_circuit = sys.argv[1] | ||
|
|
||
| try: | ||
| circuit = circuit_from_qasm_str(input_circuit) | ||
| except Exception as e: | ||
| print("Was not able to convert to OpenQASM: ", e) | ||
| sys.exit(1) | ||
|
|
||
| pass1 = DecomposeMultiQubitsCX() | ||
| cu = CompilationUnit(circuit) | ||
| pass1.apply(cu) | ||
|
|
||
| print(circuit_to_qasm_str(cu.circuit)) | ||
19 changes: 19 additions & 0 deletions
19
solvers/circuitoptimizing/remove-redundancies/remove_redundancies_optimizer.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import sys | ||
| from pytket.qasm import circuit_from_qasm_str, circuit_to_qasm_str | ||
| from pytket.predicates import CompilationUnit | ||
| from pytket.passes import RemoveRedundancies | ||
|
|
||
|
|
||
| input_circuit = sys.argv[1] | ||
|
|
||
| try: | ||
| circuit = circuit_from_qasm_str(input_circuit) | ||
| except Exception as e: | ||
| print("Was not able to convert to OpenQASM: ", e) | ||
| sys.exit(1) | ||
|
|
||
| pass1 = RemoveRedundancies() | ||
| cu = CompilationUnit(circuit) | ||
| pass1.apply(cu) | ||
|
|
||
| print(circuit_to_qasm_str(cu.circuit)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import sys | ||
| from pytket.qasm import circuit_from_qasm_str | ||
| from pytket.extensions.qiskit import AerBackend | ||
|
|
||
| from qiskit_aer.noise import NoiseModel | ||
| from qiskit_aer.noise.errors import depolarizing_error | ||
|
|
||
| input_circuit = sys.argv[1] | ||
| shots = sys.argv[2] | ||
|
|
||
| try: | ||
| circuit = circuit_from_qasm_str(input_circuit) | ||
| except Exception as e: | ||
| print("Was not able to convert to OpenQASM: ", e) | ||
| sys.exit(1) | ||
|
|
||
| # https://docs.quantinuum.com/tket/user-guide/manual/manual_noise.html | ||
| noise_model = NoiseModel() | ||
| noise_model.add_readout_error([[0.9, 0.1],[0.1, 0.9]], [0]) | ||
| noise_model.add_readout_error([[0.95, 0.05],[0.05, 0.95]], [1]) | ||
| noise_model.add_quantum_error(depolarizing_error(0.1, 2), ["cx"], [0, 1]) | ||
|
|
||
| backend = AerBackend(noise_model) | ||
| c = backend.get_compiled_circuit(circuit) | ||
| handle = backend.process_circuit(c, n_shots=int(shots)) | ||
| counts = backend.get_result(handle).get_counts() | ||
| print(counts) |
18 changes: 18 additions & 0 deletions
18
solvers/circuitprocessing/default-executor/default_executor.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import sys | ||
| from pytket.qasm import circuit_from_qasm_str | ||
| from pytket.extensions.qiskit import AerBackend | ||
|
|
||
| input_circuit = sys.argv[1] | ||
| shots = int(sys.argv[2]) | ||
|
|
||
| try: | ||
| circuit = circuit_from_qasm_str(input_circuit) | ||
| except Exception as e: | ||
| print("Was not able to convert to OpenQASM: ", e) | ||
| sys.exit(1) | ||
|
|
||
| backend = AerBackend() | ||
| c = backend.get_compiled_circuit(circuit) | ||
| handle = backend.process_circuit(c, n_shots=shots) | ||
| counts = backend.get_result(handle).get_counts() | ||
| print(counts) |
17 changes: 17 additions & 0 deletions
17
solvers/circuitprocessing/projectq-executor/projectq_executor.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import sys | ||
| from pytket.qasm import circuit_from_qasm_str | ||
| from pytket.extensions.projectq import ProjectQBackend | ||
|
|
||
| input_circuit = sys.argv[1] | ||
| shots = int(sys.argv[2]) | ||
|
|
||
| try: | ||
| circuit = circuit_from_qasm_str(input_circuit) | ||
| except Exception as e: | ||
| print("Was not able to convert to OpenQASM: ", e) | ||
| sys.exit(1) | ||
|
|
||
| backend = ProjectQBackend() | ||
ekulos-code marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| handle = backend.process_circuit(circuit, n_shots=shots) | ||
| result = backend.get_result(handle) | ||
| print(result.get_shots()) | ||
18 changes: 18 additions & 0 deletions
18
solvers/circuitprocessing/qulacs-executor/qulacs_executor.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import sys | ||
| from pytket.qasm import circuit_from_qasm_str | ||
| from pytket.extensions.qulacs import QulacsBackend | ||
|
|
||
| input_circuit = sys.argv[1] | ||
| shots = int(sys.argv[2]) | ||
|
|
||
| try: | ||
| circuit = circuit_from_qasm_str(input_circuit) | ||
| except Exception as e: | ||
| print("Was not able to convert to OpenQASM: ", e) | ||
| sys.exit(1) | ||
|
|
||
| backend = QulacsBackend() | ||
| c = backend.get_compiled_circuit(circuit) | ||
| handle = backend.process_circuit(c, n_shots=shots) | ||
| counts = backend.get_result(handle).get_counts() | ||
| print(counts) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| pytket | ||
| pytket-qiskit | ||
| pytket-pyquil | ||
| pytket-projectq | ||
| pytket-qulacs |
55 changes: 55 additions & 0 deletions
55
...main/java/edu/kit/provideq/toolbox/circuit/processing/CircuitProcessingConfiguration.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| package edu.kit.provideq.toolbox.circuit.processing; | ||
|
|
||
| import edu.kit.provideq.toolbox.circuit.processing.solver.MoveToExecutionSolver; | ||
| import edu.kit.provideq.toolbox.circuit.processing.solver.MoveToMitigationSolver; | ||
| import edu.kit.provideq.toolbox.circuit.processing.solver.MoveToOptimizationSolver; | ||
| import edu.kit.provideq.toolbox.meta.Problem; | ||
| import edu.kit.provideq.toolbox.meta.ProblemManager; | ||
| import edu.kit.provideq.toolbox.meta.ProblemType; | ||
| import java.util.Set; | ||
| import org.springframework.context.annotation.Bean; | ||
| import org.springframework.context.annotation.Configuration; | ||
|
|
||
| @Configuration | ||
| public class CircuitProcessingConfiguration { | ||
| public static final ProblemType<String, String> CIRCUIT_PROCESSING = new ProblemType<>( | ||
| "circuit-processing", | ||
| String.class, | ||
| String.class | ||
| ); | ||
|
|
||
| @Bean | ||
| ProblemManager<String, String> getCircuitProcessingManager( | ||
| MoveToExecutionSolver moveToExecutionSolver, | ||
| MoveToOptimizationSolver moveToOptimizationSolver, | ||
| MoveToMitigationSolver moveToMitigationSolver | ||
| ) { | ||
| Problem<String, String> demo = new Problem<>(CIRCUIT_PROCESSING); | ||
| demo.setInput(""" | ||
| OPENQASM 2.0; | ||
| include "qelib1.inc"; | ||
| qreg q[2]; | ||
| creg c[2]; | ||
| h q[0]; | ||
| cx q[0],q[1]; | ||
| measure q[0] -> c[0]; | ||
| measure q[1] -> c[1];"""); | ||
| Problem<String, String> secondDemo = new Problem<>(CIRCUIT_PROCESSING); | ||
| secondDemo.setInput(""" | ||
| OPENQASM 2.0; | ||
| include "qelib1.inc"; | ||
| qreg q[3]; | ||
| crz(0.5) q[0], q[1]; | ||
| t q[2]; | ||
| cswap q[2], q[0], q[1];"""); | ||
| return new ProblemManager<>( | ||
| CIRCUIT_PROCESSING, | ||
| Set.of( | ||
| moveToExecutionSolver, | ||
| moveToOptimizationSolver, | ||
| moveToMitigationSolver | ||
| ), | ||
| Set.of(demo, secondDemo) | ||
| ); | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
...main/java/edu/kit/provideq/toolbox/circuit/processing/solver/CircuitProcessingSolver.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package edu.kit.provideq.toolbox.circuit.processing.solver; | ||
|
|
||
| import edu.kit.provideq.toolbox.circuit.processing.CircuitProcessingConfiguration; | ||
| import edu.kit.provideq.toolbox.meta.ProblemSolver; | ||
| import edu.kit.provideq.toolbox.meta.ProblemType; | ||
| import edu.kit.provideq.toolbox.meta.SubRoutineDefinition; | ||
|
|
||
| public abstract class CircuitProcessingSolver implements ProblemSolver<String, String> { | ||
| public static final SubRoutineDefinition<String, String> CIRCUIT_PROCESSING_SUBROUTINE = | ||
| new SubRoutineDefinition<>( | ||
| CircuitProcessingConfiguration.CIRCUIT_PROCESSING, | ||
| "Creates a circuit processing solver" | ||
| ); | ||
|
|
||
| @Override | ||
| public ProblemType<String, String> getProblemType() { | ||
| return CircuitProcessingConfiguration.CIRCUIT_PROCESSING; | ||
| } | ||
| } |
57 changes: 57 additions & 0 deletions
57
src/main/java/edu/kit/provideq/toolbox/circuit/processing/solver/MoveToExecutionSolver.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| package edu.kit.provideq.toolbox.circuit.processing.solver; | ||
|
|
||
| import edu.kit.provideq.toolbox.Solution; | ||
| import edu.kit.provideq.toolbox.SolutionStatus; | ||
| import edu.kit.provideq.toolbox.circuit.processing.solver.executor.ExecutionResult; | ||
| import edu.kit.provideq.toolbox.circuit.processing.solver.executor.ExecutorConfiguration; | ||
| import edu.kit.provideq.toolbox.meta.SolvingProperties; | ||
| import edu.kit.provideq.toolbox.meta.SubRoutineDefinition; | ||
| import edu.kit.provideq.toolbox.meta.SubRoutineResolver; | ||
| import java.util.List; | ||
| import org.springframework.stereotype.Component; | ||
| import reactor.core.publisher.Mono; | ||
|
|
||
| @Component | ||
| public class MoveToExecutionSolver extends CircuitProcessingSolver { | ||
| private static final SubRoutineDefinition<String, ExecutionResult> EXECUTOR_SUBROUTINE = | ||
| new SubRoutineDefinition<>( | ||
| ExecutorConfiguration.EXECUTOR_CONFIG, | ||
| "Creates a execution solver" | ||
| ); | ||
|
|
||
| @Override | ||
| public String getName() { | ||
| return "Execute QASM Code"; | ||
| } | ||
|
|
||
| @Override | ||
| public String getDescription() { | ||
| return "Move QASM input to the executors"; | ||
| } | ||
|
|
||
| @Override | ||
| public List<SubRoutineDefinition<?, ?>> getSubRoutines() { | ||
| return List.of(EXECUTOR_SUBROUTINE); | ||
| } | ||
|
|
||
| @Override | ||
| public Mono<Solution<String>> solve( | ||
| String input, | ||
| SubRoutineResolver subRoutineResolver, | ||
| SolvingProperties properties | ||
| ) { | ||
| return subRoutineResolver.runSubRoutine(EXECUTOR_SUBROUTINE, input) | ||
| .map(executionResultSolution -> { | ||
| Solution<String> solution = new Solution<>(this); | ||
| SolutionStatus status = executionResultSolution.getStatus(); | ||
| if (status == SolutionStatus.ERROR) { | ||
| solution.fail(); | ||
| solution.setDebugData(executionResultSolution.getDebugData()); | ||
| return solution; | ||
| } | ||
| solution.complete(); | ||
| solution.setSolutionData(executionResultSolution.getSolutionData().toString()); | ||
| return solution; | ||
| }); | ||
| } | ||
| } |
43 changes: 43 additions & 0 deletions
43
src/main/java/edu/kit/provideq/toolbox/circuit/processing/solver/MoveToMitigationSolver.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| package edu.kit.provideq.toolbox.circuit.processing.solver; | ||
|
|
||
| import edu.kit.provideq.toolbox.Solution; | ||
| import edu.kit.provideq.toolbox.circuit.processing.solver.mitigation.ErrorMitigationConfiguration; | ||
| import edu.kit.provideq.toolbox.meta.SolvingProperties; | ||
| import edu.kit.provideq.toolbox.meta.SubRoutineDefinition; | ||
| import edu.kit.provideq.toolbox.meta.SubRoutineResolver; | ||
| import java.util.List; | ||
| import org.springframework.stereotype.Component; | ||
| import reactor.core.publisher.Mono; | ||
|
|
||
| @Component | ||
| public class MoveToMitigationSolver extends CircuitProcessingSolver { | ||
| private static final SubRoutineDefinition<String, String> MITIGATOR_SUBROUTINE = | ||
| new SubRoutineDefinition<>( | ||
| ErrorMitigationConfiguration.MITIGATION_CONFIG, | ||
| "Creates a mitigation solver" | ||
| ); | ||
|
|
||
| @Override | ||
| public String getName() { | ||
| return "Mitigate QASM Code Errors"; | ||
| } | ||
|
|
||
| @Override | ||
| public String getDescription() { | ||
| return "Move QASM input to the error mitigators"; | ||
| } | ||
|
|
||
| @Override | ||
| public List<SubRoutineDefinition<?, ?>> getSubRoutines() { | ||
| return List.of(MITIGATOR_SUBROUTINE); | ||
| } | ||
|
|
||
| @Override | ||
| public Mono<Solution<String>> solve( | ||
| String input, | ||
| SubRoutineResolver subRoutineResolver, | ||
| SolvingProperties properties | ||
| ) { | ||
| return subRoutineResolver.runSubRoutine(MITIGATOR_SUBROUTINE, input); | ||
| } | ||
| } |
43 changes: 43 additions & 0 deletions
43
...ain/java/edu/kit/provideq/toolbox/circuit/processing/solver/MoveToOptimizationSolver.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| package edu.kit.provideq.toolbox.circuit.processing.solver; | ||
|
|
||
| import edu.kit.provideq.toolbox.Solution; | ||
| import edu.kit.provideq.toolbox.circuit.processing.solver.optimization.OptimizationConfiguration; | ||
| import edu.kit.provideq.toolbox.meta.SolvingProperties; | ||
| import edu.kit.provideq.toolbox.meta.SubRoutineDefinition; | ||
| import edu.kit.provideq.toolbox.meta.SubRoutineResolver; | ||
| import java.util.List; | ||
| import org.springframework.stereotype.Component; | ||
| import reactor.core.publisher.Mono; | ||
|
|
||
| @Component | ||
| public class MoveToOptimizationSolver extends CircuitProcessingSolver { | ||
| private static final SubRoutineDefinition<String, String> OPTIMIZER_SUBROUTINE = | ||
| new SubRoutineDefinition<>( | ||
| OptimizationConfiguration.OPTIMIZATION_CONFIG, | ||
| "Creates a optimization solver" | ||
| ); | ||
|
|
||
| @Override | ||
| public String getName() { | ||
| return "Optimize QASM Code"; | ||
| } | ||
|
|
||
| @Override | ||
| public String getDescription() { | ||
| return "Move QASM input to the optimizers"; | ||
| } | ||
|
|
||
| @Override | ||
| public List<SubRoutineDefinition<?, ?>> getSubRoutines() { | ||
| return List.of(OPTIMIZER_SUBROUTINE); | ||
| } | ||
|
|
||
| @Override | ||
| public Mono<Solution<String>> solve( | ||
| String input, | ||
| SubRoutineResolver subRoutineResolver, | ||
| SolvingProperties properties | ||
| ) { | ||
| return subRoutineResolver.runSubRoutine(OPTIMIZER_SUBROUTINE, input); | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
...ain/java/edu/kit/provideq/toolbox/circuit/processing/solver/executor/ExecutionResult.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package edu.kit.provideq.toolbox.circuit.processing.solver.executor; | ||
|
|
||
| import java.util.Optional; | ||
|
|
||
| public record ExecutionResult(Optional<String> resultString, Optional<String> circuit) { | ||
| public boolean hasResult() { | ||
| return resultString.isPresent(); | ||
| } | ||
|
|
||
| public boolean hasCircuit() { | ||
| return circuit.isPresent(); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment about all the optimizers: As our current optimizers all come from Tket we have a lot of duplicated code fragments when building the architecture/packages like you did.
Maybe it would be better to have only one Python Script that implements all Tket passes that we support.
The server can pass the pass that should be applied via an argument.
You can make the directory strucutre like "solvers/circuitoptimizing/tket/"
This way we only have one bigger tket Python script, instead of one for every pass. Makes it easier to maintain.