flamingpy.utils.linalg.are_lc_equivalent¶
- flamingpy.utils.linalg.are_lc_equivalent(graph1, graph2, clifford_form='tensor')[source]¶
Check if two EGraphs are LC equivalent, and return the Clifford operation if so. Implemented as in arXiv:quant-ph/0405023.
- Parameters
graph1 (EGraph) – the initial graph to check Clifford equivalence with.
graph2 (EGraph) – the graph to check Clifford equivalence against.
clifford_form –
a string describing the output form of local Clifford operation, if it exists.
- If ‘tensor’ (default), produce a list of length n of 2x2 numpy arrays corresponding to
single-qubit tensor factors.
- If ‘global’, return a single 2nx2n numpy array corresponding to the global operator
acting on all n qubits.
- Returns
- whether the states are LC equivalent, and if they are, the local
Clifford output according to ‘clifford_form’ specification.
- Return type
(bool, numpy.array)
source/api/flamingpy.utils.linalg.are_lc_equivalent
Download Python script
Download Notebook
View on GitHub