Closed keefehuang closed 3 years ago
Can we let matrix(g) (with 'g' some gate) return a dense matrix, and rename matrix(cg::CircuitGate) to sparsematrix(cg::CircuitGate)? Why is there a separate "_matrix" function for CircuitGate?
The naming "size" in size(cg::CircuitGate) is a bit confusing; maybe rename to "required_wires" or similar?
"get_data" at the end of gates.jl presumably no longer required...
The naming "compile.jl" is somewhat confusing, rename to "unitary2circuit.jl" or similar?
circuitgate.jl, line 77: Int[i for i in cg.iwire] can be replaced by collect(cg.iwire). (There might be other occurrences as well.)
One level of indentation missing at cricuit.jl, line 164
"get_data" at the end of gates.jl presumably no longer required...
can we remove get_data?
Major update to clean up code.