# StronglyEntanglingLayers with two qubits

**URL:** <https://discuss.pennylane.ai/t/stronglyentanglinglayers-with-two-qubits/1043>\
**Category:** PennyLane Help\
**Created:** [May 13, 2021, 12:57am UTC](https://discuss.pennylane.ai/t/stronglyentanglinglayers-with-two-qubits/1043 "2021-05-13T00:57:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wongwsvincent](https://avatars.discourse-cdn.com/v4/letter/w/e68b1a/32.png) [@wongwsvincent](https://discuss.pennylane.ai/u/wongwsvincent)\
**Post date:** [May 13, 2021, 12:57am UTC](https://discuss.pennylane.ai/t/stronglyentanglinglayers-with-two-qubits/1043/1 "2021-05-13T00:57:01Z")

</div>

Hello!

I am using StronglyEntanglingLayers to apply multiple layers of single qubit rotations and CNOT-entanglers. I realized that two CNOT gates are applied in each layer when I have only two wires, but I would like to apply it once only per layer.

Is there a reason why StronglyEntanglingLayers doesn’t handle scenarios with two wires like BasicEntanglerLayers? Many thanks!

Relevant pennylane code:

> <https://github.com/PennyLaneAI/pennylane/blob/master/pennylane/templates/layers/strongly_entangling.py#L114>

  
vs  

> <https://github.com/PennyLaneAI/pennylane/blob/master/pennylane/templates/layers/basic_entangler.py#L156>

---

<div class="post-metadata">

**Author:** ![Maria\_Schuld](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/maria_schuld/32/166_2.png) [@Maria\_Schuld](https://discuss.pennylane.ai/u/Maria_Schuld)\
**Post date:** [May 13, 2021, 2:17pm UTC](https://discuss.pennylane.ai/t/stronglyentanglinglayers-with-two-qubits/1043/2 "2021-05-13T14:17:40Z")

</div>

Hey @wongwsvincent,

An excellent question 🙂

This is more a historical reason, `BasicEntanglingLayers` was coded up later when the issue of repeating the CNOT when we have 2 wires was not yet apparent to us.

I am in favour of changing the behaviour of `StronglyEntanglingLayers`! The best thing to do would be to open an [issue](https://github.com/PennyLaneAI/pennylane/issues) where you explain what you would like to happen (also mention that this is already done in the other embedding). We can discuss in the issue how to go about changing it, since it will change people’s code. Either you or we can then make a PR!

---

<div class="post-metadata">

**Author:** ![wongwsvincent](https://avatars.discourse-cdn.com/v4/letter/w/e68b1a/32.png) [@wongwsvincent](https://discuss.pennylane.ai/u/wongwsvincent)\
**Post date:** [May 13, 2021, 5:36pm UTC](https://discuss.pennylane.ai/t/stronglyentanglinglayers-with-two-qubits/1043/3 "2021-05-13T17:36:10Z")

</div>

Hi @Maria_Schuld,

Thanks for the explanation! I have opened an [issue](https://github.com/PennyLaneAI/pennylane/issues/1308) as you suggested.

The implementation seems straightforward enough for me to contribute. I am happy to make a PR when there’s no strong objection to the idea 🙂

---

<div class="post-metadata">

**Author:** ![Maria\_Schuld](https://yyz2.discourse-cdn.com/flex012/user_avatar/discuss.pennylane.ai/maria_schuld/32/166_2.png) [@Maria\_Schuld](https://discuss.pennylane.ai/u/Maria_Schuld)\
**Post date:** [May 14, 2021, 5:59am UTC](https://discuss.pennylane.ai/t/stronglyentanglinglayers-with-two-qubits/1043/4 "2021-05-14T05:59:33Z")

</div>

Wonderful, thanks so much!
