5. What is ZX applied to |0⟩?

6. What is ZX applied to H|0⟩?

To understand the effect of the ZX gate on a given quantum state, we need to know the matrix representation of the gate and the quantum state.

The ZX gate is a two-qubit gate that can be represented by the following matrix:

```
ZX = |0⟩⟨0| - |1⟩⟨1|
+ i(|0⟩⟨1| + |1⟩⟨0|)
```

Now let's consider the two scenarios you mentioned:

5. What is ZX applied to |0⟩?

To find the resulting state when ZX is applied to the |0⟩ state, we need to compute the matrix multiplication ZX * |0⟩, where |0⟩ is the column vector representing the |0⟩ state:

```
|0⟩ = [1, 0]
```

Multiplying these matrices, we get:

```
ZX * |0⟩ = (|0⟩⟨0| - |1⟩⟨1| + i(|0⟩⟨1| + |1⟩⟨0|)) * [1, 0]
= |0⟩⟨0| * [1, 0] - |1⟩⟨1| * [1, 0] + i(|0⟩⟨1| + |1⟩⟨0|) * [1, 0]
= |0⟩ * [1] - |1⟩ * [0] + i(|0⟩ * [0] + |1⟩ * [1])
= [1, 0] - [0, 0] + i([0, 0] + [1, 0])
= [1, 0] - [0, 0] + i[1, 0]
= [1, 0] - [0, 0] + [0, i]
= [1, i]
```

Therefore, ZX applied to the |0⟩ state gives us the state |1⟩ + i|0⟩.

6. What is ZX applied to H|0⟩?

To find the resulting state when ZX is applied to the H|0⟩ state, we first need to determine the state H|0⟩. The H gate, also known as the Hadamard gate, can be represented by the following matrix:

```
H = 1/√2 * [[1, 1], [1, -1]]
```

And applying the H gate to the |0⟩ state:

```
H|0⟩ = 1/√2 * [[1, 1], [1, -1]] * [1, 0]
= 1/√2 * [1, 0] + 1/√2 * [1, -1]
= [1/√2, 0] + [1/√2, -1/√2]
= [1/√2 + 1/√2, 0 - 1/√2]
= [1/√2 + 1/√2, -1/√2]
= [√2/2, -1/√2]
```

So, H|0⟩ gives us the state [√2/2, -1/√2].

Now, let's apply ZX to this state:

```
ZX * [√2/2, -1/√2]
= |0⟩⟨0| * [√2/2, -1/√2] - |1⟩⟨1| * [√2/2, -1/√2] + i(|0⟩⟨1| + |1⟩⟨0|) * [√2/2, -1/√2]
= |0⟩ * [√2/2] - |1⟩ * [-1/√2] + i(|0⟩ * [-1/√2] + |1⟩ * [√2/2])
= [√2/2, 0] - [-1/√2, 0] + i[-1/√2, √2/2]
= [√2/2 + 1/√2, 0 - 0] + [-1/√2, √2/2]
= [√2/2 + 1/√2, √2/2]
```

Hence, ZX applied to H|0⟩ gives us the state [√2/2 + 1/√2, √2/2].