QuantumInfo.Finite.Qubit.Basic
34 declarations
The index set for a qubit basis ()
#QubitThe type `Qubit` is defined as the set of indices , represented by the finite type . In the context of quantum information, this serves as the index set for the computational basis states of a two-level south-system (a qubit).
Tactic for expanding and simplifying small matrix equalities
#matrix_expand`matrix_expand` is a tactic designed to prove equalities between small matrices. It operates by expanding matrix products into their individual entries and then simplifying the resulting expressions using standard real-number arithmetic. The tactic optionally accepts a list of simplification lemmas (via `[...]`) and a pattern for case-splitting/recursion (via `with ...`).
Pauli gate
#ZThe Pauli gate is a unitary operator acting on the Hilbert space of a single qubit, represented in the computational basis by the matrix: This operator maps the basis state to and the basis state to .
Pauli gate
#XThe Pauli gate is a unitary operator acting on the Hilbert space of a single qubit, represented in the computational basis by the matrix: This operator performs a bit-flip, mapping the basis state to and the basis state to .
Pauli gate
#YThe Pauli gate is a unitary operator acting on the Hilbert space of a qubit, represented in the computational basis by the matrix: where is the imaginary unit.
Hadamard gate for a qubit
#HThe Hadamard gate is a unitary operator acting on the Hilbert space of a qubit. In the computational basis (indexed by `Qubit`), it is represented by the matrix:
The gate (or phase gate) for a qubit
#SThe gate (also known as the Phase gate) is a unitary operator acting on the Hilbert space of a single qubit. In the computational basis , it is represented by the matrix: where is the imaginary unit. This operator corresponds to a rotation about the -axis of the Bloch sphere by an angle of , i.e., (up to a global phase).
The gate (or phase gate) for a qubit
#TThe gate is a unitary operator on a single qubit, defined by the matrix This corresponds to a rotation about the -axis of the Bloch sphere by an angle of , i.e., (up to a global phase).
The square of the Pauli operator is equal to the identity operator, i.e., .
For the single-qubit Pauli- gate, the square of the operator is equal to the identity operator, i.e., .
The square of the Pauli gate is equal to the identity operator on the qubit Hilbert space, meaning .
The square of the Hadamard gate is equal to the identity operator on the qubit Hilbert space, i.e., .
The square of the gate (phase gate) is equal to the Pauli gate, expressed as , where and are unitary operators acting on the single-qubit Hilbert space.
In the context of qubit operations, the square of the gate is equal to the gate (). Here, and denote the standard single-qubit phase gates.
Anticommutation of Pauli and gates
#X_Y_anticommThe Pauli and gates anticommute, satisfying the relation .
Let and be the Pauli- and Pauli- gates acting on the Hilbert space of a qubit. These operators satisfy the anticommutation relation .
Let and be the Pauli- and Pauli- gates acting on the Hilbert space of a qubit. These operators satisfy the anticommutation relation , or equivalently, the anticommutator is zero.
Let , , and be the Hadamard gate, the Pauli- gate, and the Pauli- gate acting on a qubit, respectively. Then the following operator identity holds:
Let , , and be the Hadamard gate, the Pauli- gate, and the Pauli- gate acting on a qubit, respectively. Then the following operator identity holds:
The qubit phase gate and Pauli- gate commute ()
#S_Z_commLet be the phase gate and be the Pauli- gate acting on a qubit. Then these operators commute, satisfying the identity:
and Gates Commute
#T_Z_commThe single-qubit phase gate and the Pauli gate commute, such that .
and gates commute
#S_T_commFor the single-qubit gates and , the commutation relation holds.
Controllized Unitary Operator
#controllizeGiven a Hilbert space and a unitary operator , the controllized version of is a unitary operator acting on the space (represented as ). The operator acts as the identity on the subspace corresponding to the qubit state and applies on the subspace corresponding to the qubit state . Formally, its matrix elements are defined as: \[ (C(U))_{(q_1, t_1), (q_2, t_2)} = \begin{cases} \delta_{t_1, t_2} & \text{if } q_1 = q_2 = 0 \\ U_{t_1, t_2} & \text{if } q_1 = q_2 = 1 \\ 0 & \text{otherwise} \end{cases} \] where are the control qubit indices and are indices in the target space .
Notation for the controllization of gate
#termC[_]For a given quantum gate or unitary operator acting on a -qubit system, denotes the controlled version of that gate, which is a unitary operator acting on a system of qubits (the control qubit and the original qubits).
The Controlled-NOT (CNOT) gate on two qubits
#CNOTThe Controlled-NOT gate, denoted as , is a unitary operator acting on a two-qubit system represented by the space (coordinated here as ). It is defined by applying the Pauli- gate (the quantum NOT gate) to the target qubit if and only if the control qubit is in the state . Formally, it is the result of the `controllize` operation applied to the single-qubit gate .
Matrix Representation of CNOT Gate
#CNOT_matrixThe matrix representation of the CNOT (Controlled-NOT) gate, acting on the product space of two qubits and reindexed using the standard equivalence , is given by the permutation matrix: where the entries are complex numbers .
Matrix Elements of for Control Qbit are Identity Elements
#controllize_apply_zero_zeroLet be a unitary operator acting on a -dimensional Hilbert space. Let denote the controlled version of , which is a unitary operator acting on the product space of a qubit and the -dimensional space, . For any indices in the -dimensional space, the matrix element of the controlled gate corresponding to the control qubit being in state is given by: \[ (C[g])_{(0, j_1), (0, j_2)} = I_{j_1, j_2} \] where is the identity operator in . This reflects that when the control qubit is , the operation applied to the target system is the identity.
The matrix element of a controlled gate is when the control qubit's state transitions from to .
#controllize_apply_zero_oneLet be a unitary operator acting on a system (denoted as ), and let denote the controlled version of where a qubit acts as the control. For any indices in the state space of , the matrix element of the controlled operator corresponding to the transition from the control qubit being in state and system being in state to the control qubit being in state and system being in state is zero. In other words, .
The matrix elements of for control qubit transitions and are zero.
#controllize_apply_one_zeroLet be a unitary operator acting on a -dimensional quantum system, denoted by . Let denote the controlled version of , acting on the composite system of a control qubit and the -dimensional target system, where the qubit states are indexed by . For any indices of the target system, the matrix element of the controlled operator corresponding to the control qubit being in state and transitioning to is zero. That is, .
The matrix element of with control qubit at is
#controllize_apply_one_oneLet be a unitary operator acting on a -qubit system, and let denote its controlled version acting on a -qubit system where the first qubit is the control. For any basis states and of the -qubit target system, if the control qubit is in state , the matrix elements of the controlled gate satisfy: where denotes the state of the control qubit being "on".
Let be two unitary operators acting on a -qubit system. Let denote the controllization of a unitary operator , which is a unitary operator on the combined system of a control qubit and the -qubit target. Then the product of the controllized operators is the controllization of the product of the operators, i.e., .
The controllization of the identity gate is the identity gate:
#controllize_oneFor any unitary operator acting on a -qubit system, its controlled version acting on the combined system of a control qubit and the -qubit target is equal to the identity operator on the combined system. Use to denote the controllization of a gate , and to denote the space of unitary operators on qubits.
Let be a unitary operator acting on a -qubit system, and let denote the controllized version of , acting on the composite space of a control qubit and the -qubit target. The product of the controllized operator and the controllized version of its inverse is the identity operator on the combined system.
Conjugation of Controlled by equals
#X_controllize_XLet be the Pauli-X gate acting on a qubit, and let be a unitary operator on a -qubit system. Let denote the controlled version of , where the first qubit acts as the control and the -qubit system is the target. Then the following identity holds: where denotes the identity operator and denotes the tensor product of operators.
