• Members 17 posts
    Sept. 5, 2021, 8:14 a.m.

    I generated a quantum circuit in qiskit, and use plot_state_city to plot the density matrix. I am wondering if there is any way I can add numerical values on every element.

    Example:

    from qiskit import QuantumCircuit, execute
    from qiskit.quantum_info import DensityMatrix
    from qiskit.visualization import plot_state_city
    %matplotlib inline
    
    qc = QuantumCircuit(2)
    qc.h(0)
    qc.cx(0,1)
    
    state = DensityMatrix.from_instruction(qc)
    plot_state_city(state)