Measurement Gate

Measures whether a qubit is ON or OFF.

Attribute
State
data-size="xs" height: 1rem; width: 1rem;
data-size="sm" height: 1.5rem; width: 1.5rem;
data-size="base" height: 2rem; width: 2rem;
data-size="lg" height: 2.5rem; width: 2.5rem;
data-size="xl" height: 3rem; width: 3rem;
data-value="0" value = 0
data-value="1" value = 1
data-flag="foobar" flag = "foobar"

Sizes

Control the size of a measurement gate using the data-size attribute.

<measurement-gate data-size="xs"></measurement-gate>
<measurement-gate data-size="sm"></measurement-gate>
<measurement-gate data-size="base"></measurement-gate>
<measurement-gate data-size="lg"></measurement-gate>
<measurement-gate data-size="xl"></measurement-gate>

Measurement Result

To display the value of the measurement result, specify 0 or 1 using the data-value attribute.

<measurement-gate></measurement-gate>
<measurement-gate data-value="0"></measurement-gate>
<measurement-gate data-value="1"></measurement-gate>

Conditional Flag

If you want to control the application of a quantum gate by a flag, you can create a flag with the data-flag attribute. If the value of the measurement gate is 1, this flag will be on; if it is 0, it will be off. The quantum gate with this flag will be applied only if the flag is on.

<measurement-gate data-flag="foobar"></measurement-gate>

User Help Popup

As a user help, you can display the description and usage of the Measurement gate as a popup. The popup will show on the mouse hover event. The content to be displayed can be specified in the <measurement-gate> tag as follows:

Measurement Gate

Measures whether a qubit is ON or OFF.

<measurement-gate>
  <header>
    <h1>Measurement Gate</h1>
    <p>Measures whether a qubit is ON or OFF.</p>
  </header>
</measurement-gate>

Drag and Drop

To make the Measurement gate drag-and-droppable, specify the data-drag-and-drop attribute.

<measurement-gate data-drag-and-drop><measurement-gate>