2
$\begingroup$

I am trying to create a circuit in Qiskit that performs the following transformations:

starting in state |00⟩ generates a √(2)/2 * (-|10⟩+|11⟩) state

starting in state |11⟩ generates a √(2)/2 * (|00⟩-|01⟩) state

I created a basic circuit for creating entangled states but I do not know how to infer relevant gates for such transformations.

def create_circuit():
    qr3  = qiskit.QuantumRegister(2)
    cr3  = qiskit.ClassicalRegister(2)
    qc3  = qiskit.QuantumCircuit(qr3 ,cr3)
    
    qc3.h(qr3[0]) # H
    qc3.cx(qr3[0], qr3[1]) # CNOT

    return qc3
$\endgroup$

1 Answer 1

4
$\begingroup$

Note that for the first state you have

$$ \dfrac{|11 \rangle - |10\rangle}{\sqrt{2}} = -|1\rangle \otimes \dfrac{|0 \rangle - |1\rangle}{\sqrt{2}} $$

This is a product or separable state. Hence no entanglement and therefore you don't need a two qubit gate.

Recall the mapping $X|0\rangle =|1\rangle$ and and $Z|1\rangle = -|1\rangle$ and $H|1\rangle = \dfrac{|0 \rangle - |1\rangle}{\sqrt{2}} $

So you are looking for something like

enter image description here

** Note the circuit is in little endian convention (read from bottom to top).

You should be able to get the second one now.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.