code: def vectors_close(vec0: QubitVector, vec1: QubitVector,
                    tolerance: float = TOLERANCE) -> bool:
      
      if vec0.rank != vec1.rank:
          return False
  
      if vec0.qubit_nb != vec1.qubit_nb:
          return False
  
      if set(vec0.qubits) ^ set(vec1.qubits):
          return False
  
      return bk.evaluate(fubini_study_angle(vec0, vec1)) <= tolerance
docs: Return True if vectors in close in the projective Hilbert space.
  
      Similarity is measured with the Fubini–Study metric.