# Tag Info

Accepted

### Is Qiskit more popular than cirq? Why?

The answer above, from a Cirq developer, is mostly in the right direction. We (Qiskit / IBM) probably do spend more on outreach and education (I also do not know for sure). Democratization of ...
• 2,169

### Is Qiskit more popular than cirq? Why?

Completely speculating here, but I think the main differentiator is that IBM has a stated goal of, and spends significant resources on, getting quantum computing into everyone's hands. For example, ...
• 23.4k

### What are physically allowed CNOTs for Rigetti's 19 qubit chip and Google's 72 qubit BristleCone chip?

Bristlecone's native operation is the CZ, not CNOTs. However, you can transform between the two with Hadamard gates so this is sort of a trivial difference. Bristlecone can perform a CZ between any ...
• 23.4k

### What are physically allowed CNOTs for Rigetti's 19 qubit chip and Google's 72 qubit BristleCone chip?

From the original blog post presenting the Bristlecone quantum chip, here is the connectivity map of the chip: Each cross represent a qubit, with nearest-neighbour connectivity. If you number the ...
• 4,542
Accepted

### How to add control to gates in Cirq?

You can use the controlled_by method on any Operation: op = cirq.X(target_qubit).controlled_by(control_qubit) You can also ...
• 23.4k
Accepted

### How to set a starting state in cirq?

Cirq distinguishes between "running" a circuit, which is generally supposed to act like hardware would (e.g. only getting samples), and "simulating" a circuit, which has more freedom. Most "simulate" ...
• 23.4k
Accepted

### List of qubit locations with cirq

GridQubit has comparison methods defined, so sorted will give you a list of the qubits in row-major order: ...
• 23.4k
Accepted

### N-Toffoli on Cirq

This is actually very easy in Cirq. The controlled_by method can be used to automatically make any given gate controlled by an arbitrary number of control qubits. ...
Accepted

### Creating an ansatz for variational quantum algorithms?

Take a look again at the Hamiltonian, which is $$H = \sum_{\langle i, j \rangle} J_{i j} Z_i Z_j + \sum_{i} h_i Z_i$$ Then notice that ZPowGate is generated by the the Pauli Z operator, and ...
Accepted

### GridQubit in Cirq vs LineQubit

When using a simulator, it doesn't really matter what kind of qubit you refer to. You can even mix-and-match the types. The type of qubit only becomes relevant when you intend to run on a device, ...
• 23.4k

### Is it possible to create controlled gates with an exponent in Cirq?

Yes, it is possible to create controlled gates with an exponent in Cirq. For the specific case of the Z gate, Cirq includes a dedicated CZ gate that can be raised to a power: ...
• 23.4k
Accepted

### Is there a mistake in the VQE Ansatz in Cirq's tutorial?

You're right in the sense that the cost unitary, which is composed of all the $Z$ and $CZ$ gates does not affect the underlying probabilities of measuring a specific state by itself, however when we ...
• 960
Accepted

### Bloch sphere visualization using Cirq, ProjectQ, PyQuil

The answer seems to be "no" for all three. From what I can find, Cirq and PyQuil default to QuTiP for Bloch sphere visualization, and ProjectQ does not have any examples to go off of, nor ...
• 1,898
Accepted

### Where does the Xmon simulator from Googles cirq framework its entropy from?

Cirq uses numpy's pseudo random number generator to pick measurement results, e.g. here is code from XmonStepper.simulate_measurement: ...
• 23.4k

### How to prepare a specific initial state of three qubits?

You can initialize a quantum state by using the QuantumCircuit.initialize() function. For example, to initialize a circuit into the state |1>, we can perform the ...
• 3,193
Accepted

• 47.5k
Accepted

### Is there a way to present conjugate transpose of a Y Pauli rotation as a Cirq Operator?

cirq.inverse(operation) will return the conjugate transpose of an operation. Equivalently, you can use operation**-1 (this is ...
• 23.4k