Dirac notation — kets and bras
A compact language for state vectors, inner products and projections.
- Translate between column vectors and ket notation.
- Compute a bra-ket inner product with complex conjugation.
A ket is a column
Section titled “A ket is a column”means a state vector. For one qubit,
Its corresponding bra is the conjugate-transposed row:
Complex conjugation matters. If , its conjugate is .
Inner products
Section titled “Inner products”The expression is a complex number. It describes overlap between vectors. The basis states are orthonormal: and .
For ,
The probability of a Z-basis outcome 1 is .
Outer products are operators
Section titled “Outer products are operators”is a matrix, not a scalar:
It projects onto the direction. The distinction is visual: a bra followed by a ket gives an inner product; a ket followed by a bra gives an operator.
Check yourself: calculate . The two terms cancel, giving zero, even though their Z-basis probabilities are identical.
Track the shape of each expression
Section titled “Track the shape of each expression”Dirac notation is useful because it makes the shape of a calculation visible. A ket is a column, a bra is a row, and a bra followed by a ket gives a scalar. Reversing their order gives a matrix. Those are different objects even when they use the same symbols. Before evaluating an expression, identify its expected shape; many apparent quantum mysteries are ordinary matrix-shape errors.
The conjugation in a bra is equally important. Transposing a complex column without conjugating it generally gives the wrong inner product. For real examples the error can go unnoticed, so this lesson uses an imaginary component deliberately. A norm must be real and nonnegative, and a correctly normalised state must have inner product one with itself.
Worked example: an imaginary component
Section titled “Worked example: an imaginary component”Let the state have amplitudes one over the square root of two and i over the square root of two. Its bra has entries one over the square root of two and negative i over the square root of two. Their product is
Using an unconjugated row would instead give one half plus i squared over two, which is zero. That false answer would say a nonzero normalised vector has zero length. Checking the conjugation resolves the problem before any physical interpretation is needed.
The overlap with zero is the first amplitude, and the overlap with one is the second amplitude. Squaring the magnitude of either overlap gives one half. The overlap itself remains complex: it is an amplitude, not a probability. This distinction appears repeatedly in formulas such as the Born rule, where the vertical bars around an overlap mean squared magnitude rather than another ket delimiter.
Inner product versus outer product
Section titled “Inner product versus outer product”The outer product of the zero ket and zero bra is a matrix with one in its top-left entry and zero elsewhere. Acting on a general state, it keeps the zero component and removes the one component. It is a projector. Its output need not be normalised, because the squared norm of that output is the probability of the associated measurement outcome.
For the state above, the full outer product is
The diagonal entries are Z-basis probabilities. The off-diagonal entries carry coherence information. You do not need density-matrix machinery yet, but this example shows why a two-number probability list does not contain the entire state. Removing the off-diagonal entries would describe a different preparation, even though a Z histogram would be unchanged.
An identity can also be written as a sum of basis projectors. For one qubit, the zero projector plus the one projector gives the identity matrix. Applying that sum to a ket reconstructs the ket from its components. This is the meaning of expanding a state in a basis: each basis vector is weighted by its overlap with the state.
Compute an overlap in a different basis
Section titled “Compute an overlap in a different basis”The plus bra is the row with two positive entries divided by the square root of two. Its overlap with our example state is one half plus i over two. The squared magnitude is one half. The minus overlap is one half minus i over two and has the same squared magnitude. Thus this state produces equal probabilities in both Z and X measurements, despite being a definite pure state. In the Y basis it is one of the basis states itself.
The explorer opens at the corresponding angles: polar 90 degrees, relative phase 90 degrees. Predict the complex table entries, then reveal them. Apply H and calculate the two output components as sums and differences. The table lets you compare that matrix calculation with the overlaps for an X-basis readout. It exposes model amplitudes for learning; a physical measurement would return only a basis label.
Qubit explorer
Prepare a pure qubit, apply gates, then compare amplitudes, phases and Z-basis probabilities. Reset restores the initial preparation shown by the lesson’s controls.
Prepare your experiment using the controls. Record a prediction, then reveal the statevector or run the experiment.
Changing the preparation or circuit starts a new prediction.
Take it further
Prepare θ = 120°, φ = 90°. Predict both complex amplitudes. Then change φ without changing θ.
Initial setup · reference state
| Basis | Amplitude a + bi | Magnitude | Phase (rad) | Probability |
|---|---|---|---|---|
| |0⟩ | 0.707107 + 0i | 0.707107 | 0.000000 | 50.0% |
| |1⟩ | 0 + 0.707107i | 0.707107 | 1.570796 | 50.0% |
Signs and complex phases are part of the state. Phase is undefined for a zero amplitude. A shared global phase changes no probabilities; relative phases can affect a later operation. Values are rounded to six decimal places.
Prediction to try: Predict the amplitudes and Z-basis probabilities for the preparation and gates you have chosen. If starting from |0⟩, what will H do?
Challenge: Prepare θ = 120°, φ = 90°. Predict both complex amplitudes. Then change φ without changing θ.
Open the live experiment studioPractice: orthogonality and projection
Section titled “Practice: orthogonality and projection”Calculate the inner product of plus and minus. Then apply the zero projector to plus. State the probability represented by the output norm and the normalised state after that outcome is selected. Explain why the projected column is not itself a complete post-measurement state until it is normalised.
Check your reasoning
The plus-minus inner product is one half minus one half, so the states are orthogonal. The zero projector acting on plus gives the zero ket divided by the square root of two. Its squared norm is one half, the probability of obtaining zero. Conditional on that result, divide by its norm to obtain the zero ket. The probability and the conditional state play different roles and should both be retained in a measurement calculation.
Check your understanding
Section titled “Check your understanding”When reading a longer equation, annotate each intermediate shape in the margin. A projector times a ket gives a ket; a bra times that result gives a scalar. An operator expectation therefore has a scalar result even though a matrix appears in the middle. This habit scales to multiple qubits and makes later Hamiltonian and variational calculations easier to follow without memorising every formula.
For |ψ⟩ = (1, i)ᵀ/√2, which bra is correct?
Answer: (1, −i)/√2. The bra is the conjugate transpose. Conjugating i gives −i, so the self-inner-product is one.
Reference: IBM Quantum — Quantum information.
Ready for the next step?
Your progress stays in this browser.