Open glanzz opened 1 month ago
Description of the issue Any circuit with the inverse QubitPermutation gate added will fail if it is loaded from JSON. How to reproduce the issue
import cirq as c qubits = c.LineQubit.range(3) circuit = c.Circuit() circuit.append(c.QubitPermutationGate(permutation=[0,1,2])(qubits[0], qubits[1], qubits[2])**-1) print(circuit) json_text = c.to_json(circuit) print(json_text) circuit = c.read_json(json_text=json_text) print(circuit)
Cirq version You can get the cirq version by printing cirq.__version__. From the command line:
cirq.__version__
Cirq: 1.4.1
Discussed during bit.ly/cirq-cynq today (2024-10-16): the conclusion is Cirq slhould either fully support the serialization or raise an error. Fully supporting it would is the preferred outcome.
Description of the issue Any circuit with the inverse QubitPermutation gate added will fail if it is loaded from JSON. How to reproduce the issue
Cirq version You can get the cirq version by printing
cirq.__version__
. From the command line: