def test_qasm_two_qubit_gate_unitary(): u = cirq.testing.random_unitary(4) g = QasmTwoQubitGate.from_matrix(u) np.testing.assert_allclose(cirq.unitary(g), u)
def test_qasm_two_qubit_gate_repr(): cirq.testing.assert_equivalent_repr(QasmTwoQubitGate.from_matrix( cirq.testing.random_unitary(4)))