Link between string field theory and quantum mechanics