Day 3 — Quantum Operations
Question Bank
C1000-179 style. 20 questions, single best answer (A–D). No answers in this file — see solution-bank.md.
Q1. In Qiskit, Pauli('IZ') applies the Z operator to which qubit?
- A. Qubit 1, because 'Z' is the second character
- B. Qubit 0, because Pauli strings are little-endian (rightmost character = qubit 0)
- C. Both qubits
- D. Neither; 'IZ' is an invalid label
Q2. What is the diagonal of Pauli('IZ').to_matrix()?
- A.
[1, 1, -1, -1] - B.
[1, -1, -1, 1] - C.
[1, -1, 1, -1] - D.
[-1, 1, -1, 1]
Q3. What does Pauli('-iXY').phase return?
- A.
0 - B.
1 - C.
2 - D.
3
Q4. What is the output of the following?
from qiskit.quantum_info import Pauli
print(Pauli('X').compose(Pauli('Y')))- A.
iZ - B.
Z - C.
-iZ - D.
XY
Q5. What does Pauli('X') @ Pauli('Z') evaluate to (@ is the dot product, X·Z)?
- A.
iY - B.
-iY - C.
Y - D.
-Y
Q6. What does this print?
from qiskit.quantum_info import SparsePauliOp
op = SparsePauliOp.from_list([("XX", 1.0), ("XX", 1.0), ("ZZ", 0.0)])
print(op.simplify())- A.
SparsePauliOp(['XX', 'ZZ'], coeffs=[2.+0.j, 0.+0.j]) - B.
SparsePauliOp(['XX'], coeffs=[2.+0.j]) - C.
SparsePauliOp(['XX', 'XX', 'ZZ'], coeffs=[1.+0.j, 1.+0.j, 0.+0.j]) - D.
SparsePauliOp(['XX'], coeffs=[1.+0.j])
Q7. Which Pauli string does this produce?
SparsePauliOp.from_sparse_list([("ZX", [1, 4], 2.0)], num_qubits=5)- A.
'IZIIX' - B.
'ZXIII' - C.
'XIIZI' - D.
'IZIXI'
Q8. After op = SparsePauliOp.from_list([("Z", 1.0)]), what is the dtype of op.coeffs?
- A.
float64, since 1.0 is a float - B.
complex128, coefficients are always stored as complex - C.
int64 - D.
object
Q9. Statevector.from_label('10') has its single nonzero amplitude at which index of the statevector array?
- A. 0
- B. 1
- C. 2
- D. 3
Q10. What does this print?
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
qc = QuantumCircuit(2)
qc.x(0)
print(Statevector.from_instruction(qc).probabilities_dict())- A.
{'10': 1.0} - B.
{'01': 1.0} - C.
{'00': 1.0} - D.
{'11': 1.0}
Q11. For the Bell state (|00⟩ + |11⟩)/√2, what is expectation_value(SparsePauliOp(['ZI']))?
- A.
1 - B.
-1 - C.
0.5 - D.
0
Q12. Which circuit prepares the Bell state (|00⟩ + |11⟩)/√2 from |00⟩?
- A.
qc.cx(0, 1); qc.h(0) - B.
qc.h(0); qc.cx(0, 1) - C.
qc.h(0); qc.h(1) - D.
qc.x(0); qc.cx(0, 1)
Q13. Which matrix is the S gate?
- A.
[[1, 0], [0, -1]] - B.
[[1, 0], [0, e^{iπ/4}]] - C.
[[1, 0], [0, i]] - D.
(1/√2)[[1, 1], [1, -1]]
Q14. Applying the T gate twice in a row is exactly equal (not just up to phase) to which single gate?
- A. S
- B. Z
- C. X
- D. H
Q15. The circuit h(0); z(0); h(0) implements which single-qubit gate?
- A. Z
- B. Y
- C. H
- D. X
Q16. Given:
import numpy as np
from qiskit import QuantumCircuit
from qiskit.quantum_info import Operator, Pauli
qc = QuantumCircuit(1)
qc.rz(np.pi, 0)
a = Operator(qc) == Operator(Pauli('Z'))
b = Operator(qc).equiv(Operator(Pauli('Z')))What are a and b?
- A.
a = True,b = True - B.
a = False,b = True - C.
a = True,b = False - D.
a = False,b = False
Q17. Which pair of operators commutes?
- A.
Pauli('X')andPauli('Z') - B.
Pauli('XI')andPauli('ZI') - C.
Pauli('XX')andPauli('ZZ') - D. None of the above
Q18. Applying Z to the state |+⟩ produces |−⟩. What is the effect on the outcome probabilities of an immediate computational-basis (Z-basis) measurement?
- A. '0' becomes certain
- B. '1' becomes certain
- C. Probabilities are unchanged (still 50/50); only the relative phase changed
- D. The state acquires only a global phase, so nothing about the state changed at all
Q19. For bell = Statevector of (|00⟩ + |11⟩)/√2, what is partial_trace(bell, [1])?
- A. The pure state |0⟩⟨0|
- B. The maximally mixed state I/2, with purity 0.5
- C. The pure state |+⟩⟨+|
- D. An error — you cannot trace out part of an entangled state
Q20. What does this print (up to numerical precision)?
from qiskit.quantum_info import Statevector, Pauli
sv = Statevector.from_label('+0')
print(sv.expectation_value(Pauli('XI')), sv.expectation_value(Pauli('IX')))- A.
1.0 0.0 - B.
0.0 1.0 - C.
1.0 1.0 - D.
0.0 0.0