Physicists Write Messy Code!Learn how to create a custom operator with Qiskit and structure your code so that you can still understand it later.October 29, 2025

Dear Quantum Machine Learner,

Guess who writes most of the Qiskit tutorials? That’s right. Physicists. They are precise in their language. They are brilliant in their thinking. And they write chaotic source code.

For example, they write unstructured code. The instructions read like a flat list of quantum gates.

No structure. No meaning. No comprehensibility.

Unfortunately, this is not the exception in Qiskit tutorials, but the rule.

However, there is an easy way to improve the readability of your Qiskit code. Namely, by using custom operators.

In today's tutorial, you will learn how to use them.

—Frank ZickertAuthor of PyQML