# Cannot locate the operations I am mixing?

**URL:** <https://discuss.pennylane.ai/t/cannot-locate-the-operations-i-am-mixing/511>\
**Category:** PennyLane Help\
**Created:** [August 8, 2020, 11:27am UTC](https://discuss.pennylane.ai/t/cannot-locate-the-operations-i-am-mixing/511 "2020-08-08T11:27:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HelloBeastie](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/hellobeastie/32/329_2.png) [@HelloBeastie](https://discuss.pennylane.ai/u/HelloBeastie)\
**Post date:** [August 8, 2020, 11:27am UTC](https://discuss.pennylane.ai/t/cannot-locate-the-operations-i-am-mixing/511/1 "2020-08-08T11:27:48Z")

</div>

`pennylane.qnodes.base.QuantumFunctionError: Continuous and discrete operations are not allowed in the same quantum circuit.`

Here is the code (its a modification to mixer and phase ccts for your qaoa maxcut tutorial):

```
def Um(beta):
	for i, edge in enumerate(Eo):
		t = edge[0]
		c = edge[1]
		for j in c:
			qml.X(wires=j)
		if len(c) > 1:
			qml.Toffoli(wires=c+[n - 1])
		else:
			qml.CNOT(wires=c+[n - 1])
		qml.CRX(2*beta, wires=[n - 1, t])
		for j in c:
			qml.X(wires=j)
		if len(c) > 1:
			qml.Toffoli(wires=c+[n - 1])
		else:
			qml.CNOT(wires=c+[n - 1])

def Up(gamma):
	for i in range(n):
		qml.RZ(-gamma, wires=i)

```

I am suspicious of the toffoli gate since its not mentioned as an operation in the discrete docs explicitly. However I know its a standard qubit type operator. Let me know if perhaps you need the full code. 🙂

---

<div class="post-metadata">

**Author:** ![josh](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/josh/32/100_2.png) [@josh](https://discuss.pennylane.ai/u/josh)\
**Post date:** [August 9, 2020, 6:46am UTC](https://discuss.pennylane.ai/t/cannot-locate-the-operations-i-am-mixing/511/2 "2020-08-09T06:46:33Z")

</div>

HI @HelloBeastie!

All of your operations here are qubit/discrete operations, _except_ for [`qml.X`](https://pennylane.readthedocs.io/en/stable/code/api/pennylane.X.html), which is a CV observable! It represents the position quadrature observable in continuous variable systems.

In this particular case, are you looking for [`qml.PauliX`](https://pennylane.readthedocs.io/en/stable/code/api/pennylane.PauliX.html)?

---

<div class="post-metadata">

**Author:** ![HelloBeastie](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/hellobeastie/32/329_2.png) [@HelloBeastie](https://discuss.pennylane.ai/u/HelloBeastie)\
**Post date:** [August 9, 2020, 8:51am UTC](https://discuss.pennylane.ai/t/cannot-locate-the-operations-i-am-mixing/511/3 "2020-08-09T08:51:20Z")

</div>

@josh I did mean `qml.PauliX`! oops 🤣 Thanks so much 😀
