tket
|
Dependency graph of a circuit wrt Pauli Gadgets. More...
#include <PauliGraph.hpp>
Public Member Functions | |
PauliGraph (unsigned n) | |
Construct an empty dependency graph for the identity over n qubits. | |
PauliGraph (const qubit_vector_t &qbs, const bit_vector_t &bits={}) | |
Construct an empty dependency graph for the identity over given qubits. | |
void | apply_gate_at_end (const Gate &gate, const unit_vector_t &args) |
Applies the given gate to the end of the circuit. | |
void | to_graphviz_file (const std::string &filename) const |
Visualisation of the dependency graph. | |
void | to_graphviz (std::ostream &out) const |
const UnitaryRevTableau & | get_clifford_ref () |
unsigned | n_vertices () const |
std::vector< PauliVert > | vertices_in_order () const |
All vertices of the DAG, topologically sorted. | |
void | sanity_check () const |
Perform a simple sanity check on the DAG. | |
Friends | |
PauliGraph | circuit_to_pauli_graph (const Circuit &circ) |
Circuit | pauli_graph_to_pauli_exp_box_circuit_individually (const PauliGraph &pg, CXConfigType cx_config) |
Synthesises a circuit equivalent to the PauliGraph by adding each pauli gadget to the circuit as a PauliExpBox individually in the order given by TopSortIterator. | |
Circuit | pauli_graph_to_pauli_exp_box_circuit_pairwise (const PauliGraph &pg, CXConfigType cx_config) |
Synthesises a circuit equivalent to the PauliGraph by inserting pairs of pauli gadgets as PauliExpPairBoxes into the circuit The tableau is then synthesised at the end. | |
Circuit | pauli_graph_to_pauli_exp_box_circuit_sets (const PauliGraph &pg, CXConfigType cx_config) |
Synthesises a circuit equivalent to the PauliGraph by building sets of mutually commuting pauli gadgets and inserting them into the circuit as PauliExpCommutingSetBoxes The tableau is then synthesised at the end. | |
Dependency graph of a circuit wrt Pauli Gadgets.
Constructed by effectively commuting all non-Clifford gates to the front of the circuit and determining their dependencies based on commutation of the Pauli strings. The Clifford effect of a circuit is maintained as a tableau, thought of as being applied after all of the gadgets.
Definition at line 69 of file PauliGraph.hpp.
|
explicit |
Construct an empty dependency graph for the identity over n qubits.
Definition at line 30 of file PauliGraph.cpp.
|
explicit |
Construct an empty dependency graph for the identity over given qubits.
Definition at line 32 of file PauliGraph.cpp.
void tket::PauliGraph::apply_gate_at_end | ( | const Gate & | gate, |
const unit_vector_t & | args | ||
) |
Applies the given gate to the end of the circuit.
Clifford gates transform the tableau. Non-Clifford gates are transformed into gadgets by the tableau and added to the graph.
Definition at line 79 of file PauliGraph.cpp.
|
inline |
Definition at line 89 of file PauliGraph.hpp.
|
inline |
Definition at line 90 of file PauliGraph.hpp.
void tket::PauliGraph::sanity_check | ( | ) | const |
Perform a simple sanity check on the DAG.
Definition at line 377 of file PauliGraph.cpp.
void tket::PauliGraph::to_graphviz | ( | std::ostream & | out | ) | const |
Definition at line 346 of file PauliGraph.cpp.
void tket::PauliGraph::to_graphviz_file | ( | const std::string & | filename | ) | const |
Visualisation of the dependency graph.
Definition at line 341 of file PauliGraph.cpp.
std::vector< PauliVert > tket::PauliGraph::vertices_in_order | ( | ) | const |
All vertices of the DAG, topologically sorted.
This method is "morally" const, but it sets the vertex indices in the DAG.
Definition at line 367 of file PauliGraph.cpp.
|
friend |
Definition at line 23 of file PauliGraphConverters.cpp.
|
friend |
Synthesises a circuit equivalent to the PauliGraph by adding each pauli gadget to the circuit as a PauliExpBox individually in the order given by TopSortIterator.
The tableau is then synthesised at the end.
Definition at line 51 of file PauliGraphConverters.cpp.
|
friend |
Synthesises a circuit equivalent to the PauliGraph by inserting pairs of pauli gadgets as PauliExpPairBoxes into the circuit The tableau is then synthesised at the end.
Definition at line 74 of file PauliGraphConverters.cpp.
|
friend |
Synthesises a circuit equivalent to the PauliGraph by building sets of mutually commuting pauli gadgets and inserting them into the circuit as PauliExpCommutingSetBoxes The tableau is then synthesised at the end.
Definition at line 113 of file PauliGraphConverters.cpp.