From bb45e6afb39cde220aa1f0d5e7abfc2b22898b5c Mon Sep 17 00:00:00 2001 From: sjdilkes Date: Wed, 31 Jan 2024 09:47:00 +0000 Subject: [PATCH] add type declarations --- tket/include/tket/Circuit/PauliExpBoxes.hpp | 10 +++++----- tket/src/Circuit/PauliExpBoxes.cpp | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/tket/include/tket/Circuit/PauliExpBoxes.hpp b/tket/include/tket/Circuit/PauliExpBoxes.hpp index 3b0207b302..325828f577 100644 --- a/tket/include/tket/Circuit/PauliExpBoxes.hpp +++ b/tket/include/tket/Circuit/PauliExpBoxes.hpp @@ -238,20 +238,20 @@ class TermSequenceBox : public Box { /** Get the circuit synthesis strategy parameter (affects box decomposition) */ - auto get_synth_strategy() const; + Transforms::PauliSynthStrat get_synth_strategy() const; /** Get the pauli partitioning strategy parameter (affects box decomposition) */ - auto get_partition_strategy() const; + PauliPartitionStrat get_partition_strategy() const; /** Get the graph colouring parameter (affects box decomposition) */ - auto get_graph_colouring() const; + GraphColourMethod get_graph_colouring() const; /** Get the pauli gadgets */ - auto get_pauli_gadgets() const; + std::vector get_pauli_gadgets() const; /** Get the cx config parameter (affects box decomposition) */ - auto get_cx_config() const; + CXConfigType get_cx_config() const; Op_ptr dagger() const override; diff --git a/tket/src/Circuit/PauliExpBoxes.cpp b/tket/src/Circuit/PauliExpBoxes.cpp index f8fb746e27..e1643c951b 100644 --- a/tket/src/Circuit/PauliExpBoxes.cpp +++ b/tket/src/Circuit/PauliExpBoxes.cpp @@ -466,17 +466,25 @@ bool TermSequenceBox::is_equal(const Op &op_other) const { }); } -auto TermSequenceBox::get_synth_strategy() const { return synth_strategy_; } +Transforms::PauliSynthStrat TermSequenceBox::get_synth_strategy() const { + return synth_strategy_; +} -auto TermSequenceBox::get_partition_strategy() const { +PauliPartitionStrat TermSequenceBox::get_partition_strategy() const { return partition_strategy_; } -auto TermSequenceBox::get_graph_colouring() const { return graph_colouring_; } +GraphColourMethod TermSequenceBox::get_graph_colouring() const { + return graph_colouring_; +} -auto TermSequenceBox::get_pauli_gadgets() const { return pauli_gadgets_; } +std::vector TermSequenceBox::get_pauli_gadgets() const { + return pauli_gadgets_; +} -auto TermSequenceBox::get_cx_config() const { return cx_configuration_; } +CXConfigType TermSequenceBox::get_cx_config() const { + return cx_configuration_; +} nlohmann::json TermSequenceBox::to_json(const Op_ptr &op) { const auto &box = static_cast(*op);