Class LatticeFromParity
Defined in File LatticeFromParity.hpp
Class Documentation
-
class UnionFindCPP::LatticeFromParity
This class implements LatticeConcept using the input of sparse parity matrix.
Public Functions
-
inline LatticeFromParity(uint32_t num_parities, uint32_t num_qubits, int *col_indices, int *indptr)
construct a Lattice class from a given parity matrix (CSR format)
- Parameters
num_parities – total number of parities. Same as the number of rows of the matrix.
num_qubits – total number of qubits. Same as the number of columns of the matrix
col_indices – indices[idx] indicate the column index of the element data[idx]
indptr – indptr[row+1]-indptr[row] indicate the number of elements in the row
-
inline LatticeFromParity(uint32_t layer_vertex_size, uint32_t layer_num_qubits, int *col_indices, int *indptr, uint32_t repetitions)
-
inline auto vertex_connections(uint32_t v) const -> const std::vector<uint32_t>&
-
inline auto vertex_connection_count(int vertex) const -> uint32_t
-
inline auto num_edges() const -> uint32_t
-
inline auto num_vertices() const -> uint32_t
-
inline LatticeFromParity(uint32_t num_parities, uint32_t num_qubits, int *col_indices, int *indptr)