TransWikia.com

Create this state using CIRQ Coding language

Quantum Computing Asked by Upatel2 on September 1, 2020

I needed help with CIRQ coding as I’m quite new to Quantum Computing.
I read the tutorials on CIRQ but don’t really understand it.
I’d be very thankful if someone could help.

A program to create the state using CIRQ coding.

A program to create the state $frac{1}{sqrt 2}(|00rangle+|11rangle)$.

One Answer

The state you want to create is called a Bell State. Creating it can be accomplished by a Hadamard gate followed by a CNOT gate . In Cirq this will be

q0 = cirq.GridQubit(0, 0)
q1 = cirq.GridQubit(0, 1)

circuit = cirq.Circuit(
    cirq.H(q0),
    cirq.CNOT(q0, q1)
    
)

Printing the circuit show's that this is indeed the case.

print(circuit)

# Circuit:
# (0, 0): ───H───@───
#                │
# (0, 1): ───────X───

Answered by Victory Omole on September 1, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP