-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
kind/bug-reportSomething doesn't seem to work.Something doesn't seem to work.triage/discussNeeds decision / discussion, bring these up during Cirq CynqueNeeds decision / discussion, bring these up during Cirq Cynque
Description
Describe the issue
The utility function is_native_neutral_atom_gate raises a TypeError when passed a UniformSuperpositionGate.
Explain how to reproduce the bug or problem
import cirq
from cirq.neutral_atoms import is_native_neutral_atom_gate
from cirq.ops import UniformSuperpositionGate
# Create an unhashable gate
gate = UniformSuperpositionGate(m_value=3, num_qubits=2)
# This call triggers the TypeError
print(is_native_neutral_atom_gate(gate))Details
Traceback (most recent call last):
File "trigger.py", line 6, in
is_native_neutral_atom_gate(gate)
File ".../cirq/neutral_atoms/convert_to_neutral_atom_gates.py", line 32, in is_native_neutral_atom_gate
return gate in neutral_atom_devices.neutral_atom_gateset()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../cirq/ops/gateset.py", line 419, in contains
if g in self._instance_gate_families:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: unhashable type: 'UniformSuperpositionGate'
Tell us the version of Cirq where this happens
1.6.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bug-reportSomething doesn't seem to work.Something doesn't seem to work.triage/discussNeeds decision / discussion, bring these up during Cirq CynqueNeeds decision / discussion, bring these up during Cirq Cynque