I am running some tests using the probabilities we get from statevector to assert values in qiskit. For instance, with two qubits and a hadamard gate on the first one we have:
circuit = QuantumCircuit(2)
circuit.h(0)
trace_out_qubits = [1]
partial_trace = qi.partial_trace(qi.Statevector(circuit), trace_out_qubits)
print(partial_trace.probabilities())
plot_bloch_multivector(partial_trace)
The output of the print statement is [0.5 0.5] and the bloch sphere looks like this:
If we replace the Hadamard gate with the SX gate, we have:
circuit = QuantumCircuit(2)
circuit.sx(0)
trace_out_qubits = [1]
partial_trace = qi.partial_trace(qi.Statevector(circuit), trace_out_qubits)
print(partial_trace.probabilities())
plot_bloch_multivector(partial_trace)
The output is also [0.5 0.5], and the bloch sphere looks like this:
So, it looks like the sx acts similarly to the hadamard gate but with a rotation of pi/2, putting the |0⟩ in superposition.
My doubts:
- Are the SX and Hadamard gate equivalent when it comes to superposition?
- Can we use the SX gate together with the CX gate to entangle two qubits?
- In case the answers to these two questions are positive, what are all the other operators that put qubits in superposition? Can any operator that puts the vector on the plane XY be a "superposition" operator?
Thank you,