I added a MatrixGate <: AbstractGate with the purpose of creating a gate type from a matrix. The motivation comes from computing expectation values of an operator given in a matrix form by using the tensor_circuit function. This way is very simple to create user defined gates and can be done inside functions.
I added a MatrixGate <: AbstractGate with the purpose of creating a gate type from a matrix. The motivation comes from computing expectation values of an operator given in a matrix form by using the tensor_circuit function. This way is very simple to create user defined gates and can be done inside functions.