What should we add?
Qiskit should have a Cliffordness checker where the API allows you to pass a quantum circuit as an argument to a function called is_clifford() which returns True if the circuit is Clifford. As a proof of concept, I've added a small function that tries to build a Clifford circuit with the Clifford class. If the circuit is NOT Clifford, the function handles an exception which leads to a False result. However, it would be more appropriate to have a proper Cliffordness checking algorithm.
What should we add?
Qiskit should have a Cliffordness checker where the API allows you to pass a quantum circuit as an argument to a function called
is_clifford()which returnsTrueif the circuit is Clifford. As a proof of concept, I've added a small function that tries to build a Clifford circuit with theCliffordclass. If the circuit is NOT Clifford, the function handles an exception which leads to aFalseresult. However, it would be more appropriate to have a proper Cliffordness checking algorithm.