Quantum
Gates
By: Iqra Naz
• Single Qubit Representation
• Quantum Logic Gates
• Gates Notation
• Gates Matrices
• Gate’s Bloch Sphere Representation
2Prepared By: Iqra Naz
3Prepared By: Iqra Naz
A quantum circuit is a computational routine
consisting of coherent quantum operations
on quantum data, such as qubits. It is an
ordered sequence of quantum gates,
measurements, and resets, which may be
conditioned on real-time classical
computation.
4Prepared By: Iqra Naz
• They are the building blocks of quantum
circuits.
• They are basic quantum circuits operating on
a small number of qubits.
• Quantum logic gates are reversible.
• Quantum logic gates are represented
by unitary matrices.
5Prepared By: Iqra Naz
6Prepared By: Iqra Naz
We can categorize Quantum Gates in to 2
categories:
• Single Qubit Quantum Gates
• Multiple Qubits Quantum Gates
7Prepared By: Iqra Naz
• Hadamard Gate
• Pauli Gates
• Phase Shifter (Rɸ) Gates
• I, S, T Gates
• General U Gates
8Prepared By: Iqra Naz
• The Hadamard gate is particularly important.
• It can be used to create a superposition of the
|0〉 and |1〉 states.
• It creates a rotation of around the x-axis by π
radians (180°) followed by a (clockwise)
rotation around the y-axis by π/2 radians (90°)
9Prepared By: Iqra Naz
10Prepared By: Iqra Naz
• The three most basic single-qubit gates
are:
• Pauli-X Gate
• Pauli-Y Gate
• Pauli-Z Gate
11Prepared By: Iqra Naz
• The X gate is directly analogous to the classical
NOT gate.
• It transforms |0〉 to |1〉 and |1〉 to |0〉.
• In terms of the Bloch Sphere, this is equivalent
to rotating around the x axis by π radians
(180°).
12Prepared By: Iqra Naz
• Similarly to Pauli-X gate, the Y gate represents
a rotation of around the y axis by π radians.
• It transforms |0〉 to i|1〉 and |1〉 to -i|0〉.
13Prepared By: Iqra Naz
• The Z gate is actually a special case of the
phase shift gate where 𝜙 = π = 180°.
• It represents a rotation of around the z axis
by π radians.
• It has no effect on |0〉 but transforms |1〉 to -
|1〉.
14Prepared By: Iqra Naz
• This is a family of single-qubit gates that leave the
basis state |0> unchanged and map |1> to
e^iɸ|1>.
• The probability of measuring a|0> or |1> is
unchanged after applying this gate, however it
modifies the phase of the quantum state.
• This is equivalent to tracing a horizontal circle (a
line of latitude) on the Bloch sphere by ɸ radians.
15Prepared By: Iqra Naz
• This is simply a gate that does nothing. Its matrix
is the identity matrix.
• circuit should have no effect on the qubit state.
• It is often used in calculations, for example:
proving the X-gate is its own inverse:
• It is considering real hardware to specify a ‘do-
nothing’ or ‘none’ operation.
16Prepared By: Iqra Naz
• The Phase gate ( S gate) is a single-qubit
operation.
• The S gate is also known as the phase gate or
the Z90 gate, because it represents a 90-
degree rotation around the z-axis.
• The conjugate transpose of S gate is S† gate.
17Prepared By: Iqra Naz
• The T-gate is a very commonly used gate, it is
an Rϕ-gate with ɸ = π/4.
• As with the S-gate, the T-gate is sometimes
also known as (Z)^(1/4) gate.
• The conjugate transpose of T gate is T† gate.
18Prepared By: Iqra Naz
• I, Z, S & T-gates were all special cases of the
more general Rϕ-gate.
• The U3-gate is the most general of all single-
qubit quantum gates.
• It is a parameterized gate of the form:
19
Prepared By: Iqra Naz
• Swap Gate
• Controlled Gates
• Toffoli (CCNOT) Gate
• Fredkin (CSWAP) gate
20Prepared By: Iqra Naz
• The swap gate swaps two qubits.
• With respect to the basis |00> |01>, |10>,
|11>.
• It is represented by the matrix:
21Prepared By: Iqra Naz
• Controlled gates require at least one control
and one target qubit the gate in question will
only operate on the target qubit if the control
qubit is in a specific state.
• These are:
• Cx Gate
• Cy Gate
• Cz Gate
22Prepared By: Iqra Naz
• Cx leaves the control qubit unchanged and
performs a Pauli-X gate on the target qubit
when the control qubit is in state |1⟩, leaves
the target qubit unchanged when the control
qubit is in state ∣0⟩.
23Prepared By: Iqra Naz
• The controlled or Cy gate is another well-used
two-qubit gate.
• Just as the CNOT applies an Y to its target
qubit whenever its control is in state |1⟩, the
controlled-Y applies a Y in the same case.
24Prepared By: Iqra Naz
• The controlled-Z or cz gate is another well-
used two-qubit gate.
• Just as the CNOT applies an X to its target
qubit whenever its control is in state |1⟩, the
controlled-Z applies a Z in the same case.
25Prepared By: Iqra Naz
• The Toffoli gate is a three qubit gate with two
controls and one target.
• It performs an X on the target only if both
controls are in the state |1⟩.
• The final state of the target is then equal to either
the AND or the NAND of the two controls,
depending on whether the initial state of the
target was |0⟩ or |1⟩.
• A Toffoli can also be thought of as a controlled-
controlled-NOT, and is also called the CCX gate.
26Prepared By: Iqra Naz
• It is controlled-SWAP gate.
• It only swaps the values of the second and
third bits only if the first bit is set to 1.
• It is also a reversible gate.
27Prepared By: Iqra Naz
28Prepared By: Iqra Naz
• (https://qiskit.org/textbook/ch-algorithms/defining-quantum-
circuits.html)
• Jun Zhang, Jiri Vala, Shankar Sastry, and K. Birgitta Whaley.
Optimal quantum circuit synthesis from controlled-unitary
gates.
• J. A. Jones, R. H. Hansen, and M. Mosca. Quantum logic gates
and nuclear magnetic resonance pulse sequences. Journal of
Magnetic Resonance
29Prepared By: Iqra Naz
30Prepared By: Iqra Naz

Quantum gates

  • 1.
  • 2.
    • Single QubitRepresentation • Quantum Logic Gates • Gates Notation • Gates Matrices • Gate’s Bloch Sphere Representation 2Prepared By: Iqra Naz
  • 3.
  • 4.
    A quantum circuitis a computational routine consisting of coherent quantum operations on quantum data, such as qubits. It is an ordered sequence of quantum gates, measurements, and resets, which may be conditioned on real-time classical computation. 4Prepared By: Iqra Naz
  • 5.
    • They arethe building blocks of quantum circuits. • They are basic quantum circuits operating on a small number of qubits. • Quantum logic gates are reversible. • Quantum logic gates are represented by unitary matrices. 5Prepared By: Iqra Naz
  • 6.
  • 7.
    We can categorizeQuantum Gates in to 2 categories: • Single Qubit Quantum Gates • Multiple Qubits Quantum Gates 7Prepared By: Iqra Naz
  • 8.
    • Hadamard Gate •Pauli Gates • Phase Shifter (Rɸ) Gates • I, S, T Gates • General U Gates 8Prepared By: Iqra Naz
  • 9.
    • The Hadamardgate is particularly important. • It can be used to create a superposition of the |0〉 and |1〉 states. • It creates a rotation of around the x-axis by π radians (180°) followed by a (clockwise) rotation around the y-axis by π/2 radians (90°) 9Prepared By: Iqra Naz
  • 10.
  • 11.
    • The threemost basic single-qubit gates are: • Pauli-X Gate • Pauli-Y Gate • Pauli-Z Gate 11Prepared By: Iqra Naz
  • 12.
    • The Xgate is directly analogous to the classical NOT gate. • It transforms |0〉 to |1〉 and |1〉 to |0〉. • In terms of the Bloch Sphere, this is equivalent to rotating around the x axis by π radians (180°). 12Prepared By: Iqra Naz
  • 13.
    • Similarly toPauli-X gate, the Y gate represents a rotation of around the y axis by π radians. • It transforms |0〉 to i|1〉 and |1〉 to -i|0〉. 13Prepared By: Iqra Naz
  • 14.
    • The Zgate is actually a special case of the phase shift gate where 𝜙 = π = 180°. • It represents a rotation of around the z axis by π radians. • It has no effect on |0〉 but transforms |1〉 to - |1〉. 14Prepared By: Iqra Naz
  • 15.
    • This isa family of single-qubit gates that leave the basis state |0> unchanged and map |1> to e^iɸ|1>. • The probability of measuring a|0> or |1> is unchanged after applying this gate, however it modifies the phase of the quantum state. • This is equivalent to tracing a horizontal circle (a line of latitude) on the Bloch sphere by ɸ radians. 15Prepared By: Iqra Naz
  • 16.
    • This issimply a gate that does nothing. Its matrix is the identity matrix. • circuit should have no effect on the qubit state. • It is often used in calculations, for example: proving the X-gate is its own inverse: • It is considering real hardware to specify a ‘do- nothing’ or ‘none’ operation. 16Prepared By: Iqra Naz
  • 17.
    • The Phasegate ( S gate) is a single-qubit operation. • The S gate is also known as the phase gate or the Z90 gate, because it represents a 90- degree rotation around the z-axis. • The conjugate transpose of S gate is S† gate. 17Prepared By: Iqra Naz
  • 18.
    • The T-gateis a very commonly used gate, it is an Rϕ-gate with ɸ = π/4. • As with the S-gate, the T-gate is sometimes also known as (Z)^(1/4) gate. • The conjugate transpose of T gate is T† gate. 18Prepared By: Iqra Naz
  • 19.
    • I, Z,S & T-gates were all special cases of the more general Rϕ-gate. • The U3-gate is the most general of all single- qubit quantum gates. • It is a parameterized gate of the form: 19 Prepared By: Iqra Naz
  • 20.
    • Swap Gate •Controlled Gates • Toffoli (CCNOT) Gate • Fredkin (CSWAP) gate 20Prepared By: Iqra Naz
  • 21.
    • The swapgate swaps two qubits. • With respect to the basis |00> |01>, |10>, |11>. • It is represented by the matrix: 21Prepared By: Iqra Naz
  • 22.
    • Controlled gatesrequire at least one control and one target qubit the gate in question will only operate on the target qubit if the control qubit is in a specific state. • These are: • Cx Gate • Cy Gate • Cz Gate 22Prepared By: Iqra Naz
  • 23.
    • Cx leavesthe control qubit unchanged and performs a Pauli-X gate on the target qubit when the control qubit is in state |1⟩, leaves the target qubit unchanged when the control qubit is in state ∣0⟩. 23Prepared By: Iqra Naz
  • 24.
    • The controlledor Cy gate is another well-used two-qubit gate. • Just as the CNOT applies an Y to its target qubit whenever its control is in state |1⟩, the controlled-Y applies a Y in the same case. 24Prepared By: Iqra Naz
  • 25.
    • The controlled-Zor cz gate is another well- used two-qubit gate. • Just as the CNOT applies an X to its target qubit whenever its control is in state |1⟩, the controlled-Z applies a Z in the same case. 25Prepared By: Iqra Naz
  • 26.
    • The Toffoligate is a three qubit gate with two controls and one target. • It performs an X on the target only if both controls are in the state |1⟩. • The final state of the target is then equal to either the AND or the NAND of the two controls, depending on whether the initial state of the target was |0⟩ or |1⟩. • A Toffoli can also be thought of as a controlled- controlled-NOT, and is also called the CCX gate. 26Prepared By: Iqra Naz
  • 27.
    • It iscontrolled-SWAP gate. • It only swaps the values of the second and third bits only if the first bit is set to 1. • It is also a reversible gate. 27Prepared By: Iqra Naz
  • 28.
  • 29.
    • (https://qiskit.org/textbook/ch-algorithms/defining-quantum- circuits.html) • JunZhang, Jiri Vala, Shankar Sastry, and K. Birgitta Whaley. Optimal quantum circuit synthesis from controlled-unitary gates. • J. A. Jones, R. H. Hansen, and M. Mosca. Quantum logic gates and nuclear magnetic resonance pulse sequences. Journal of Magnetic Resonance 29Prepared By: Iqra Naz
  • 30.