AIMultiple ResearchAIMultiple Research

Quantum Programming: Languages, SDKs & Algorithms in 2024

Updated on Dec 22
4 min read
Written by
Cem Dilmegani
Cem Dilmegani
Cem Dilmegani

Cem is the principal analyst at AIMultiple since 2017. AIMultiple informs hundreds of thousands of businesses (as per Similarweb) including 60% of Fortune 500 every month.

Cem's work focuses on how enterprises can leverage new technologies in AI, automation, cybersecurity(including network security, application security), data collection including web data collection and process intelligence.

View Full Profile

Quantum computers are expected to reduce power consumption from 100 to 1000 times because they operate at very low temperature at which the processor would work as a superconductor (i.e. it can conduct electricity with virtually no resistance). On the other hand, quantum computers could accelerate machine learning processes, reducing thousands of years of learning to mere seconds.

Quantum computers are based on quantum bits (Qubits) which have two possible values 0 or 1. They do not obey Newtonian laws but quantum laws allowing them to have the probability of being 0 and 1 at the same time. Confused yet? Then head to our article which explains what quantum computing is and how it works.

Due to the potential of quantum computers (QC), tech giants like Google and IBM are giving the opportunity to users who do not have QCs to learn how to program and manipulate quantum circuits using different quantum programming languages:

Quantum programming languages

Quantum programming languages are the foundations to interpret ideas into instructions to be carried out by a quantum computer. According to Nature Reviews, quantum programming languages are used to:

  • manage existing physical devices
  • predict quantum algorithms’ execution costs on possible devices
  • examine quantum computing concepts (qubits, superposition, entanglement)
  • test and verify quantum algorithms and their implementations

Current quantum programming languages and compilers are mainly focused on optimizing low-level circuits consisting of quantum gates. Quantum gates are the building blocks of quantum circuits. They are similar to reversible logic gates such as Fredkin gate, Toffoli gate, interaction gate, and switch gate. However, the smallest classical reversible gate has to use three bits, whereas the smallest quantum gate needs to use only two bits.

Quantum operators, gates and matrix.
source: wikipedia

Most quantum programming is done in 3 types of languages:

Imperative quantum programming languages

A snippet of code written in Quantum Computing Language.
source: American scientist

Imperative programming languages consist of step-by-step instructions to be performed in order to accomplish the desired result. In classical computers imperative languages include C, JavaScript, Pascal, Python, etc. The most popular quantum imperative languages are:

  1. QCL: Quantum Computing Language, one of the first implemented quantum programming languages. It resembles C language in regards of syntax and data types.
  2. QMASM: Quantum Macro Assembler, published in 2016. It is a low-level language specific to quantum annealing. The significance of QMASM is that it relieves the programmer from having to know system-specific hardware details while still allowing programs to be expressed at a low level of abstraction.
  3. Silq is originally published in 2020. Silq is a high-level programming language written in D language which has 482 stars and 10 contributors on github and is regularly updated as of 2021.

Other imperative Q languages include Quantum pseudocode, Q|SI>, Q language, qGCL, and Scaffold.

Functional quantum programming languages

Functional style programming.
source: american scientist

Functional languages don’t rely on step-by-step instructions, instead they depend on mathematical functions which means inputs are converted into output using mathematical transformations. Functional languages are less popular than imperative ones because they don’t support flow controls (e.g. loop statements) or conditionals (e.g. if/else statements). However, due to these features, they benefit from:

  • Fewer bugs
    • Programmers writing and reviewing a functional code claim to spot errors more easily because there are fewer places for surprising behavior to hide
    • Functional errors are reported to be easier to fix
  • Nested functions
  • Lazy evaluation:
    • delays the evaluation of an expression until its value is needed
    • avoids repeated evaluations

Top functional languages for quantum computers are:

  1. QML: published in 2007, a Haskell-like quantum programming language based on strict linear logic. It can integrate reversible and irreversible quantum computations
  2. Quantum Lambda Calculus: it is based on classical lambda calculus introduced in 1930 and was first defined for quantum calculations in 1996. It uses high-order functions (λx.x^3) Therefore, it is stronger than the standard quantum computational models, such as quantum Turing machine or the quantum circuit model.
  3. QFC and QPL: Semantically QFC and QPL are equivalent. However, in QFC, quantum programs are represented using flowchart syntax, but in QPL syntactic structure of quantum programs are represented using textual representations.

Other functional languages include LIQUi|> and Quipper.

Multi-paradigm languages

There are also multi-paradigm languages that are domain-specific such as Q# for Microsoft and Strawberry Fields for XanduAI.

Quantum software development kits

Whether the developer uses imperative, functional, or multi-paradigm languages to write the quantum algorithm, a quantum software is required to create and manipulate the quantum program, and SDKs are required to run quantum circuits on prototype quantum devices, as well as on simulators. These software environments for quantum programs are usually open source and utilize python language.

For more details on quantum SDKs, feel free to read our article Quantum Software Development Kits

Quantum programming algorithms

The purpose of programming quantum computers is to solve quantum physics’ problems. Quantum algorithms that can be programmed include:

  1. Algebra and number theory algorithms, such as factoring and Gauss sums
  2. Approximations and simulations, such as quantum simulation, zeta functions, and knot invariants
  3. Machine learning algorithms, such as clustering, binary classification, and training neural networks

More quantum algorithms that can be programmed are mentioned in the “Quantum Algorithm Zoo” by Stephen Jordan of the National Institutes of Standards and Technology.

Challenges in quantum programming

The difficulties in quantum computer programming arise from:

  • Difficulties in formulating universal QC languages
  • Incompleteness and hidden variables in quantum mechanics
  • Quantum computers are still in their infancy working on <100 Qubits, therefore, not strong enough to run complex quantum algorithms.

However, the availability of open source SDKs is allowing communities to find solutions for programming challenges and find more practical applications for quantum computing.

For more on quantum computing

To read about quantum computing applications, feel free to read Top 20+ Quantum Computing Applications / Use Cases

You might also find the following articles useful:

Finally, you might want to check our top quantum computing companies list.

Find the Right Vendors
Cem Dilmegani
Principal Analyst

Cem is the principal analyst at AIMultiple since 2017. AIMultiple informs hundreds of thousands of businesses (as per Similarweb) including 60% of Fortune 500 every month.

Cem's work focuses on how enterprises can leverage new technologies in AI, automation, cybersecurity(including network security, application security), data collection including web data collection and process intelligence.

Cem's work has been cited by leading global publications including Business Insider, Forbes, Washington Post, global firms like Deloitte, HPE, NGOs like World Economic Forum and supranational organizations like European Commission. You can see more reputable companies and media that referenced AIMultiple.

Cem's hands-on enterprise software experience contributes to the insights that he generates. He oversees AIMultiple benchmarks in dynamic application security testing (DAST), data loss prevention (DLP), email marketing and web data collection. Other AIMultiple industry analysts and tech team support Cem in designing, running and evaluating benchmarks.

Throughout his career, Cem served as a tech consultant, tech buyer and tech entrepreneur. He advised enterprises on their technology decisions at McKinsey & Company and Altman Solon for more than a decade. He also published a McKinsey report on digitalization.

He led technology strategy and procurement of a telco while reporting to the CEO. He has also led commercial growth of deep tech company Hypatos that reached a 7 digit annual recurring revenue and a 9 digit valuation from 0 within 2 years. Cem's work in Hypatos was covered by leading technology publications like TechCrunch and Business Insider.

Cem regularly speaks at international technology conferences. He graduated from Bogazici University as a computer engineer and holds an MBA from Columbia Business School.

Sources: Traffic Analytics, Ranking & Audience, Similarweb.
Why Microsoft, IBM, and Google Are Ramping up Efforts on AI Ethics, Business Insider.
Microsoft invests $1 billion in OpenAI to pursue artificial intelligence that’s smarter than we are, Washington Post.
Data management barriers to AI success, Deloitte.
Empowering AI Leadership: AI C-Suite Toolkit, World Economic Forum.
Science, Research and Innovation Performance of the EU, European Commission.
Public-sector digitization: The trillion-dollar challenge, McKinsey & Company.
Hypatos gets $11.8M for a deep learning approach to document processing, TechCrunch.
We got an exclusive look at the pitch deck AI startup Hypatos used to raise $11 million, Business Insider.

To stay up-to-date on B2B tech & accelerate your enterprise:

Follow on

Next to Read


Your email address will not be published. All fields are required.

D. Zuyderwijk
Mar 07, 2023 at 03:59

Hopefuly quantum computing wil be useble for radio communication ASML is the first to make the first one chip quantum computer

Mar 16, 2022 at 16:37

Keep up the good work!

Sep 27, 2021 at 18:30

Thanks for the breakdown of the ecosystem of languages out there! This is the first place I have been able to find a list of languages outside of Wikipedia and it is awesome.

I am curious if there any companies that might be using these languages to build software applications/ have built applications using these languages.

Related research