# Bloch Sphere of Qiskit logo

Trying to plot the Bloch Sphere of the IBM Qiskit logo

from qiskit import execute, Aer, IBMQ, QuantumCircuit
from qiskit.quantum_info import Statevector
from qiskit.visualization import plot_state_qsphere, plot_bloch_multivector
%matplotlib inline

# no. of qubits
n = 4

# create circuit
qc = QuantumCircuit(n)

qc.h(0)

# apply cnot
for i in range(n-1):
qc.cx(0, i+1)

# apply not on q1
qc.x(1)

# get state vector
sv = Statevector.from_instruction(qc).data

# plots
plot_state_qsphere(sv)
plot_bloch_multivector(sv)


Why the Bloch Sphere does not have any state representations?

• The logo is a Qsphere not a Bloch sphere. The former is a multi Qubit statevector visualization whereas the latter is for single qubits. Commented Mar 28, 2021 at 13:35
• @PaulNation Thanks. plot_bloch_multivector is for visualizing the individual qubits. It works for other circuits. What am I missing here? Commented Mar 28, 2021 at 13:37
• If each qubit is maximally entangled with the others then the bloch cector has zero length. Try a bell state for example. Commented Mar 28, 2021 at 13:39
• @PaulNation that explains it! Cheers!! Commented Mar 28, 2021 at 13:46

As @PaulNation explained, the bloch spheres represent maximally entangled qubits as zero-length vectors. Hence, no arrows.

The Qiskit logo is a qsphere of a particular statevector. In particular, a 6-qubit state, according to Abe:

from qiskit.visualization import plot_state_qsphere
state = [0]*2**6
state[2] = 1; state[61] = 1
plot_state_qsphere(state, show_state_labels=False)


So... you are actually really really close. Just change n = 6 I you will get it!

from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
from qiskit.visualization import plot_state_qsphere

n = 6
qc = QuantumCircuit(n)
qc.h(0)
for i in range(n-1):
qc.cx(0, i+1)
qc.x(1)

sv = Statevector.from_instruction(qc)
plot_state_qsphere(sv, show_state_labels=False)


To increase the similarity, delete the legend and modify the elevation:

fig = plot_state_qsphere(sv, show_state_labels=False)
fig.axes[0].view_init(elev=11, azim=275)
fig.axes[1].set_visible(False)
fig


• do qiskit logo have any special meaning, where is it come from?
– poig
Commented Jul 14, 2022 at 18:16

Apply these gates in order:

circuit=QuantumCircuit(4)
circuit.h(1)
circuit.cx(1,0)
circuit.cx(1,2)
circuit.cx(1,3)
circuit.x(1)