New answers tagged cirq
2
As Craig said, you applied b_big and a_big differently. The adjoint a_big is missing from your product. Try rotated_state = b_big @ a_big @ state @ a_big.conj().T @ b_big.conj().T. But Craig's right. Using Circuits would be much simpler:
import itertools
import random
import cirq
import numpy as np
def chsh_circuit(i, j, qs):
return cirq.Circuit(cirq.H(...
3
Assuming $x$ is $n$ bits, here's a simple procedure: take $n$ ancilla qubits, all prepared in $|0\rangle$. Do a transversal controlled-not (i.e. bit by bit controlled-not) from the register with $|x\rangle$ to the ancilla register. THis means that if you started wuth
$$
\sum_xa_x|x\rangle,
$$
you now have
$$
\sum_xa_x|x\rangle|x\rangle.
$$
Next, find a bit ...
Top 50 recent answers are included
Related Tags
cirq × 85programming × 44
circuit-construction × 16
quantum-gate × 10
algorithm × 10
quantum-state × 9
measurement × 8
simulation × 8
hamiltonian-simulation × 6
vqe × 6
qiskit × 4
machine-learning × 4
tfq × 4
entanglement × 3
shors-algorithm × 3
hhl-algorithm × 3
ibm-q-experience × 2
noise × 2
quantum-fourier-transform × 2
qaoa × 2
oracles × 2
qasm × 2
quirk × 2
mathematics × 1
textbook-and-exercises × 1