Z-Gate
What You Get Is Not What You See
The Z-gate changes the phase of the

What You Get Is Not What You See
When you apply a A quantum gate is a basic operation that changes the state of one or more qubits, similar to how a logic gate operates on bits in classical computing. It uses unitary transformations, meaning it preserves the total probability (the state’s length in complex space). Quantum gates enable superposition and entanglement, allowing quantum computers to perform computations that classical ones cannot efficiently replicate.
Learn more about Quantum Gate to a A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit, you expect to see a change when you In quantum computing, measurement is the process of extracting classical information from a quantum state. It collapses a qubit’s superposition into one of its basis states (usually
Learn more about Measurement it. That is how classical logic works: flip a A bit (short for “binary digit”) is the smallest unit of data in computing, representing a value of either 0 or 1. It’s the fundamental building block of all digital information. Multiple bits combine to form larger units like bytes (8 bits) and encode more complex data such as numbers, text, or images.
Learn more about Binary Digit see the result.
This post is accompanied by a PDF file summarizing the key points.
But that's not how Quantum Computing is a different kind of computation that builds upon the phenomena of Quantum Mechanics.
Learn more about Quantum Computing works. When we look only at what we can measure immediately, we miss the operation that makes Interference in quantum computing refers to the way probability amplitudes of quantum states combine—sometimes reinforcing each other (constructive interference) or canceling out (destructive interference). Quantum algorithms exploit this to amplify the probability of correct answers while suppressing incorrect ones. It’s a key mechanism that gives quantum computers their computational advantage.
Learn more about Interference possible.
There is one particular A quantum gate is a basic operation that changes the state of one or more qubits, similar to how a logic gate operates on bits in classical computing. It uses unitary transformations, meaning it preserves the total probability (the state’s length in complex space). Quantum gates enable superposition and entanglement, allowing quantum computers to perform computations that classical ones cannot efficiently replicate.
Learn more about Quantum Gate that perfectly exposes this misconception. On paper, it seems pointless. When you measure after applying it, nothing looks different. Yet this single gate is one of the key tools that gives Quantum Computing is a different kind of computation that builds upon the phenomena of Quantum Mechanics.
Learn more about Quantum Computing its power. This is the Pauli
The Pauli
Learn more about Quantum Operator that flips the A **quantum phase** is the angle component of a particle’s wavefunction that determines how its probability amplitude interferes with others. It doesn’t affect observable probabilities directly but becomes crucial when comparing two or more states, as phase differences lead to interference effects. Essentially, it encodes the relative timing or “alignment” of quantum waves.
Learn more about Quantum Phase of the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit
Learn more about
Learn more about Amplitude while leaving the
Learn more about
Learn more about Amplitude unchanged. Mathematically, it multiplies
Learn more about
So, apparently, the
Learn more about Quantum Bit in state
Learn more about
Learn more about
Learn more about Quantum Bit. But that is
Need some proof?
Take the definition of the
Learn more about
Applying a A quantum operator is a mathematical object that represents a physical action or measurement on a quantum state. It transforms one quantum state into another, often expressed as a matrix acting on a vector in Hilbert space. In quantum computing, operators correspond to quantum gates, which manipulate qubits according to the rules of linear algebra and quantum mechanics.
Learn more about Quantum Operator on a A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin.
Learn more about Quantum State means multiplying the operator matrix with the state vector:
Anyone can just write that down.
I have a (classical) computer to do that for me!
? compares the A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin.
Learn more about Quantum State
Learn more about
- In this code listing, we
- a A quantum circuit is a sequence of quantum gates applied to qubits, representing the operations in a quantum computation. Each gate changes the qubits’ state using quantum mechanics principles like superposition and entanglement. The final qubit states, when measured, yield the circuit’s computational result probabilistically.
Learn more about Quantum Circuit with a single Qubit in stateis a basis state.
Learn more about. - the statevector of
is a basis state.
Learn more about - the The Z-gate changes the phase of the
state by (or radians) while leaving the state unchanged. This means the amplitude of gains a negative sign, effectively flipping its phase. It's a phase-flip operation that rotates the quantum state vector a half turn around the Z-axis of the Bloch sphere.
Learn more about Z-Gate - the statevector of
? shows the output.
As we can easily see, they're the same.
OK. It doesn't change because the In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions.
Learn more about Amplitude of
Learn more about
Learn more about
Learn more about
But things don't even change when the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit is in state
Learn more about
Wait! That is different. Here, the
Learn more about
However, applying the
Learn more about
Learn more about Global Phase of
Learn more about Quantum Mechanics multiplying an entire A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin.
Learn more about Quantum State by a constant A **quantum phase** is the angle component of a particle’s wavefunction that determines how its probability amplitude interferes with others. It doesn’t affect observable probabilities directly but becomes crucial when comparing two or more states, as phase differences lead to interference effects. Essentially, it encodes the relative timing or “alignment” of quantum waves.
Learn more about Quantum Phase, such as
Learn more about Measurement.
And here's why. Probabilities in Quantum mechanics is the branch of physics that describes the behavior of matter and energy at atomic and subatomic scales.
Learn more about Quantum Mechanics depend on the squared magnitude of the A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin.
Learn more about Quantum State In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions.
Learn more about Amplitude If every In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions.
Learn more about Amplitude is multiplied by the same phase factor, the magnitudes remain the same.
That’s equivalent to rotating the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit overall phase by
Learn more about Quantum Phase applies equally to the whole A quantum state vector is a mathematical object (usually denoted |ψ⟩) that fully describes the state of a quantum system. Its components give the probability amplitudes for finding the system in each possible basis state. The squared magnitude of each component gives the probability of measuring that corresponding outcome.
Learn more about Quantum State Vector it has no observable effect. There is no change in In quantum computing, measurement is the process of extracting classical information from a quantum state. It collapses a qubit’s superposition into one of its basis states (usually
Learn more about Measurement probabilities or Interference in quantum computing refers to the way probability amplitudes of quantum states combine—sometimes reinforcing each other (constructive interference) or canceling out (destructive interference). Quantum algorithms exploit this to amplify the probability of correct answers while suppressing incorrect ones. It’s a key mechanism that gives quantum computers their computational advantage.
Learn more about Interference patterns if this A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit is isolated.
Geometrically, ? shows that the vector doesn't effectively change.
The
Learn more about Quantum State Vector around the
Learn more about Bloch Sphere. But since the A quantum state vector is a mathematical object (usually denoted |ψ⟩) that fully describes the state of a quantum system. Its components give the probability amplitudes for finding the system in each possible basis state. The squared magnitude of each component gives the probability of measuring that corresponding outcome.
Learn more about Quantum State Vector of
Learn more about
Finally, when "Nothing Happens"
What else can we try? How about a A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit in Superposition in quantum computing means a quantum bit (qubit) can exist in multiple states (0 and 1) at the same time, rather than being limited to one like a classical bit. Mathematically, it’s a linear combination of basis states with complex probability amplitudes. This allows quantum computers to process many possible inputs simultaneously, enabling exponential speedups for certain problems.
Learn more about Superposition. That means, a A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit in a A basis state in quantum computing is one of the fundamental states that form the building blocks of a quantum system’s state space. For a single qubit, the basis states are
Learn more about Basis State of the The Fourier basis is a set of sine and cosine functions that can represent any periodic signal as a weighted sum of these functions. Each basis function corresponds to a specific frequency, capturing how much of that frequency is present in the signal. In essence, it’s the coordinate system for expressing signals in terms of their frequency components instead of time.
Learn more about Fourier Basis, such as
Given a A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit in
This time, the minus sign only applies to one of the two In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions.
Learn more about Amplitude. We shifted the A **quantum phase** is the angle component of a particle’s wavefunction that determines how its probability amplitude interferes with others. It doesn’t affect observable probabilities directly but becomes crucial when comparing two or more states, as phase differences lead to interference effects. Essentially, it encodes the relative timing or “alignment” of quantum waves.
Learn more about Quantum Phase of
Learn more about
Learn more about Bloch Sphere as shown in ?.
It's my turn now to see it in action!
? prepares a A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit in
Learn more about Z-Gate on it, and compares both A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin.
Learn more about Quantum State
- In this code listing, we
- a A quantum circuit is a sequence of quantum gates applied to qubits, representing the operations in a quantum computation. Each gate changes the qubits’ state using quantum mechanics principles like superposition and entanglement. The final qubit states, when measured, yield the circuit’s computational result probabilistically.
Learn more about Quantum Circuit with a single Qubit in stateis a basis state.
Learn more about. - the The Hadamard operator, often denoted H, is a single-qubit quantum gate that creates an equal superposition of
and . In other words, It turns the states of the computational basis and into the states of the Fourier basis and .
Learn more about Hadamard Operator to turn the qubit fromis a basis state.
Learn more aboutinto - the statevector of
- the The Z-gate changes the phase of the
state by (or radians) while leaving the state unchanged. This means the amplitude of gains a negative sign, effectively flipping its phase. It's a phase-flip operation that rotates the quantum state vector a half turn around the Z-axis of the Bloch sphere.
Learn more about Z-Gate - the statevector of
- the two A quantum state vector is a mathematical object (usually denoted |ψ⟩) that fully describes the state of a quantum system. Its components give the probability amplitudes for finding the system in each possible basis state. The squared magnitude of each component gives the probability of measuring that corresponding outcome.
Learn more about Quantum State Vector - the In quantum computing, measurement is the process of extracting classical information from a quantum state. It collapses a qubit’s superposition into one of its basis states (usually
or ), with probabilities determined by the amplitudes of those states. After measurement, the qubit’s state becomes definite, destroying the original superposition.
Learn more about Measurement results of these two A quantum state is the complete mathematical description of a quantum system, containing all the information needed to predict measurement outcomes. It’s usually represented by a wavefunction or a state vector in a Hilbert space. The state defines probabilities, not certainties, for observable quantities like position, momentum, or spin.
Learn more about Quantum State
? shows the output of this compariosn.
As we see, the sign of the
Learn more about
Learn more about Quantum Phase phase between
Learn more about
Learn more about
Learn more about Z-Gate doesn't change In quantum computing, measurement is the process of extracting classical information from a quantum state. It collapses a qubit’s superposition into one of its basis states (usually
Learn more about Measurement probabilities.
That makes the gate look like it does nothing. It seems cosmetic, only.
The Power of a Sign
If you can’t see an effect, why bother?
Quantum mechanics is the branch of physics that describes the behavior of matter and energy at atomic and subatomic scales.
Learn more about Quantum Mechanics is built on Interference in quantum computing refers to the way probability amplitudes of quantum states combine—sometimes reinforcing each other (constructive interference) or canceling out (destructive interference). Quantum algorithms exploit this to amplify the probability of correct answers while suppressing incorrect ones. It’s a key mechanism that gives quantum computers their computational advantage.
Learn more about Interference. Every algorithm depends on it. Interference in quantum computing refers to the way probability amplitudes of quantum states combine—sometimes reinforcing each other (constructive interference) or canceling out (destructive interference). Quantum algorithms exploit this to amplify the probability of correct answers while suppressing incorrect ones. It’s a key mechanism that gives quantum computers their computational advantage.
Learn more about Interference is the process where two In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions.
Learn more about Amplitude combine. If their signs match, they reinforce each other; but if one has a minus sign, they cancel out.
The magnitudes of the two components are unchanged. The In quantum computing, measurement is the process of extracting classical information from a quantum state. It collapses a qubit’s superposition into one of its basis states (usually
Learn more about Measurement probabilities are identical. But the relative sign between
Learn more about
Learn more about
Learn more about Quantum Phase change that determines whether paths add or cancel when the A qubit is the basic unit of quantum information, representing a superposition of 0 and 1 states.
Learn more about Quantum Bit interacts with others.
But once we apply another Hadamard, the difference becomes visible!

HZH-Routine
The
Learn more about Quantum Computing A **quantum phase** is the angle component of a particle’s wavefunction that determines how its probability amplitude interferes with others. It doesn’t affect observable probabilities directly but becomes crucial when comparing two or more states, as phase differences lead to interference effects. Essentially, it encodes the relative timing or “alignment” of quantum waves.
Learn more about Quantum Phase is information. While the In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions.
Learn more about Amplitude tells you how much of each A basis state in quantum computing is one of the fundamental states that form the building blocks of a quantum system’s state space. For a single qubit, the basis states are
Learn more about Basis State you have, the A **quantum phase** is the angle component of a particle’s wavefunction that determines how its probability amplitude interferes with others. It doesn’t affect observable probabilities directly but becomes crucial when comparing two or more states, as phase differences lead to interference effects. Essentially, it encodes the relative timing or “alignment” of quantum waves.
Learn more about Quantum Phase tells you how those In quantum computing an amplitude is a complex number that describes the weight of a basis state in a quantum superposition. The squared magnitude of an amplitude gives the probability of measuring that basis state. Amplitudes can interfere, this means adding or canceling, allowing quantum algorithms to bias outcomes toward correct solutions.
Learn more about Amplitude will interact when combined or entangled. Without control of A **quantum phase** is the angle component of a particle’s wavefunction that determines how its probability amplitude interferes with others. It doesn’t affect observable probabilities directly but becomes crucial when comparing two or more states, as phase differences lead to interference effects. Essentially, it encodes the relative timing or “alignment” of quantum waves.
Learn more about Quantum Phase you cannot control Interference in quantum computing refers to the way probability amplitudes of quantum states combine—sometimes reinforcing each other (constructive interference) or canceling out (destructive interference). Quantum algorithms exploit this to amplify the probability of correct answers while suppressing incorrect ones. It’s a key mechanism that gives quantum computers their computational advantage.
Learn more about Interference and without Interference in quantum computing refers to the way probability amplitudes of quantum states combine—sometimes reinforcing each other (constructive interference) or canceling out (destructive interference). Quantum algorithms exploit this to amplify the probability of correct answers while suppressing incorrect ones. It’s a key mechanism that gives quantum computers their computational advantage.
Learn more about Interference A quantum algorithm is a step-by-step computational procedure designed to run on a quantum computer, exploiting quantum phenomena such as superposition, entanglement, and interference to solve certain problems more efficiently than classical algorithms.
Learn more about Quantum Algorithm reduce to classical randomness.
So, the minus sign guides the Interference in quantum computing refers to the way probability amplitudes of quantum states combine—sometimes reinforcing each other (constructive interference) or canceling out (destructive interference). Quantum algorithms exploit this to amplify the probability of correct answers while suppressing incorrect ones. It’s a key mechanism that gives quantum computers their computational advantage.
Learn more about Interference redirecting it from constructive to destructive in the right place.