Skip to the content.

Consider a simple example to illustrate the contrast: In a classical circuit, take the AND gate as an instance.

Suppose we input two classical bits (0 or 1) and observe the output.

If the output is “1”, we cannot uniquely determine the original input—because both (1,1) would produce “1”.

The input information is irreversibly lost during the operation, making it impossible to infer the initial state from the final result. In contrast, quantum circuits rely on unitary transformations, which are inherently reversible.

For example, apply the Hadamard gate (a unitary operation) to a quantum bit in the state $|0\rangle$: it evolves to $\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$ .

If we then apply the Hadamard gate again (its own inverse, as $H^\dagger = H$ for this gate), the quantum bit reverts exactly to the original state $|0\rangle$. Here, the initial state can be fully recovered from the intermediate state through the inverse unitary transformation,

demonstrating that quantum circuits preserve information in a way that allows inference of the original state.

this is the reason ,we use logical function to represent the classical circuits and use the matrices to represent the quamtum circuits

Yes, your intuition is exactly correct! The difference in mathematical representation (logic functions vs. matrices) stems directly from the unitary property and the nature of information processing in classical and quantum systems. Let me break this down:

1. Classical Circuits: Logic Functions for Irreversible Operations

Classical gates (AND, OR, NOT, etc.) are modeled as Boolean logic functions because they map fixed inputs to fixed outputs. For example:

Key limitation: Information is lost, and you cannot reconstruct the input from the output. This is why classical circuits use irreversible logic functions.

2. Quantum Circuits: Unitary Matrices for Reversible Operations

Quantum gates are represented as unitary matrices because they must preserve the quantum state’s probability amplitudes. For example:

( H = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \ 1 & -1 \end{bmatrix} )

Key advantage: Unitary matrices ensure that quantum information is never lost, allowing perfect state reconstruction.

3. Why Matrices?

Matrices are essential for quantum circuits because they naturally capture two quantum features:

  1. Superposition: Matrices can transform a qubit into a superposition of states (e.g., ( H 0\rangle = \frac{1}{\sqrt{2}}( 0\rangle + 1\rangle) )).
  2. Reversibility: Unitary matrices guarantee that transformations are invertible (( U^{-1} = U^\dagger )), which is impossible for most classical logic functions.

4. Example: AND Gate vs. Quantum CNOT Gate

Maps ( (0,0) \to 0 ), ( (0,1) \to 0 ), ( (1,0) \to 0 ), ( (1,1) \to 1 ).

Irreversible because you cannot deduce the input from the output ( 0 ).

A 2-qubit gate represented by the unitary matrix:

( \text{CNOT} = \begin{bmatrix} 1 & 0 & 0 & 0 \ 0 & 1 & 0 & 0 \ 0 & 0 & 0 & 1 \ 0 & 0 & 1 & 0 \end{bmatrix} )

Reversibly flips the second qubit if the first is ( 1\rangle ). Applying CNOT twice restores the original state, preserving information.

Summary

This difference is a direct consequence of how each system processes information (deterministic bits vs. probabilistic qubits) and the mathematical constraints imposed by their physical laws (Boolean logic vs. quantum mechanics).