Skip to main content
Calcimator

Quantum Gate Calculator

Calculate quantum gate operations, output states, and measurement probabilities for quantum computing.

About this calculator

A quantum gate is an operation that transforms a qubit's quantum state, and this calculator applies four of the most fundamental single-qubit gates to a chosen input state: Pauli-X (the quantum equivalent of a classical NOT gate, flipping |0⟩ and |1⟩), Pauli-Y and Pauli-Z (which apply different phase and bit-flip combinations), and the Hadamard gate (which creates an equal superposition, putting a definite |0⟩ or |1⟩ into a 50/50 mix of both). Each gate is represented internally as a 2×2 matrix, and the calculator multiplies that matrix by the input state vector to get the output amplitudes, then squares those amplitudes to get the measurement probabilities P(|0⟩) and P(|1⟩) -- this is the Born rule, the standard quantum mechanical link between amplitude and observable probability. One caveat specific to Pauli-Y: this calculator works entirely in real numbers, but the true Pauli-Y matrix uses imaginary entries (0, -i; i, 0). The probabilities come out correct either way, since |±i|² = |±1|², but the Output |0⟩ Amplitude and Output |1⟩ Amplitude figures shown for Pauli-Y are real magnitudes (∓1) rather than the true imaginary amplitudes (∓i) -- worth knowing if you're checking this against a textbook derivation.

All four gates implemented here are IDEAL, noiseless unitary operations, so applying any of them to an already-normalized input state always produces another normalized state -- P(|0⟩) + P(|1⟩) always sums to 1. The State Norm output confirms that normalization check; it always reads 1.000 because these are exact unitary matrices, not because this calculator is modeling (and passing) any real-world noise test. This calculator does not compute a genuine gate-fidelity metric, which would compare a real, physically imperfect gate's actual behavior against its ideal target -- a real quantum processor's measured gate fidelity is always somewhat less than 1 because of noise sources like decoherence, miscalibration, and thermal relaxation that this simplified model doesn't include.

Inputs

rad

Results

P(|0⟩)

0%

P(|1⟩)

100%

Output |0⟩ Amplitude0
Output |1⟩ Amplitude1
State Norm1
Norm Deviation0%
How to Use This Calculator
  1. Select Gate Type: Pauli-X flips |0⟩↔|1⟩, Hadamard creates superposition, Pauli-Y and Pauli-Z apply phase rotations.
  2. Choose Input State: |0⟩ or |1⟩ as the single-qubit input to the gate operation.
  3. The Rotation Angle (rad) field is reserved for future parameterized rotation gates -- it has no effect on the four fixed-matrix gates (Pauli-X/Y/Z, Hadamard) offered above.
  4. Read P(|0⟩) and P(|1⟩) to see the measurement outcome probabilities after the gate transforms the input.
  5. State Norm (0-1) and Norm Deviation (%) confirm the output state is properly normalized -- they always read 1.000 and 0% here since every gate is an ideal, noiseless matrix, not a measure of real-world gate fidelity.

What each input means

Gate Type
Quantum gate type
Input State
Input quantum state
Rotation Angle
Rotation angle (for rotation gates)

What each result means

State Norm
Confirms the output state is normalized (P(|0⟩) + P(|1⟩) = 1); not a measure of real-world gate fidelity.
Norm Deviation
1 - State Norm; always 0% for these ideal, noiseless gate matrices.

How this is calculated

Formula

|ψ_out⟩ = U|ψ_in⟩

Worked example, using the default values

  1. Identify Input Parameters
    Gate Type = 0, Input State = 0, Rotation Angle = 1.5707963267948966 = 3 input(s) provided
  2. Calculate P
    P
    0 = 0%
  3. Calculate P
    P
    100 = 100%
  4. Calculate Output |0⟩ Amplitude
    0 = 0
  5. Calculate Output |1⟩ Amplitude
    1 = 1

Engine last updated . Checked against 4 independently-derived tests — how we verify calculators. Built by Paul Gunder, a software engineer, not a licensed financial, medical, or legal professional.

Frequently Asked Questions

Why does State Norm always show exactly 1.000 no matter what I select?

This output is not measuring gate fidelity against noise or imperfection -- it's a normalization check, confirming that the squared amplitudes of the output state (P(|0⟩) + P(|1⟩)) sum to 1, as required for any valid quantum state. Because all four gates implemented here (Pauli-X, Pauli-Y, Pauli-Z, Hadamard) are exact, ideal unitary matrices applied to an already-normalized input, that check will always pass -- it would only read below 1.000 if the gate matrix itself were not unitary, not because of any physical noise source. A genuine gate-fidelity metric, comparing a real physical gate's actual behavior against its ideal target, isn't computed by this calculator at all.

What does the Rotation Angle input actually change?

Nothing, for any of the four gates offered here. Pauli-X, Pauli-Y, Pauli-Z, and Hadamard are all FIXED matrices with no continuous parameter -- the rotation angle field is only meaningful for a separate family of parameterized rotation gates (like Rx, Ry, or Rz), which are not among this calculator's current options. The field is present for future use but has no effect on today's four gate choices.

How does the Hadamard gate differ from the three Pauli gates in its output?

The three Pauli gates (X, Y, Z) always map a definite input state to another definite output state -- probability 100% on one outcome, 0% on the other. The Hadamard gate is different: applied to either |0⟩ or |1⟩, it produces an EQUAL superposition, so P(|0⟩) and P(|1⟩) both come out to 50%. That's the defining behavior that makes Hadamard the standard gate for initializing superposition in quantum algorithms.

Does switching the input state from |0⟩ to |1⟩ change the measurement probabilities?

Yes, for the Pauli gates -- Input State directly determines which basis state the gate's fixed matrix acts on, so switching it swaps or otherwise changes the resulting P(|0⟩)/P(|1⟩) split for Pauli-X, Pauli-Y, and Pauli-Z. The one exception is Hadamard: it produces a 50/50 split from EITHER input state, so Input State makes no visible difference to the probabilities when Hadamard is selected.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Science & Physics.