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

Pauli graph structure for GreedyPauliSimp. More...

#include <GreedyPauliOptimisation.hpp>

Public Member Functions

 GPGraph (qubit_vector_t qubits, bit_vector_t bits)
 Construct an GPGraph from the qubits and bits.
 
GPVertSet get_successors (const GPVert &vert) const
 
GPVertSet get_predecessors (const GPVert &vert) const
 
std::vector< GPVertvertices_in_order () const
 All vertices of the DAG, topologically sorted.
 
std::tuple< std::vector< std::vector< PauliNode_ptr > >, std::vector< PauliNode_ptr >, boost::bimap< unsigned, unsigned > > get_sequence (std::shared_ptr< std::atomic< bool > > stop_flag)
 
void apply_gate_at_end (const Command &cmd, bool conditional=false, std::vector< unsigned > cond_bits={}, unsigned cond_value=0)
 Applies the given gate to the end of the graph.
 

Detailed Description

Pauli graph structure for GreedyPauliSimp.

A DAG is used to store all operations except for the end-of-circuit Clifford and end-of-circuit measurements. The vertices consist of Pauli rotations, mid-circuit measurements, resets, conditional Pauli rotations, and classical operations. Edges represent gate dependencies, where two nodes commute if they commute on both quantum and classical wires.

End-of-circuit measurements are stored as a map from integers to integers. These measurements are kept separate (i.e., after the final Clifford) so optimisation around them can later be handled by CliffordPushThroughMeasures.

The final Clifford operator is stored using a UnitaryRevTableau. Note that UnitaryRevTableau is chosen over PauliPropagations due to the availability of existing update methods.

Definition at line 526 of file GreedyPauliOptimisation.hpp.

Constructor & Destructor Documentation

◆ GPGraph()

tket::Transforms::GreedyPauliSimp::GPGraph::GPGraph ( qubit_vector_t  qubits,
bit_vector_t  bits 
)

Construct an GPGraph from the qubits and bits.

Definition at line 115 of file GreedyPauliConverters.cpp.

Member Function Documentation

◆ apply_gate_at_end()

void tket::Transforms::GreedyPauliSimp::GPGraph::apply_gate_at_end ( const Command cmd,
bool  conditional = false,
std::vector< unsigned >  cond_bits = {},
unsigned  cond_value = 0 
)

Applies the given gate to the end of the graph.

Clifford gates transform the tableau. Non-Clifford gates and conditional Clifford gates are transformed into PauliNodes by the tableau and added to the graph.

Definition at line 271 of file GreedyPauliConverters.cpp.

◆ get_predecessors()

GPVertSet tket::Transforms::GreedyPauliSimp::GPGraph::get_predecessors ( const GPVert vert) const

Definition at line 137 of file GreedyPauliConverters.cpp.

◆ get_sequence()

std::tuple< std::vector< std::vector< PauliNode_ptr > >, std::vector< PauliNode_ptr >, boost::bimap< unsigned, unsigned > > tket::Transforms::GreedyPauliSimp::GPGraph::get_sequence ( std::shared_ptr< std::atomic< bool > >  stop_flag)

Definition at line 485 of file GreedyPauliConverters.cpp.

◆ get_successors()

GPVertSet tket::Transforms::GreedyPauliSimp::GPGraph::get_successors ( const GPVert vert) const

Definition at line 128 of file GreedyPauliConverters.cpp.

◆ vertices_in_order()

std::vector< GPVert > tket::Transforms::GreedyPauliSimp::GPGraph::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 472 of file GreedyPauliConverters.cpp.


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