You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Further testing suggests that the circuit must contain only identity gates to trigger the segfault - for example, X(q0), I(q1) will run successfully.
qsim_circuit is conspicuously lacking in translators for identity gates - it's possible they got lost in recent optimizations. I'll take a closer look.
It looks like the translation is fine - cirq.decompose converts to an empty circuit - but compute_amplitudes is misbehaving due to all qubits having been abstracted away. qsim ought to preserve the identity qubits for use in amplitude retrieval.
Some similar tests for comparison:
>>>qsim_results=qsim_simulator.compute_amplitudes(cirq.Circuit(), bitstrings=[0b00, 0b01])
# wrong bitstring length in bitstrings_str: got 1; should be 0.# Unable to parse provided bit strings.>>>qsim_results=qsim_simulator.compute_amplitudes(cirq.Circuit(), bitstrings=[])
# Segmentation fault
Trying to run a circuit that contains an identity operation on the simulator:
Outputs:
The text was updated successfully, but these errors were encountered: