DEV Community

Quantum Ash
Quantum Ash

Posted on

Daily Quantum Learning #4 - Basic Quantum Logic Gates

Here is an overview of essential knowledge regarding quantum gates.

Understanding |0⟩ and |1⟩:

|0⟩ (Ket Zero): This is one of the two fundamental states of a qubit. This is often called the ground state or the zero state. In physical terms, it represents the lowest energy state of a quantum system, similar to an electron in its lowest energy level in an atom.

|1⟩ (Ket One): The other fundamental state, known as the excited state or one state. This is similar to a higher energy state compared to |0⟩, like an electron excited to a higher energy level.

To Help Visualize: Imagine a sphere where |0⟩ is the north pole and |1⟩ is the south pole. Any other superposition would be somewhere on the sphere.

Quantum Gates

Pauli Gates:

X (NOT) Gate: Acts like a classical NOT gate, flipping ∣0⟩ to ∣1⟩ and vice versa.
Y Gate: This flips a qubit’s state similar to an X gate but also rotates it by 180 degrees around the Y-axis on the Bloch sphere.
Z (Phase Flip) Gate: Leaves ∣0⟩ unchanged but adds a phase to ∣1⟩.

Hadamard Gate (H): Creates superposition. It turns ∣0⟩ into (∣0⟩+∣1⟩)/sqrt(2) and ∣1⟩ into (∣0⟩−∣1⟩)/sqrt(2).

Phase Shift Gates (S, T):

S Gate (also known as the phase gate): Adds a 90-degree phase shift to ∣1⟩.

T Gate: A quarter-turn phase shift, this is useful for fine-tuning phases.

Controlled Gate:

CNOT (Controlled-NOT) Gate: If the control qubit is ∣1⟩, it flips the target qubit. Otherwise, it leaves the target unchanged.

Two-Qubit Gates (Beyond CNOT):

SWAP Gate: Exchanges the states of two qubits.

Controlled Phase Gate (CZ): Adds a phase to the target qubit if the control qubit is ∣1⟩.

This is a comprehensive list of all of the most common quantum gates and how they can be used. Understanding these will be essential to successfully designing quantum circuits.

Billboard image

Use Playwright to test. Use Playwright to monitor.

Join Vercel, CrowdStrike, and thousands of other teams that run end-to-end monitors on Checkly's programmable monitoring platform.

Get started now!

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay