tensorcircuit
tensorcircuit copied to clipboard
Allow sparse matrix as circuit input
Issue Description
In some cases, we would like a sparse matrix as circuit input.
Right now, this seems impossible because of type conversion. For example, DMCircuit does this:
dminputs = backend.convert_to_tensor(dminputs)
which throws an error like "TypeError: Failed to convert elements of SparseTensor(...) to Tensor" in TensorFlow.
Proposed Solution
I'm not sure whether we can just modify type conversions.