code: def test_cnot():
      """Test a simple cnot circuit. Right now this only makes sure the code doesn't
      raise an exception, and some simple properties
      """
      if not mpl:
          skip("matplotlib not installed")
      else:
          from sympy.physics.quantum.circuitplot import CircuitPlot
  
      c = CircuitPlot(CNOT(1, 0), 2, labels=labeller(2))
      assert c.ngates == 2
      assert c.nqubits == 2
      assert c.labels == ["q_1", "q_0"]
  
      c = CircuitPlot(CNOT(1, 0), 2)
      assert c.ngates == 2
      assert c.nqubits == 2
      assert c.labels == []
  
file_path: sympy/sympy/physics/quantum/tests/test_circuitplot.py
imports: from sympy.physics.quantum.circuitplot import labeller, render_label, Mz, CreateOneQubitGate, CreateCGate
  from sympy.physics.quantum.gate import CNOT, H, SWAP, CGate, S, T
  from sympy.external import import_module
  from sympy.testing.pytest import skip
label_desc: Use image node_id 6 for calling a global function with example usage: test_cnot() without return types