Last active
March 16, 2022 21:17
-
-
Save pdc-quantum/9595a0d220134e4bedc32a8706f0266f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from qiskit import QuantumCircuit | |
init_list = np.array([0., 0., 0., 2., 0., -1., -1., 0., | |
0., -1., -1., 0., 2., 0., 0., 0.]) / ( 2*np.sqrt(3) ) | |
circuit = QuantumCircuit(4) | |
circuit.initialize(init_list, circuit.qubits) | |
# add Pauli-Z measurements and draw the circuit | |
circuit.measure_active() | |
circuit.draw(output='mpl') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment