Loading [MathJax]/extensions/tex2jax.js
tket
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Concepts
Public Member Functions | Friends | List of all members
tket::PauliGraph Class Reference

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 UnitaryRevTableauget_clifford_ref ()
 
unsigned n_vertices () const
 
std::vector< PauliVertvertices_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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PauliGraph() [1/2]

tket::PauliGraph::PauliGraph ( unsigned  n)
explicit

Construct an empty dependency graph for the identity over n qubits.

Definition at line 30 of file PauliGraph.cpp.

◆ PauliGraph() [2/2]

tket::PauliGraph::PauliGraph ( const qubit_vector_t qbs,
const bit_vector_t bits = {} 
)
explicit

Construct an empty dependency graph for the identity over given qubits.

Definition at line 32 of file PauliGraph.cpp.

Member Function Documentation

◆ apply_gate_at_end()

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.

◆ get_clifford_ref()

const UnitaryRevTableau & tket::PauliGraph::get_clifford_ref ( )
inline

Definition at line 89 of file PauliGraph.hpp.

◆ n_vertices()

unsigned tket::PauliGraph::n_vertices ( ) const
inline

Definition at line 90 of file PauliGraph.hpp.

◆ sanity_check()

void tket::PauliGraph::sanity_check ( ) const

Perform a simple sanity check on the DAG.

Definition at line 377 of file PauliGraph.cpp.

◆ to_graphviz()

void tket::PauliGraph::to_graphviz ( std::ostream &  out) const

Definition at line 346 of file PauliGraph.cpp.

◆ to_graphviz_file()

void tket::PauliGraph::to_graphviz_file ( const std::string &  filename) const

Visualisation of the dependency graph.

Definition at line 341 of file PauliGraph.cpp.

◆ vertices_in_order()

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.

Returns
vector of vertices in a topological (causal) order

Definition at line 367 of file PauliGraph.cpp.

Friends And Related Symbol Documentation

◆ circuit_to_pauli_graph

PauliGraph circuit_to_pauli_graph ( const Circuit circ)
friend

Definition at line 23 of file PauliGraphConverters.cpp.

◆ pauli_graph_to_pauli_exp_box_circuit_individually

Circuit pauli_graph_to_pauli_exp_box_circuit_individually ( const PauliGraph pg,
CXConfigType  cx_config 
)
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.

◆ pauli_graph_to_pauli_exp_box_circuit_pairwise

Circuit pauli_graph_to_pauli_exp_box_circuit_pairwise ( const PauliGraph pg,
CXConfigType  cx_config 
)
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.

◆ pauli_graph_to_pauli_exp_box_circuit_sets

Circuit pauli_graph_to_pauli_exp_box_circuit_sets ( const PauliGraph pg,
CXConfigType  cx_config 
)
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.

  • Currently follows a greedy set-building method *‍/

Definition at line 113 of file PauliGraphConverters.cpp.


The documentation for this class was generated from the following files: