unitary
unitary copied to clipboard
SparseSimulator does not support qudit operations
SparseSimulator code assumes a system of qubits only and does not support general qudits.
Running the simple Circuit below gives a ValueError size 2 is different from 3.
qudit = cirq.NamedQid("a", 3)
circuit = cirq.Circuit(qudit_gates.QuditXGate(3).on(qudit), cirq.measure(qudit))
SparseSimulator().run(circuit).measurements
https://github.com/quantumlib/unitary/pull/76 partially gets around this since there are no qudits in the circuit after it gets compiled to qubits, so SparseSimulator can be used on a qudit-based QuantumWorld that has compile_to_qubits=True. We still need to fix the SparseSimulator for when compile_to_qubits=False (default)