Approximate quantum counting 2026-10-24
Approximate quantum counting estimates the number of satisfying assignments of a Boolean function, using a quantum oracle and quantum measurement. Controlled repetitions of a Grover search algorithm iteration let quantum interference reveal the count. For one input bit, a Hadamard test can give Pauli Z gate expectation value : with the complemented phase oracle and , use to obtain . Repeated preparations estimate this expectation value; one binary measurement result does not distinguish all three counts .
Bit-flip repetition code Created 2026-09-28 Updated 2026-10-14
The -qubit bit-flip repetition code stores one logical qubit in and . Its stabilizer generators are for , and its logical operators are and . Interchanging the Pauli X gate and Pauli Z gate gives the phase-flip repetition code. For odd , majority-vote decoding of a repetition code corrects up to physical Pauli X gate errors, assuming ideal operations and a noise family containing only these bit flips.
For , prepare two quantum ancillas in and apply controlled-NOT gates from the input qubit to each of them. By linearity, encoding sendsThis does not produce , which would contain cross terms. For example, encoding produces , whereas three independent copies would have eight equal computational basis amplitudes. The encoding creates quantum entanglement when both coefficients are nonzero and respects the no-cloning theorem.
The three-qubit bit-flip syndrome table corrects the family and its entire linear span, as specified by the Knill--Laflamme condition. It cannot correct arbitrary errors on one physical qubit: the phase flipcommutes with both checks and acts as logical . In particular, it takes the encoded to the orthogonal encoded with error syndrome . Thus its full quantum code distance is one, despite correcting one error of the restricted Pauli X gate type. The Shor code, Steane code and five-qubit error correcting code provide protection against arbitrary one-qubit errors.
Equatorial measurement of a graph-state leaf 2026-10-06
Let be a leaf with neighbour and let the graph on the other vertices be generated by the Controlled-Z gate product . If the leaf has Pauli Z gate frame , measuring it at angle with result applies one-bit teleportation and leavesAny known Pauli Z gate frames on other vertices remain as additional factors before those vertices' input states. The identity combines the leaf byproduct with the measurement result.
Let be the SWAP gate. If the drift Hamiltonian operator and every allowed control Hamiltonian operator commute with , every reachable time-evolution operator also commutes with . Indeed, satisfies the same initial-value Schrödinger equation as and starts at , so uniqueness gives . Yet . An individual Pauli Z gate is consequently unavailable within that symmetric control model. Equal nuclear resonances, isotropic exchange interaction, and identical coupling to a common homogeneous radio frequency field provide an example. An added interaction that breaks this symmetry can remove the obstruction.
Hadamard gate Created 2026-09-24 Updated 2026-10-20
The Hadamard gate is the unitary operatorwhere is the identity operator. It maps the computational basis to the Hadamard basis:
These outputs have equal computational-basis measurement probabilities, but their relative quantum phase differs. Applying another Hadamard gate sends them to different definite outputs. Calling this gate a classical coin toss would discard precisely the information that makes this possible. [ref]
https://quantum.cloud.ibm.com/learning/en/courses/basics-of-quantum-information/single-systems/quantum-information. Watrous, IBM Quantum Learning, unitary operations on qubits
.Starting from , compare two quantum circuits, reading matrix products from right to left:Here is the Pauli Z gate. After the first Hadamard gate, the probability amplitudes are . Inserting changes them to without changing their squared magnitudes. At the final gate, the contributions to output zero cancel and those to output one add. Without , cancellation occurs at output one instead. This is controlled interference, with the quantum phase determining which answer emerges.
The same calculation works for any phase gate :For example, gives , while gives . The output-one amplitude at is : its two complex contributions add before the Born rule is applied. A phase gate alone leaves the populations unchanged; recombination converts its relative quantum phase into observable probabilities.
Hadamard interference: a relative phase changes output probabilities through complex amplitude addition; the dotted circle traces the output-one amplitude as the phase varies
. Details. If quantum decoherence completely removes the computational basis coherence between the gates, the intermediate density matrix becomes . Both the phase gate and final Hadamard gate leave unchanged, so for every . The disappearing fringe explains why preserving quantum coherence matters: it enables the gate sequence to carry phase information into the final measurement.
Heisenberg exchange echo 2026-10-25
For , , and an individually applied Pauli Z gate , conjugation gives . The paired Pauli operators commute with one another, soTwo equal free-evolution intervals, each of duration , therefore cancel exchange while retaining the Ising coupling. This spin echo is exact for instantaneous ideal gates; a finite pulse requires accounting for the interaction during the pulse. A simultaneous Pauli Z gate on each spin commutes with and cannot perform the same cancellation. The physical availability of the individual gate is a separate quantum control requirement.
Inverse quantum circuit Created 2026-09-24 Updated 2026-09-24
The inverse of a quantum circuit applies the adjoints of its gates in reverse temporal order. The Hadamard gate, Pauli Z gate, and controlled-NOT gate are each self-inverse.
The phase-flip repetition code with codewords corrects any one physical Pauli Z gate error. Its two adjacent-pair error syndromes cannot distinguish an error pattern from its three-bit complement. Minimum-weight recovery therefore leaves no residual error at weight zero or one, and leaves at weight two or three. This residual operator exchanges the codewords, so inverse encoding gives a logical Pauli X gate. For independent physical phase errors of probability , the decoded quantum channel is , where . For , .
The codewords have residual logical Pauli X gate after an uncorrectable two- or three-site phase error. Precede their encoding by a logical Hadamard gate and follow decoding by its inverse. Since , the same error now acts as a logical Pauli Z gate. Explicitly the encoded coefficients are and for an input . This convention matters when translating physical phase errors into a claimed decoded phase-error channel.
Mixed-state Hadamard-test quadratures 2026-10-14
For the Hadamard test with a density operator in the auxiliary register, the output control qubit has Pauli Z gate expectation and Pauli Y gate expectation , where . The minus sign comes from the final Hadamard gate, since . Measuring in therefore estimates the imaginary part using the minus-outcome frequency minus the plus-outcome frequency.
Write the Steane code basis as uniform quantum superpositions over a binary linear code and a disjoint coset , where is the even-weight part of the length-seven Hamming code. For , diagonal Pauli Z gates cannot connect the two cosets. Within coset , the overlap isIf , translation by a word with negates this sum, so it vanishes. Since the dual code is the length-seven Hamming code of minimum Hamming distance three, every nonzero of Hamming weight one or two has vanishing overlap. Taking from proves the displayed identity. The eight two-dimensional error images are orthogonal, so their projective measurement determines the error syndrome without revealing the logical state; applying the identified phase flip again recovers every code state. This proves nondegenerate quantum error-correcting code behaviour for the identity and all single-site phase flips, including their coherent linear span.
The columns are and . Their norms are one and their inner product is zero, since are orthonormal. Thus is a unitary matrix. Equivalently,using the Hadamard gate and Pauli Z gate. The different column phases do not destroy orthonormality.
The Pauli Z gate gives a rotation through about the axis of the Bloch sphere. In Bloch vector coordinates,For example, this follows from , and in the Pauli matrix expansion .
In the ordered computational basis , the Pauli X gate, Pauli Y gate, Pauli Z gate, Hadamard gate and T gate areIn the ordered two-qubit computational basis , with the first qubit controlling the second, the controlled-NOT gate isHere the T gate uses the conventional representative with first diagonal entry one; another common representative differs only by a global phase.
Initialize two qubits in . A Hadamard gate on the first followed by a controlled-NOT gate prepares the Bell state . The permitted T gates and Hadamard gates implement the needed Pauli gates exactly:Apply , followed by . These are a Pauli Z gate on the first qubit and a Pauli X gate on the second, givingEvery operation is in the allowed gate set; no quantum measurement or probabilistic branch is needed.
For teleportation with an ambiguous Bell-state phase label, write . The Bell-basis measurement outcomes and each occur with probability . In either case a correct guess gives Bob , while the wrong guess differs by the Pauli Z gate and gives . The other two Bell states are identified correctly. Since Alice guesses each ambiguous label with probability , the overall wrong-correction probability is . Averaging over the actual quantum measurement outcome and her guess gives the phase-flip channelConditional only on an ambiguous analyzer result, the output is ; that conditional channel has weight in the displayed unconditional result. There is no rejection of those rounds.
Use the teleportation fidelity for a pure state target, namely the squared quantum fidelityThis compares the input with the resulting mixed state; averaging state vectors before forming a density matrix would give a different, incorrect answer. Direct substitution givesThus the maximum is , attained by and up to a global phase, because these are eigenstates of the Pauli Z gate. The minimum is , attained by every equal-weight quantum superpositionon the equator of the Bloch sphere. The unsquared quantum fidelity is if that alternative convention is used. No average over different input quantum states is needed for the requested state-dependent answer.
For one input bit, a Boolean function is specified by the pair , and counts its satisfying assignments. In the ordered computational basis , the supplied phase oracle convention givesHere is exclusive or: the oracle changes the sign of the inputs with . With the identity matrix and the Pauli Z gate, all four cases areThe two middle cases are balanced Boolean functions; the others are constant functions. The specified zero-state sign change and the Hadamard gate are
Use the top qubit as the first tensor product factor. Write the controlled unitary gate as . Reading the bracketed quantum circuit from left to right, its four operations are , , , . Thus the target operation in its control-one branch iswhere the rightmost matrix acts first. The control-zero branch is the identity operator. The Hadamard conjugation of a controlled gate identity givesIndeed, on control zero the replacement applies to the target, while on control one both sides apply . By linearity, the identity holds on every quantum superposition and therefore in every repetition of the bracket. This replaces the two internal controlled Hadamard gates as a pair.
The global phase of a controlled quantum gate must be preserved: , whereas . Consequently the minus signs in and the special phase oracles cannot be discarded as an unobservable global phase of the complete quantum circuit.
Set . Define the quantum rotating frame byThe isotropic Heisenberg model coupling commutes with the total spin angular momentum, so . The transformed Hamiltonian operator is thereforeHere removal of the common Zeeman energy is exact; the exchange is resonant and cannot be discarded using the weak coupling condition for two NMR spins.
Put , , and . Exponentiating the parallel-spin entries and the middle matrix gives the time-evolution operatorFor example, at this equals the SWAP gate times , which checks both the exchange angle and the overall phase.
The printed network reads from left to right as , a Pauli Z gate on the upper spin only, , and another upper-spin Pauli Z gate. LetIts total time-evolution operator, with the first operation on the right, is . For this Heisenberg exchange echo,The three paired Pauli operators , , commute pairwise: for example both products and equal . Thus commutes with , andThe spin echo cancels the exchange terms and retains the Ising coupling. Equivalently, over the total free-evolution time it produces the effective Hamiltonian operator exactly for ideal instantaneous gates. It is generally not the identity. A physical rotation about is ; using two such pulses instead of the ideal gates changes only by a physically irrelevant global phase of minus one.
The implementation requires frequency-selective spin control. Under the usual common-radio frequency NMR assumptions, equal resonance frequencies give no way to apply a pulse to the first spin while leaving the second untouched. For equally coupled spins in a spatially uniform control field, the transverse control Hamiltonian operator has the formBoth this control and the drift Hamiltonian operator commute with the SWAP gate . Every reachable time-evolution operator consequently commutes with . But : the individual pulse required by the diagram fails this symmetry test. This is the exchange symmetry obstruction to individual spin control. Applying simultaneous gates gives , which commutes with and instead yields ; it does not refocus the exchange. A common change of the RF phase reference also supplies only a collective rotation.
This obstruction assumes the usual common-RF control with no extra handle distinguishing the spins. Equal resonance frequencies do not universally forbid individual addressing: a spatially selective field, unequal control couplings, or another symmetry-breaking interaction could alter controllability. Such resources are absent from the specified equivalent-spin NMR model.
Quantum error correction encodes a logical qubit redundantly, obtains an error syndrome without measuring its unknown logical amplitudes, and applies a recovery that reverses the specified errors. A decoherence-free subspace instead uses a symmetry of a specified noise model: each noise operator acts as a scalar on the entire encoded space, so no syndrome-dependent recovery is required. This is passive protection and can also be viewed as a special case of quantum error correction.
For the two-spin decoherence-free encoding, chooseSimultaneous Pauli Z gates givesoBoth logical components acquire the same global phase; their relative phase and amplitudes survive. The density matrix is exactly unchanged, so even an unknown random choice between applying and causes no logical dephasing.
More strongly, the encoding protects against arbitrary collective dephasing:because both basis states have total eigenvalue zero. At , , consistent with the previous overall phase. The protection relies on correlated noise: independent rotations generally change the logical relative phase, and this two-spin code does not protect a whole logical qubit against arbitrary collective rotations about all three axes or against arbitrary single-spin errors.
Use the ordered computational basis , with qubit 1 written first. The half-time gate requires a branch convention. Even stationary Hamiltonian evolution with does not uniquely specify : different accumulated eigenstate phases can agree at and differ at . In particular, both and below square to SWAP gate and leave unchanged. Adopt the conventional continuous isotropic exchange interaction branch, with a relative singlet phase increasing from to during the full pulse. This is the exchange square-root branch convention.
The symmetric and antisymmetric eigenstateshave SWAP gate eigenvalues . Let and be their antisymmetric and symmetric orthogonal projectors. The adopted exchange evolution isFor effective spin-one-half qubits, , an isotropic exchange interaction plus an energy offset that fixes the common phase. At half time choose on the symmetric sector and on the antisymmetric sector, the conventional principal square-root value of . Hence the square root of the SWAP gate isThus , , and , where and . The identities and verify , and the projector form proves unitarity. The endpoint truth table alone would allow other matrix square roots; the stated exchange branch supplies the additional physical assumption.
For the network, fix the Pauli Z gate, Hadamard gate and S gate conventionsThe letter distinguishes this local S gate from the two-qubit exchange gate . In particular ; replacing by changes the network. Subscripts specify the acted-on qubit: , and . Operators act rightmost first, so the printed quantum circuit is
First multiply the central two exchange pulses. Since , their off-diagonal terms cancel:This reduces the entire network to . Its action on all four computational basis states, retaining every relative quantum phase, isEquivalently,It flips the second qubit when the first is zero and contributes when the first is one. That conditional phase cannot be discarded as a global phase.
To obtain the standard CNOT gate controlled by qubit 1, append an gate to qubit 2 and to qubit 1. They commute, andFor control zero, undoes the original flip. For control one, it supplies the desired flip and cancels the phase because . This phase-corrected exchange network for a CNOT gate realizes the standard gate exactly with the declared conventions.
Finally, has equal Schmidt coefficients and is maximally entangled: a half exchange creates quantum entanglement although a full SWAP gate does not. More constructively, the network above produces a CNOT gate from two half exchanges and local gates. Since CNOT gates and arbitrary single-qubit unitary operators form a universal quantum gate set, the square root of the SWAP gate and arbitrary single-qubit gates are universal. The alternative inverse exchange branch remains entangling and universal, but its phases and local correction must be recomputed consistently.
