How to create custom gates in Cirq

Опубликовано: 08 Ноябрь 2024
на канале: Google Quantum AI
1,742
34

In our previous episode, we learned how to construct quantum circuits out of moments, with each moment containing operations on qubits. In this video, we expand on the previous video, teaching you how to create your own custom gates in addition to the ones that Cirq has included upon installation. We’ll also walk you the thought process of defining your own gate for each use case.

Resources:
Find more guidance and example code → https://goo.gle/3ziVkxc
Find the Cirq repo here → https://goo.gle/3PnwxO9
Get started with Colab → https://goo.gle/3yVjUTl

Chapters:
0:00 - Intro
2:00 - How to apply a unitary matrix
4:16 - Building your own gate with an unknown unitary matrix
5:26 - Building a gate with a known unitary matrix
6:56- Defining a matrix to be appropriate for a number of qubits
7:34 - How to make a parameter gate
9:17 - How this gate shows up in a circuit when drawing it
10:24 - How to package gates
12:46 - Recap


Watch more episodes of Quantum Programming with Cirq → https://goo.gle/QuantumProgrammingWit...
Subscribe to Google Quantum AI → https://goo.gle/QuantumAI


#QuantumProgrammingWithCirq #QPC #QuantumComputing #Cirq #OpenSource #Python