Added method adjacent_gates to circuit.py.