You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

_parse_args.py 1.3 kB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright 2021 Huawei Technologies Co., Ltd
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # ============================================================================
  15. """parse argument"""
  16. import argparse
  17. parser = argparse.ArgumentParser()
  18. parser.add_argument('-n',
  19. '--num-sampling',
  20. help='number of samplings',
  21. type=int,
  22. default=100)
  23. parser.add_argument('-b', '--batchs', help='batchs', type=int, default=1)
  24. parser.add_argument(
  25. '-o',
  26. '--omp-num-threads',
  27. help=
  28. 'OMP_NUM_THREADS for mindquantum or set_intra_op_parallelism_threads for tensorflow',
  29. type=int,
  30. default=1)
  31. parser.add_argument('-p',
  32. '--parallel-worker',
  33. help='parallel worker',
  34. type=int,
  35. default=1)

MindQuantum是结合MindSpore和HiQ开发的量子机器学习框架,支持多种量子神经网络的训练和推理。得益于华为HiQ团队的量子计算模拟器和MindSpore高性能自动微分能力,MindQuantum能够高效处理量子机器学习、量子化学模拟和量子优化等问题,性能达到业界TOP1,为广大的科研人员、老师和学生提供了快速设计和验证量子机器学习算法的高效平台。