Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SparseSimulator does not support qudit operations #78

Open
smitsanghavi opened this issue Jan 16, 2023 · 1 comment
Open

SparseSimulator does not support qudit operations #78

smitsanghavi opened this issue Jan 16, 2023 · 1 comment
Assignees

Comments

@smitsanghavi
Copy link
Collaborator

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
@smitsanghavi
Copy link
Collaborator Author

#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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants