Member-only story
Qubit, An Intuition #4 — Unitary Matrices for Quantum Computation
The beauty of Quantum Mechanics for Quantum Computation, featuring IBM Quantum
Andi Sama — CIO, Sinergi Wahana Gemilang with Cahyati S. Sangaji

TL;DR;
Unitary matrices, with examples and their implementation in IBM quantum.Please refer to the previous articles:
“Qubit, An Intuition #1 — First Baby Steps in Exploring the Quantum World” for a discussion on a single qubit as a computing unit for quantum computation.
- "Qubit, An Intuition #2 - Inner Product, Outer Product, and Tensor Product" for a discussion on two-qubits operations.
- "Qubit, An Intuition #3 - Quantum Measurement, Full and Partial Qubits" for examples on full and partial quantum measurements.
For an introductory helicopter view of the overall six articles in the series, please visit this link “Embarking on a Journey to Quantum Computing — Without Physics Degree.”
To do the quantum computation, we need to have reversible transformations, meaning that input can be reconstructed from the output after a series of transformations to transform a quantum state.
Mathematically, reversible transformations are performed by unitary matrices.
Unitary Matrices for Quantum Computation
Matrices for X (NOT, to do bit-flip), H (Hadamard, to bring the qubit to superposition state), and Z gates (to do phase-flip), and CNOT (if the first qubit is 1, then flip the second qubit) for example, are unitary.

We can define X (NOT), H (Hadamard), Z, and CNOT gates in IBM Quantum on IBM Cloud easily by just doing drag-and-drop from available gates. In this example, all initial states for each qubit are set to |0>.
A unitary matrix U is a n x n matrix that has complex numbers as its elements.
A matrix U is unitary if U times U conjugate transpose is equal to identity (matrix I).
U conjugate transpose is acting like inverse matrix.