Skip to content

Allow sparse matrix as circuit input #197

@royess

Description

@royess

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions