1. Explore alternative circuits¶
In this tutorial, we explore alternative circuits that can generate the target quantum state by utilizing the set of isomorphic graphs.
from graphiq.backends.lc_equivalence_check import iso_graph_finder
from graphiq.backends.stabilizer.compiler import StabilizerCompiler
from graphiq.state import QuantumState
from graphiq.metrics import Infidelity, CircuitDepth
from graphiq.solvers.time_reversed_solver import TimeReversedSolver
import networkx as nx
Again, we target a 4-qubit linear cluster state and use utility functions for generating the set of isomorphic graphs to our target -- defined as a networkx graph.
We first check the circuit depth of the generating circuit identified using the TimeReversedSolver for the original target.
We then loop over all graphs that are isomorphic to our original target, compute a generating circuit, and check the circuit depth for all. In this way, we exhaustively look for a generating circuit that has lower depth.