A basic guide to quantum programming across multiple quantum languages, with an explanation of each concept.
The following Quantum programming languages will be used for demonstrating concepts.
Superconducting qubits | Google | Python | https://quantumai.google/cirq
Superconducting qubits | IBM | Python | https://www.ibm.com/quantum/qiskit
Topological qubits | Microsoft | Custom language | https://github.com/microsoft/qsharp
Superconducting qubits | Rigetti | Python | https://pyquil-docs.rigetti.com/en/stable/
Cirq | Qiskit | QSharp | pyQuil
Gates are similar to logic gates in classical computing. A qubit will go through a gate and potentially transform based on the gate.
A bit in a classical computer going through an NOT gate will flip from a 0 to a 1.
A qubit in a quantum computer going through a Pauli-X gate will rotate to the opposite on that axis.
- Hadamard - Places qubit into superposition
- Pauli - Changes phase or probabilities of qubit
- Phase Shift - Change of phase without modifying probabilities
- Rotation Gates - Rotation of qubit around a specific axis
- Controlled NOT - Entanglement of qubits
- Controlled Phase - Transferring phase to a target qubit
- SWAP- Swapping quantum states between qubits
Cirq | Qiskit | QSharp | pyQuil
Deutsch-Jozsa - Determines if a given function is constant (always the same output regardless of input) or balanced (produces 0 or 1 with equal probability) Cirq | Qiskit | QSharp | pyQuil
Quantum Walk - Ability to search multiple paths simultaneously to find a node. Grover's Search - Best suited to find element in massive unstructured dataset.