from qiskit import *
from math import pi
import numpy as np
from qiskit.visualization import *
import matplotlib.pyplot as plt

qc = QuantumCircuit(3)
qc.ccx(0,1,2)
qc.draw(output='mpl')

backend = Aer.get_backend('unitary_simulator')
job = execute(qc, backend)
result = job.result()
print(result.get_unitary(qc, decimals=3))

qc = QuantumCircuit(3)
qc.cswap(0,1,2)
qc.draw(output='mpl')

backend = Aer.get_backend('unitary_simulator')
job = execute(qc, backend)
result = job.result()
print(result.get_unitary(qc, decimals=3))