def test_decompose_operation(): d = generic_device(3) for op in d.decompose_operation((cirq.CCZ**1.5).on(*(d.qubit_list()))): d.validate_operation(op) p_qubits = [cirq.LineQubit(3), cirq.LineQubit(4)] d = PasqalVirtualDevice(1.0, p_qubits) op = (cirq.ops.CNOT).on(*(d.qubit_list()))**2 assert d.decompose_operation(op) == []
def test_decompose_operation_deprecated(): d = generic_device(3) with cirq.testing.assert_deprecated('decompose', deadline='v0.15'): for op in d.decompose_operation((cirq.CCZ ** 1.5).on(*(d.qubit_list()))): d.validate_operation(op) p_qubits = [cirq.LineQubit(3), cirq.LineQubit(4)] d = PasqalVirtualDevice(1.0, p_qubits) op = (cirq.ops.CNOT).on(*(d.qubit_list())) ** 2 with cirq.testing.assert_deprecated('decompose', deadline='v0.15'): assert d.decompose_operation(op) == []