Skip to main content

On the Source Code Structure of Quantum Code: Insights from Q# and QDK

  • Conference paper
  • First Online:

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1266))

Abstract

A considerable number of high-level quantum programming languages have been proposed and implemented in the last years. This fact opens the possibility to study the structure of the source code of quantum software, using initially the same metrics typically used in classical software. Here we report a preliminary study in module structure and use of quantum gates in the libraries of Microsoft’s quantum development platform QDK (Quantum Developer Kit) that uses a specific language, Q#. The structure of dependencies and the use of primitives is analyzed across all the source code available in the Github repositories related to the platform to date.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    https://docs.microsoft.com/en-us/qsharp/api/qsharp/microsoft.quantum.intrinsic.

  2. 2.

    It should be noted that some operations as MResetZ that include various primitives in one sentence have not been included which may affect the results (thanks to anonymous reviewer for pointing this).

  3. 3.

    https://github.com/dabeaz/sly.

References

  1. LaRose, R.: Overview and comparison of gate level quantum software platforms. Quantum 3, 130 (2019)

    Article  Google Scholar 

  2. Nuñez-Varela, A.S., Pérez-Gonzalez, H.G., Martínez-Perez, F.E., Soubervielle-Montalvo, C.: Source code metrics: a systematic mapping study. J. Syst. Softw. 128, 164–197 (2017)

    Article  Google Scholar 

  3. Mordal, K., Anquetil, N., Laval, J., Serebrenik, A., Vasilescu, B., Ducasse, S.: Software quality metrics aggregation in industry. J. Softw. Evol. Process 25(10), 1117–1135 (2013)

    Article  Google Scholar 

  4. Yamashita, K., et al.: Thresholds for size and complexity metrics: a case study from the perspective of defect density. In: 2016 IEEE International Conference on Software Quality, Reliability and Security (QRS), Vienna, Austria, 1–3 August, pp. 191–201 (2016)

    Google Scholar 

  5. Šubelj, L., Bajec, M.: Community structure of complex software systems: analysis and applications. Phys. A Stat. Mech. Appl. 390(16), 2968–2975 (2011)

    Article  Google Scholar 

  6. Chong, C.Y., Lee, S.P.: Analyzing maintainability and reliability of object-oriented software using weighted complex network. J. Syst. Softw. 110, 28–53 (2015)

    Article  Google Scholar 

  7. Pan, W., Li, B., Ma, Y., Liu, J.: Multi-granularity evolution analysis of software using complex network theory. J. Syst. Sci. Complex. 24(6), 1068–1082 (2011)

    Article  Google Scholar 

  8. Zimmermann, T., Nagappan, N.: Predicting defects using network analysis on dependency graphs. In: Schafer, W., Dwyer, M.B., Gruhn, V. (eds.) Proceedings of the 30th International Conference on Software Engineering, Leipzig, pp. 531–540 (2018)

    Google Scholar 

  9. Li, K., Yu, M., Liu, L., Zhai, J., Liu, W.: A novel reliability analysis approach for component-based software based on the complex network theory. Softw. Test. Verif. Reliab. 28(6), e1674 (2018)

    Article  Google Scholar 

  10. Gidney, C.: Halving the cost of quantum addition. Quantum 2, 74 (2018)

    Article  Google Scholar 

  11. JavadiAbhari, A., et al.: ScaffCC: scalable compilation and analysis of quantum programs. Parallel Comput. 45, 2–17 (2015)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Miguel-Angel Sicilia .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Sicilia, MA., Sánchez-Alonso, S., Mora-Cantallops, M., García-Barriocanal, E. (2020). On the Source Code Structure of Quantum Code: Insights from Q# and QDK. In: Shepperd, M., Brito e Abreu, F., Rodrigues da Silva, A., Pérez-Castillo, R. (eds) Quality of Information and Communications Technology. QUATIC 2020. Communications in Computer and Information Science, vol 1266. Springer, Cham. https://doi.org/10.1007/978-3-030-58793-2_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-58793-2_24

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-58792-5

  • Online ISBN: 978-3-030-58793-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics