Formation of diamond from carbyne