Add tket transpiler #33
Draft
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.
実装方針まとめ(レビュー用・詳細)
ゴール
「Qiskit と同等に tket をバックエンドとして使える」レベルを Tranqu で実現する。
例(Tranqu 側の利用イメージ)
Qiskit から tket backend を使う
OpenQASM3 から tket を使う
背景(main の現状)
本PRのスコープ(追加/変更)
設計原則(Qiskit と差異を最小化)
tket 側の動作仕様
1) device がある場合(推奨ルート)
採用:
CompilationUnit+backend.default_compilation_pass()get_compiled_circuit()は回路のみで mapping を取れないため採用しない処理イメージ
2) device がない場合
DecomposeBoxes+SynthesiseTket(デフォルト)DecomposeBoxes+FullPeepholeOptimiseoptimization_level の扱い(tket)
共通オプションの扱い(v0 pass-through)
strict_compatを導入して差異を明示化統計 / mapping
n_qubits,n_gates,n_gates_1q,n_gates_2q,depthCompilationUnit.initial_map / final_mapレビュワーに確認したい設計ポイント
DecomposeBoxes+SynthesiseTket(デフォルト)、2 はDecomposeBoxes+FullPeepholeOptimise。この段階分けで妥当か。ValueErrorとして明示的に拒否(tket 標準が 0..2 のため)。互換性の期待値として問題ないか。CompilationUnit+backend.default_compilation_pass()に統一し、get_compiled_circuit()は採用しない方針で問題ないか。公式ドキュメント参照