* (77) M. P. A. Fisher and D. H. Lee, _Correspondence between two-dimensional bosons and a bulk superconductor in a magnetic field_ , Phys. Rev. B 39, 2756 (1989).
  * (78) M.E. Peskin, _Mandelstam-’t Hooft duality in abelian lattice models_ Annals of Physics 113.1 (1978): 122-152.
  * (79) H. Kleinert, _Gauge Fields in Condensed Matter, Vol II.: Stress and Defects_. World Scientific, Singapore (1989).
  * (80) H. Kleinert, _Multivalued Fields in Condensed Matter, Electromagnetism, and Gravitation_. World Scientific, Singapore (2008).
  * (81) Aron J. Beekman et al., _Dual gauge field theory of quantum liquid crystals in two dimensions_ , Physics Reports 683, 1-110 (2017), arXiv:1603.04254v2.
  * (82) H. S. Seung and David R. Nelson, Defects in flexible membranes with crystalline order, Phys. Rev. A 38, 1005 (1988).
  * (83) L.D. Landau, EM Lifshitz, AM Kosevich _Theory of elasticity: volume 7_ Theory of elasticity: volume 7 (Vol. 7). Elsevier.
  * (84) K. A. Schreiber and G. A. Csáthy, _Competition of pairing and nematicity in the two-dimensional electron gas_ Ann. Rev. Cond. Mat. Phys. 11, 17 (2020).
  * (85) A. A. Koulakov, M. M. Fogler, and B. I. Shklovskii, _Charge density wave in two-dimensional electron liquid in weak magnetic field_ , Phys. Rev. Lett. 76, 499 (1996).
  * (86) E. Fradkin and S. Kivelson, Liquid-crystal phases of quantum Hall systems , Phys. Rev. B 59, 8065 (1999).
  * (87) A. H. MacDonald and Matthew P. A. Fisher, _Quantum theory of quantum Hall smectics_ , Phys. Rev. B 61, 5724 (2000).
  * (88) L. Radzihovsky and A. T. Dorsey, _Theory of Quantum Hall Nematics_ , Phys. Rev. Lett. 88, 216802 (2002).
  * (89) M. P. Lilly, K. B. Cooper, J. P. Eisenstein, L. N. Pfeiffer, and K. W. West, _Evidence for an anisotropic state of two-dimensional electrons in high Landau levels_ , Phys. Rev. Lett. 82, 394 (1999).
  * (90) DG Barci, E Fradkin, SA Kivelson, V Oganesyan, _Theory of the quantum Hall smectic phase. I. Low-energy properties of the quantum Hall smectic fixed point_ Phys. Rev. B 65, 245319 (2002).
  * (91) R. Moessner and J. T. Chalker, _Exact results for interacting electrons in high Landau levels_ , Phys. Rev. B 54, 5006 (1996).
  * (92) J. M. Tranquada, et. el., Coexistence of, and competition between, superconductivity and charge-stripe order in LaNdSrCuO, Phys. Rev. Lett. 78, 338 (1997).
  * (93) S. A. Kivelson, E. Fradkin, V. J. Emery, Electronic liquid crystal phases of a doped Mott insulator, Nature 393, 550-553 (1998).
  * (94) P. Fulde and R.A. Ferrell, _Superconductivity in a Strong Spin-Exchange Field_ , Phys. Rev. 135, A550 (1964).
  * (95) A.I. Larkin and Yu. N. Ovchinnikov, _Nonuniform state of superconductors_ , Sov. Phys. JETP 20, 762 (1965).
  * (96) L. Radzihovsky and A. Vishwanath, _Quantum liquid crystals in an imbalanced Fermi gas: fluctuations and fractional vortices in Larkin-Ovchinnikov states_ , Phys. Rev. Lett. 103, 010404, (2009).
  * (97) L. Radzihovsky, _Fluctuations and phase transitions in Larkin-Ovchinnikov liquid-crystal states of a population-imbalanced resonant Fermi gas_ , Phys. Rev. A. 84, 023611 (2011).
  * (98) Vladyslav Kozii, Jonathan Ruhman, Liang Fu, Leo Radzihovsky, Ferromagnetic transition in a one-dimensional spin-orbit-coupled metal and its mapping to a critical point in smectic liquid crystals, Phys. Rev. B 96, 094419 (2017).
  * (99) L. Radzihovsky and S. Choi, _P-wave resonant Bose gas: a finite-momentum spinor superfluid_ , Phys. Rev. Lett. 103, 095302 (2009).
  * (100) Hui Zhai, _Degenerate quantum gases with spin–orbit coupling: a review_ , Rep. Prog. Phys. 78, 026001 (2015).
  * (101) Tzu-Chi Hsieh, Han Ma, Leo Radzihovsky, Helical superfluid in a frustrated honeycomb Bose-Hubbard model, Phys. Rev. A 106, 023321 (2022).
  * (102) A generalized $m$-Lifshitz model, has elasticity with $m$ “soft” (Laplacian) axes and $d-m$ complementary “hard” (gradient) axes. In this nomenclature, the conventional classical 3d smectic is the $m=2$-Lifshitz model, and 2+1d quantum smectic and 3d classical columnar liquid crystal are described by the $m=1$-Lifshitz model. Other generalizations include a nonscalar Goldstone mode field as in e.g., tethered membranesLRmembranes ; RTtubulePRL ; RTtubulePRE  and nematic elastomers XRelastomers .
  * (103) A. Vishwanath, L. Balents, and T. Senthil, Quantum criticality and deconfinement in phase transitions between valence bond solids, Physl Rev. B 69 (2004).
  * (104) E. Fradkin, D. A. Huse, R. Moessner, V. Oganesyan, and S. L. Sondhi, Bipartite Rokhsar-Kivelson points and Cantor deconfinement, Phys. Rev. B 69 (2004).
  * (105) E. Ardonne, P. Fendley, E. Fradkin, Topological order and conformal quantum critical points, Annals of Physics 310 (2004) 493-551.
  * (106) Zhengzheng Zhai, Leo Radzihovsky, _Two-dimensional melting via sine-Gordon duality_ , Phys. Rev. B 100, 094105 (2019).
  * (107) E. Lake, M. Hermele, and T. Senthil, Dipolar Bose-Hubbard model, Phys. Rev. B 106 (2022).
  * (108) Leo Radzihovsky, _Lifshitz gauge duality_ , arXiv:2210.03127 (2022).
  * (109) Pranay Gorantla, Ho Tat Lam, Nathan Seiberg, and Shu-Heng Shao, 2+1d Compact Lifshitz Theory, Tensor Gauge Theory, and Fractons, arXiv:2201.10589 (2022).
  * (110) Ethan Lake, Hyun-Yong Lee, Jung Hoon Han, T. Senthil, Dipole condensates in tilted Bose-Hubbard chains, arXiv:2210.02470.
  * (111) Philip Zechmann, Ehud Altman, Michael Knap, Johannes Feldmeier, Fractonic Luttinger Liquids and Supersolids in a Constrained Bose-Hubbard Model, arXiv:2210.11072.
  * (112) A. Kapustin and L. Spodyneiko, _Hohenberg-Mermin-Wagner-type theorems and dipole symmetry_ arXiv preprint arXiv:2208.09056 (2022).
  * (113) J. Feldmeier, P. Sala, G. De Tomasi, F. Pollmann, and M. Knap, _Anomalous Diffusion in Dipole- and Higher-Moment-Conserving Systems_ Phys. Rev. Lett. 125, 245303 (2020).
  * (114) E. Guardado-Sanchez, A. Morningstar, B.M. Spar, P.T. Brown, D.A. Huse, W.S. Bakr _Subdiffusion and Heat Transport in a Tilted Two-Dimensional Fermi-Hubbard System_ Phys. Rev. X 10, 011042 (2020).
  * (115) A. Gromov, A. Lucas and R. Nandkishore _Fracton hydrodynamics_ Phys. Rev. Research 2, 033124 (2020).
  * (116) P Glorioso, J Guo, JF Rodriguez-Nieva, A Lucas, _Breakdown of hydrodynamics below four dimensions in a fracton fluid_ Nature Physics, 18(8), 912-917 (2022).
  * (117) J Guo, P Glorioso, A Lucas, _Fracton hydrodynamics without time-reversal symmetry_ Phys. Rev. Lett. 129, 150603 (2022).
  * (118) J.M. Kosterlitz and D.J. Thouless, _Ordering, metastability and phase transitions in two-dimensional systems_ , J. Phys. C: Solid State Phys. 6 1181 (1973)
  * (119) B.I. Halperin and D.R. Nelson _Theory of two-dimensional melting_ Phys. Rev. Lett. 41, 121 (1978).
  * (120) A.P. Young _Melting and the vector Coulomb gas in two dimensions_ Phys. Rev. B 19, 1855 (1979).
  * (121) B. I. Halperin, T. C. Lubensky, and S. K. Ma, _First-Order Phase Transitions in Superconductors and Smectic-A Liquid Crystals_ , Phys. Rev. Lett. 32, 292 (1974).
  * (122) Leo Radzihovsky, Self-consistent theory of normal-to-superconductor transition, Europhys. Lett. 29, 995 (1995).
  * (123) M.C. Marchetti, L. Radzihovsky _Interstitials, vacancies, and dislocations in flux-line lattices: A theory of vortex crystals, supersolids, and liquids_ , Phys. Rev. B 59, 12001 (1999).
  * (124) K. Kondo, _A proposal of a new theory concerning the yielding of materials based on Riemannian geometry, I_ Journal of the Society of Applied Mechanics of Japan Volume 2 Issue 11 Pages 123-128 (1949).
  * (125) M.O. Katanaev and I.V. Volovich, _Theory of defects in solids and three-dimensional gravity_ Annals of Physics, 216(1), 1-28.(1992).
  * (126) M. Nakahara, _Geometry, topology and physics_ CRC press, 2018.
  * (127) M. Blagojevic, F.W. Hehl _Gauge theories of gravitation_ arXiv preprint arXiv:1210.3775 (2012).
  * (128) C.S. O’Hern, L.E. Silbert, A.J. Liu, S.R. Nagel, _Jamming at zero temperature and zero applied stress: The epitome of disorder_ Phys. Rev. E 68, 011306 (2004).
  * (129) R.P. Behringer and B. Chakraborty, _The physics of jamming for granular materials: a review_ Rep. Prog. Phys. 82 012601 (2019).
  * (130) J.N. Nampoothiri, Y. Wang, K. Ramola, J. Zhang, S. Bhattacharjee, B. Chakraborty _Emergent Elasticity in Amorphous Solids_ Phys. Rev. Lett. 125, 118002 (2020).
  * (131) J. Geng, D. Howell, E. Longhi, R.P. Behringer, G. Reydellet, L. Vanel, E. Clément, S. Luding, _Footprints in sand: the response of a granular material to local perturbations_ Phys. Rev. Lett. 87, 035506
  * (132) D. Bi, J. Zhang, B. Chakraborty, R.P. Behringer, _Jamming by shear_ Nature 480, 355-358 (2011).
  * (133) For a review, and extensive references, see the articles in Statistical Mechanics of Membranes and Interfaces, 2nd edition, Jerusalem Winter School, edited by D. R. Nelson, T. Piran, and S. Weinberg (World Scientific, Singapore, 1989).
  * (134) Pierre Le Doussal, Leo Radzihovsky, Anomalous elasticity, fluctuations and disorder in elastic membranes, Annals of Physics 392, 340-410 (2018).
  * (135) Leo Radzihovsky and John Toner, A New Phase of Tethered Membranes:Tubules, Phys. Rev. Lett. 75, 4752 (1995).
  * (136) Leo Radzihovsky, John Toner, Elasticity, Shape Fluctuations and Phase Transitions in the New Tubule Phase of Anisotropic Tethered Membranes, Phys.Rev.E 57:1832-1863 (1998).
  * (137) Xiangjun Xing, Leo Radzihovsky, Nonlinear Elasticity, Fluctuations and Heterogeneity of Nematic Elastomers, Annals of Physics 323, 105-203 (2008); Universal Elasticity and Fluctuations of Nematic Gels, Phys. Rev. Lett. 90, 168301 (2003).
  * (138) P. Surowka, _Dual gauge theory formulation of planar quasicrystal elasticity and fractons_ Phys. Rev. B 103, L201119 (2021).
  * (139) D Levine, PJ Steinhardt _Quasicrystals: a new class of ordered structures_ Phys. Rev. Lett. 53, 2477 (1984).
  * (140) PA Kalugin, AI Kitaev, LS Levitov, _$Al_{0.86}Mn_{0.14}$ : a six-dimensional crystal_ ZhETF Pisma Redaktsiiu, vol. 41, Feb. 10, (1985).
  * (141) TC Lubensky, S Ramaswamy, J Toner, _Hydrodynamics of icosahedral quasicrystals_ Phys. Rev. B 32, 7444 (1985).
  * (142) D Ding, W Yang, C Hu, R Wang _Generalized elasticity theory of quasicrystals_ Phys. Rev. B 48, 7003 (1993).
  * (143) D.V. Else, S.J. Huang, A. Prem, A. Gromov, _Quantum many-body topology of quasicrystals_ Phys. Rev. X 11, 041051 (2021).
  * (144) J. Gaa, G. Palle, R.M. Fernandes, J. Schmalian _Fracton-elasticity duality in twisted moiré superlattices_
  * (145) C Stahl, E Lake, R Nandkishore, _Spontaneous breaking of multipole symmetries_ , Phys. Rev. B 105, 155107 (2022).
  * (146) C.S. O’Hern, T.C. Lubensky, _Nonlinear elasticity of the sliding columnar phase_ Phys. Rev. E 58, 5948 (1998).
  * (147) J. Iaconis, S. Vijay, and R.M. Nandkishore, _Anomalous subdiffusion from subsystem symmetries_ Phys. Rev. B 100, 214301
  * (148) S. Moudgalya, A. Prem, D.A. Huse, and A. Chan _Spectral statistics in constrained many-body quantum chaotic systems_ Phys. Rev. Research 3, 023176
  * (149) N Seiberg, SH Shao, _Exotic Zn Symmetries, Duality, and Fractons in 3+1-Dimensional Quantum Field Theory_ SciPost Phys. 10, 003 (2021).
  * (150) T Rudelius, N Seiberg, and SH Shao _Fractons with twisted boundary conditions and their symmetries_ Phys. Rev. B 103, 195113 (2021).
  * (151) H. Yan, O. Benton, L. D. C. Jaubert, N. Shannon _Rank-2 U(1) Spin Liquid on the Breathing Pyrochlore Lattice_ Phys. Rev. Lett. 124, 127203 (2020).
  * (152) A. Prem, S. Vijay, Y.Z. Chou, M. Pretko, R.M. Nandkishore, _Pinch point singularities of tensor spin liquids_ , Phys. Rev. B 98, 165140 (2018).
  * (153) O. Hart and R. M. Nandkishore _Spectroscopic fingerprints of gapless type-II fracton phases_ , Phys. Rev. B 98, 165140 (2022).
  * (154) R. M. Nandkishore, W. Choi, and Y. B. Kim _Spectroscopic fingerprints of gapped quantum spin liquids, both conventional and fractonic_ , Phys. Rev. Research 3, 013254 (2021).
  * (155) R. Verresen, N. Tantivasadakarn, A. Vishwanath _Efficiently preparing Schrodinger’s cat, fractons and non-Abelian topological order in quantum devices_ arXiv:2112.03061 (2021).
  * (156) N. E. Myerson-Jain, S. Yan, D. Weld, C. Xu _Construction of Fractal Order and Phase Transition with Rydberg Atoms_ Phys. Rev. Lett. 128, 017601


2021

[2]Wenjie Liu

1]School of Automation, Nanjing University of Information Science and
Technology, Nanjing, 210044, Jiangsu, China

[2]School of Computer and Software, Nanjing University of Information Science
and Technology, Nanjing, 210044, Jiangsu China

# An improved two-threshold quantum segmentation algorithm for NEQR image

Lu Wang<EMAIL_ADDRESS>Zhiliang Deng<EMAIL_ADDRESS><EMAIL_ADDRESS>[  *

###### Abstract

The quantum image segmentation algorithm is to divide a quantum image into
several parts, but most of the existing algorithms use more quantum
resource(qubit) or cannot process the complex image. In this paper, an
improved two-threshold quantum segmentation algorithm for NEQR image is
proposed, which can segment the complex gray-scale image into a clear ternary
image by using fewer qubits and can be scaled to use $n$ thresholds for $n+1$
segmentations. In addition, a feasible quantum comparator is designed to
distinguish the gray-scale values with two thresholds, and then a scalable
quantum circuit is designed to segment the NEQR image. For a
${2^{n}}\\!\times\\!{2^{n}}$ image with $q$ gray-scale levels, the quantum
cost of our algorithm can be reduced to 60$q$-6, which is lower than other
existing quantum algorithms and dose not increase with the image’s size
increases. The experiment on IBM Q demonstrates that our algorithm can
effectively segment the image.

###### keywords:

Quantum image processing, Image segmentation, Two-threshold, Quantum
comparator

##  1 Introduction

Due to the unique parallelism and entanglement characteristics, quantum
computing can achieve quantum acceleration, which makes the calculation speed
improved to varying degrees compared with classical computing. Quantum image
processing (QIP) is a cross-discipline of quantum computing and image
processing, and this makes it possible to solve the real-time problem that
encountered by the classical counterpart.

In the past 20 years, the QIP has developed rapidly, and the specific
development process can be found in Refs Yan2017 ; Cai2018 . It can be divided
into two stages: one is to store classical images in a quantum image
representation model, and the other is the study of QIP algorithms. In the
first stage, there are mainly: qubit lattice representation Venegas-
Andraca2003 , real ket representation Latorre2005 , entangled images
representation Venegas-Andraca2010 , flexible representation of quantum image
(FRQI) Le2011 , the multi-channel RGB images representation of quantum images
(MCQI) Sun2013 , and quantum probability image encoding representation (QPIE)
Yao2017 , novel enhanced quantum image representation (NEQR) Zhang2013 , an
improved NEQR (INEQR) Jiang2015 , a generalized model of NEQR (GNEQR)
Zhang2015L , a novel quantum representation of color digital images (NCQI)
Sang2017 . Among them, the NEQR model is widely used due to its simplicity of
operation. Based on different quantum image representation models, the
corresponding QIP algorithms also develop rapidly, such as geometrical
transformation of quantum image Zhou2017 , quantum image encryption Zhou2013 ,
feature extraction of quantum image Hancock2015 , quantum image scrambling
Zhou2015 , quantum image morphological operations Yuan2015 , quantum image
watermarking Song2014 , quantum image filtering Li2017 , quantum image
steganography Zhao2021 , quantum image stabilization Yan2016 , quantum image
bilinear interpolation Yan2021 , quantum image edge detection Zhou2016 ;
Fan2019 ; Chetia2021 ; Liu2022 , quantum image segmentation Caraiman2014 ;
Caraiman2015 ; Xia2019 , etc. Although the research of quantum image
processing technology is gradually deepening, it is still in the initial stage
as a whole, and the development direction is not balanced. The results of
these studies have shown that quantum image processing is exponentially faster
than classical image processing, and it saves a lot of computing resources.
There are many quantum image processing algorithms that are theoretically
feasible, but they are not performed on real quantum computers or simulators,
and these algorithms require a large number of qubits, which is not feasible
in this Noisy Intermediate-Scale Quantum (NISQ) era. So, further research is
needed for deeper image processing algorithms.

Image segmentation is the first step of image analysis, and it can divide the
image into several parts to clarify the target in the image. The most common
image segmentation methods are: threshold-based segmentation, region-based
segmentation, edge detection-based segmentation, and segmentation combined
with specific tools. In recent years, researchers have correspondingly
proposed several quantum image segmentation algorithms. In 2013, Li et al.
Li2013  used a quantum search algorithm to segment the quantum image. The
theoretical analysis shows that a better effect is achieved, but no specific
oracle was provided, which made the simulation very difficult. In 2014,
Caraiman et al. Caraiman2014  proposed a histograms-based quantum image
segmentation algorithm. They used the quantum computing performance to obtain
exponential speedup than the classical algorithm, but still no specific oracle
circuit is given. A year later, they Caraiman2015  proposed a quantum image
segmentation algorithm based on a single threshold. They gave a specific
implementation circuit, but the number of qubits required is too large to be
simulated on the existing platform. In 2019, Xia et al. Xia2019  proposed a
multi-bit quantum comparator and applied it in image binarization. They chose
a single threshold to perform binary segmentation on quantum images, but the
number of qubits required was relatively large. Moreover, the algorithm
quantum cost is relatively high, which is very unsuitable for simulation in
the NISQ era. In fact, none of the above algorithms are simulated on a quantum
computer or quantum simulator. In 2020, Yuan et al. Yuan2020  proposed a dual-
threshold quantum image segmentation algorithm with a small number of qubits
and simulated it on a quantum simulator. However, the algorithm only segments
pixels smaller than the low threshold and larger than the high threshold to 0,
and the pixels between the thresholds cannot be processed and remain
unchanged, so only at most two segmentations can be made and the target
segmentation is not clear, which cannot be scalable and is not suitable for
some complex images. In addition, quantum cost is still high. In practical
use, we need to segment multiple targets in the image according to the
situation, which requires the algorithm to have better scalability, which is
impossible for the above algorithms.

In order to increase the practicability of the quantum image segmentation
algorithm in this NISQ ear, we have carried out further research in this
paper, and the main contributions are summarized as follows.

  * •

An improved two-threshold quantum segmentation algorithm for NEQR image is
proposed, which can be scaled to use $n$ thresholds for $n+1$ segmentations.

  * •

A quantum comparator with lower quantum cost is designed to distinguish the
gray-scale values with two thresholds. Then, a complete and scalable quantum
segmentation circuit is designed to clearly segment the complex quantum images
by using few qubits.

  * •

We verify the superiority and feasibility of our proposed algorithm by
analyzing the circuit quantum cost and performing the simulation experiment on
IBM Q platform IBM  through Qiskit extension Qiskit , respectively.

The rest of this paper is organized as follows: In Sec. 2, The basics of
quantum circuits and the NEQR model are introduced. In Sec. 3, we first
introduce the two-threshold quantum image segmentation algorithm, and then, a
quantum comparator and a complete segmentation circuit are designed in detail.
In Sec. 4, the circuit quantum cost is analyzed and the simulation experiment
is performed on the IBM Q platform. Finally, the discussion is given in Sec.
5.

##  2 Related Works

###  2.1 Quantum circuit

Quantum circuit is to perform a series of logical operations on n qubits, and
finally perform a measurement, which is an implementation form of quantum
computing. A quantum circuit represents the sequence of time from left to
right, and each line represents one qubit. There are many logic gates called
quantum gates in the circuit, which are the basis of quantum circuits and
represent the unitary operation of qubits. Unlike traditional logic gates,
quantum logic gates are reversible, and traditional calculations can be
represented by reversible gates. This means that quantum circuits can simulate
the operation of all traditional circuits. Combining some basic quantum gates
can form more complex quantum gates, and these complex quantum gates can act
on multiple qubits at the same time. Therefore, a circuit composed of multiple
quantum gates is a quantum circuit. Common quantum gates include Hadamard gate
(H gate), Pali-X gate (X gate), Control-NOT gate (CNOT gate) and Toffoli gate
(CCNOT gate). The symbol and unitary matrix of each quantum gate are shown in
Table 1.

###  2.2 NEQR

A digital image is composed of pixels, and the pixels contain position
information and color information. The NEQR model uses three entangled qubit
sequences to store these two kinds of information, and the whole image is
stored in the superposition of the two qubit sequences. Assuming the image
size is $2^{n}\times 2^{n}$, we need to use two entangled qubit sequences of
length $n$ to represent the position information x-axis and y-axis
coordinates. For general gray-scale images, the gray-scale value range is
$[0,2^{q}-1]$, so a $q$-length qubit sequence is needed to store the gray-
scale value of the pixels. The entire model is the tensor product of these
three entangled qubit sequences, so that all pixels can be stored and
processed at the same time. Then the NEQR model of the quantum image can be
written in the form of the quantum superposition state shown in Eq. (1)
Zhang2013 .

$\lvert{\rm{I}}\rangle=\frac{1}{{{2^{n}}}}\sum\limits_{Y=0}^{{2^{n}}-1}{\sum\limits_{X=0}^{{2^{n}}-1}{\lvert{{C_{YX}}}\rangle\otimes\lvert
Y\rangle\lvert
X\rangle}}=\frac{1}{{{2^{n}}}}\sum\limits_{YX=0}^{{2^{2n}}-1}{\mathop{\otimes}\limits_{k=0}^{q-1}\lvert{C^{K}_{YX}}\rangle\mathop{\otimes}\limits\lvert{YX}\rangle}$
(1)

where
$\lvert{{C_{YX}}}\rangle=\lvert{C_{YX}^{q-1},C_{YX}^{q-2},{\cdots}C_{YX}^{1}C_{YX}^{0}}\rangle$
represents the quantum image gray-scale values,
$C_{YX}^{k}\in\left\\{{0,1}\right\\}$, $k=q-1,q-2,\cdots,0$.
$\lvert{YX}\rangle=\lvert Y\rangle\lvert
X\rangle=\lvert{{Y_{n-1}},{Y_{n-2}},\cdots{Y_{0}}}\rangle\lvert{{X_{n-1}},{X_{n-2}},\cdots{X_{0}}}\rangle$
represents the position of the pixel in a quantum image,
${Y_{t}},{X_{t}}\in\left\\{{0,1}\right\\}$.

Fig. 1 shows an example of a grayscale image of size 2×2, and the
corresponding NEQR expression of which is given as follows

$\begin{array}[]{l}\lvert I\rangle=\frac{1}{2}\left({\lvert
0\rangle\lvert{00}\rangle+\lvert{100}\rangle\lvert{01}\rangle+\lvert{200}\rangle\lvert{10}\rangle+\lvert{255}\rangle\lvert{11}\rangle}\right)\end{array}$
$\begin{array}[]{l}\begin{array}[]{*{20}{c}}=\end{array}\frac{1}{2}\left(\begin{array}[]{l}\lvert{00000000}\rangle\lvert{00}\rangle+\lvert{01100100}\rangle\lvert{01}\rangle\\\
+\lvert{11001000}\rangle\lvert{10}\rangle+\lvert{11111111}\rangle\lvert{11}\rangle\end{array}\right)\end{array}$
$None$

Figure 1: An example of a 2×2 image

##  3 The improved two-threshold quantum image segmentation algorithm

In this section, we first introduce the two-threshold quantum image
segmentation algorithm, then, a quantum comparator with high performance is
designed to compare the thresholds and the gray-scale values, and a complete
quantum circuit with high parallelism is designed to segment the NEQR image.

###  3.1 The quantum image segmentation algorithm

After the quantum image preparation is complete, a high threshold and a low
threshold are given. Then, we set the gray-scale value of the pixels smaller
than the low threshold to $g_{1}$, set the gray-scale value of the pixels
between the high threshold and the low threshold to $g_{2}$, and set the gray-
scale value of the pixels larger than the high threshold to $g_{3}$. In this
way, the image is segmented to a ternary image, which can achieve the purpose
of clearly segmenting the image.

Supposing $T_{H}$ is the high threshold, $T_{L}$ is the low threshold,
$f(x,y)$ is the original image, and $g(x,y)$ is the corresponding segmented
image. So, the description of the segmentation algorithm is as follows:

$g(x,y)=\left\\{\begin{array}[]{rcl}g_{1},&&{f(x,y)<T_{L}}\\\
g_{2},&&{T_{L}\leq f(x,y)<T_{H}}\\\ g_{3},&&{f(x,y)\geq
T_{H}}\end{array}\right.$ $None$

In practical applications, the image may contain more targets, which requires
us to segment the image multiple times to achieve the purpose of clear
segmentation. So we need to set multiple thresholds to divide pixels into
multiple different classes. Then the pixels between each two thresholds are of
a class, and the double-threshold segmentation can be scaled to multi-
threshold segmentation. The formula is described as follows.

$g(x,y)=\left\\{\begin{array}[]{rcl}g_{1},&&{f(x,y)<T_{1}}\\\
g_{2},&&{T_{1}\leq f(x,y)<T_{2}}\\\ g_{3},&&{T_{2}\leq f(x,y)<T_{3}}\\\
\vdots&&{\vdots}\\\ g_{n},&&{T_{n-1}\leq f(x,y)<T_{n}}\\\
g_{n+1},&&{f(x,y)\geq T_{n}}\\\ \end{array}\right.$ $None$

Since multi-threshold segmentation is an extension of the improved two-
threshold segmentation, in this paper we design the quantum circuits by using
two-threshold as an example. It can be seen from the above formula that some
quantum comparators are needed to compare the threshold with the gray-scale
values of the quantum image. To facilitate the introduction of the algorithm,
we choose the gray-scale value from 0 to 7 as an example. So, the gray-scale
values of the quantum image and the segmented image both need 3 qubits to
represent( $\lvert
C\rangle=\lvert{{C_{1}}}\rangle\lvert{{C_{2}}}\rangle\lvert{{C_{3}}}\rangle$),
therefore, the threshold also needs to be represented by 3 qubits. And because
the high threshold and low threshold can be compared in sequence, 3 qubits can
be shared in this way, so the threshold can be expressed as $\lvert
T\rangle=\lvert{{T_{1}}}\rangle\lvert{{T_{2}}}\rangle\lvert{{T_{3}}}\rangle$.
The thresholds in this paper are prepared in advance. The high threshold is
set to $\lvert{T_{H}}\rangle=\lvert 100\rangle$, and the low threshold is set
to $\lvert{T_{L}}\rangle=\lvert 010\rangle$, then, $g_{1}=000$, $g_{2}=100$,
$g_{3}=111$. We choose a pixel of the original image as an example, such as
$\lvert 0010010\rangle$, where the high three qubits represent the gray-scale
value, and the low four qubits represent the position information. Therefore,
the segmented result for this pixel is $\lvert 0000010\rangle$.

###  3.2 Quantum segmentation circuit design

In the quantum image segmentation circuit, the name of each qubit is marked on
the far left, and the default initial state of every qubit is $\lvert
0\rangle$. The circuit is mainly composed of six parts. The first part is the
input of quantum image information, including position information and gray-
scale value information. The second part is to compare the gray-scale values
of the quantum image with the high threshold, and the third part is to segment
the pixels with the gray-scale values larger than the high threshold in the
quantum image. The fourth part is to compare the gray-scale values of the
quantum image with the low threshold, and the fifth part is to segment the
pixels with the gray-scale values less than the low threshold in the quantum
image. The sixth part is to use the result of the previous threshold
comparison to segment the pixels whose gray-scale values are between the high
and low thresholds. The following will be explained in detail in the order of
these six parts.

Figure 2: Schematic of a 4×4 gray-scale image

In order to better describe the algorithm, Fig. 2 gives a 4×4 image as an
example, and the gray-scale value range is [0,7]. The X-Axis and Y-Axis
respectively represent the relative position of each pixel in the image, and
each axis requires two qubits to store. The gray-scale value of each pixel is
marked in the image by using three qubits. The NEQR model of the image is
expressed as Eq. (5).

$\begin{array}[]{l}\lvert{I}\rangle=\frac{1}{{{2^{2}}}}(\lvert{0110000}\rangle+\lvert{0100001}\rangle+\lvert{0110010}\rangle+\lvert{0100011}\rangle+\\\
\begin{array}[]{*{20}{c}}{\begin{array}[]{*{20}{c}}{}\hfil&{\begin{array}[]{*{20}{c}}{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\end{array}}\end{array}}&{\lvert{0100100}\rangle+}\end{array}\lvert{0110101}\rangle+\lvert{0000110}\rangle+\lvert{0010111}\rangle+\\\
\begin{array}[]{*{20}{c}}{\begin{array}[]{*{20}{c}}{}\hfil&{\begin{array}[]{*{20}{c}}{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\end{array}}\end{array}}&{\lvert{0001011}\rangle+}\end{array}\lvert{1011001}\rangle+\lvert{0001010}\rangle+\lvert{1011011}\rangle+\\\
\begin{array}[]{*{20}{c}}{\begin{array}[]{*{20}{c}}{}\hfil&{\begin{array}[]{*{20}{c}}{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\end{array}}\end{array}}&{\lvert{0001100}\rangle+}\end{array}\lvert{1011101}\rangle+\lvert{1011110}\rangle+\lvert{1111111}\rangle)\\\
\end{array}$ $None$

The first part is to input the prepared quantum image into the segmentation
circuit. Before this, we have converted the position information and gray-
scale value information of the digital image into the form of a quantum image.
Since the qubits’ initial state on the IBM Q platform IBM  is $\lvert
0\rangle$, the quantum circuit needs to be initialized according to our
algorithm. Because the initial state of the auxiliary qubits and threshold
qubits are some certain values, only ordinary initialization is required. For
example, the qubits with the threshold value of $\lvert 010\rangle$, $\lvert
0\rangle$ does not need any change, and only a NOT gate is needed to directly
change the second $\lvert 0\rangle$ to $\lvert 1\rangle$. But for quantum
images, we do not use ordinary initialization methods. Because the NEQR model
uses three entangled qubit sequences to store the image gray-scale value and
position information, and the whole imageis stored in the superposition state
of the three qubit sequences, so it is necessary to use the relationship
between the pixels’ positions and gray-scale values in a quantum image to
initialize the quantum image preparation circuit Le2011 . It is realized by
the combination of H gate, NOT gate and CNOT gate, as shown in Fig. 3. Among
them, $C_{2}$, $C_{1}$, $C_{0}$ represent gray-scale value information, and
$P_{3}$, $P_{2}$, $P_{1}$, $P_{0}$ represent position information. First. By
using H gate transformation on the position information qubits, the four
qubits are transformed from $\lvert 0\rangle$ to a superposition state of
$\lvert 0\rangle$ and $\lvert 1\rangle$. This makes these four qubits become
the superposition state of all positions of the pixels in the whole image, and
the consumption of qubits representing images can be saved through the
superposition of qubits. Then the CNOT gates are used to realize the
entanglement of the position sequence and the gray-scale value sequence. The
circuit realization is shown in Fig. 3.

Figure 3: Quantum image preparation circuit

After the quantum image is input, we need to initialize the threshold. Because
the threshold is a certain value set in advance, the initialization of the
threshold adopts the ordinary initialization method described above. Then, the
quantum comparator is needed to compare the gray-scale values of the quantum
image with the threshold. Inspired by quantum bit string comparator (QBSC)
Oliveira2007 , we design a more suitable comparator in this paper. The 1-qubit
quantum comparator is the basis of quantum comparator, as shown in Fig. 4(a).
The circuit takes $\lvert a\rangle$ and $\lvert b\rangle$ as input, $\lvert
y\rangle$ as output. If $a\geq b$, then $y=0$; if $a<b$, then $y=1$. The
1-qubit comparator only needs to perform one comparison, and the circuit
requires a total of three qubits. Two comparison qubits are used to compare
the relationship between $\lvert a\rangle$ and $\lvert b\rangle$, and one
auxiliary qubit is used to store the comparison result. The 2-qubit comparator
needs to perform twice comparisons, so it needs to add one qubits on the basis
of 1-qubit comparator to store the result of the second comparison. In
addition, another one qubit is needed to compare the two results of the twice
comparisons. At this time, if $a_{1}b_{1}=01$, it means $a<b$ and it directly
outputs the comparison result $y=1$. If $a_{1}b_{1}=00$ or 11, the CNOT gate
and Toffoli gate are required to use the comparison result of $a_{0}b_{0}$
output $y=0$ or 1. If $a_{1}b_{1}=10$, it means $a>b$, a Toffoli gate is
required to make the output result $y=0.$ Therefore, the final comparison
result is obtained. As shown in Fig. 4(b), this circuit requires a total of 7
qubits, among them, 4 qubits are used for comparison, 1 qubits are used to
store the comparison result, and 2 qubits are used to form redundant
information qubits. When the number of qubits that need to be compared
continues to increase, we just need to use reset operation Shende2005  to
reset the qubits that constitute the redundant information of the circuit in
the 2-qubit comparator, and we can continue to compare the increased qubits
without adding more auxiliary qubits. In this paper, a 3-qubit comparator is
needed to compare the magnitude between the gray-scale values of the quantum
image and the threshold. This need to perform another comparison based on the
comparison result of the first two qubits on the basis of the 2-qubit
comparator and finally $\lvert y\rangle$ is output. The circuit is shown in
Fig. 4(c). According to $\lvert y\rangle$, the magnitude relationship between
the gray-scale value of the pixel and the threshold can be obtained. The
complete 3-qubit comparison circuit of comparing one threshold with the whole
quantum image is shown in Fig. 5(a). Where $\lvert{C_{2}C_{1}C_{0}}\rangle$
encodes the gray-scale value information, $\lvert P_{3}P_{2}P_{1}P_{0}\rangle$
encodes the position information, $\lvert T_{2}T_{1}T_{0}\rangle$ encodes the
threshold information, and the remaining qubits are auxiliary qubits. Before
image segmentation, the gray-scale values of all pixels in the prepared
quantum image must be compared with the threshold, and finally the every
piexls’ comparison results $\lvert y\rangle$ are obtained. Then, the threshold
qubits and the other two auxiliary qubits are all set to $\lvert 0\rangle$,
and then we can continue to use these qubits during next comparison. In order
to facilitate the use of the 3-qubit comparison circuit later, we have given a
simplified form of the circuit, as shown in Fig. 5(b).

(a) 1-qubit comparator circuit

(b) 2-qubit comparator circuit

(c) 3-qubit comparator circuit

Figure 4: Quantum comparison circuit

(a) Quantum circuit of comparing one threshold with the whole quantum image
(b) The quantum circuit diagram of the circuit (a)

Figure 5: The quantum circuit of 3-qubit quantum comparator and its simplified
diagram

After the first threshold comparison, the pixels that are larger than the high
threshold are segmented according to the comparison result, and their gray-
scale values are set to 111. Namely if $y_{H}=0$, the gray-scale value
information qubits are transformed to 111 one by one. When the segmentation
operation of one gray-scale value qubit is completed, the auxiliary qubit
needs to be set to $\lvert 0\rangle$, and the next gray-scale value qubit can
continue to be transformed, which can save the number of qubits. As shown in
Fig. 6.

Figure 6: The segmentation circuit diagram of pixels larger than the high
threshold and its simplified diagram ($S_{1})$

After the pixels larger than the high threshold are segmented, the pixels
smaller than the low threshold in the quantum image should be found and
segmented. The low threshold quantum comparator is the same as the high
threshold quantum comparator. Before the low threshold comparison, we reset
the high threshold qubits to $\lvert 0\rangle$, so that the low threshold
setting can share the three qubits with the high threshold. In addition, the
two auxiliary qubits other than the comparison result should be set to $\lvert
0\rangle$, which will be used for the low threshold comparison. Due to the two
comparison results are needed to segment the image pixels between the high and
low threshold later, the two comparison result must be stored separately and
saved to the end, so the low threshold comparison result need to be stored in
one additional qubit. Other than that, the other parts are the same as the
quantum comparator in Fig. 4(c). If the output result after the comparison by
the quantum comparator is $y_{L}=1$, the pixels in quantum image will be
segmented to 000 through the comparison result and the auxiliary qubit, as
shown in Fig. 7.

Figure 7: The segmentation circuit of pixels smaller than the low threshold
and its simplified diagram $(S_{2})$

After comparing and segmenting the pixels larger than the high threshold or
smaller than the low threshold, the two comparison results are stored in two
different qubits. When the pixels gray-scale value in the quantum image are
between the high and low threshold, we can find these pixels by using
$y_{L}=0$ and $y_{H}=1$. The segmentation method is shown in Fig. 8, and the
whole quantum image segmentation circuit is shown in Fig. 9.

Figure 8: The segmentation circuit of the pixel between the high and low
thresholds and its simplified diagram $(S_{3})$ Figure 9: The complete quantum
circuit of quantum image two-threshold segmentation algorithm

##  4 Circuit quantum cost and experiment analysis

In this section, we analysis the circuit quantum cost and compare the
performance differences between our algorithm and some other quantum image
segmentation algorithms. Then we perform the simulation experiment on the IBM
Q platform and the experimental result is analyzed.

###  4.1 Circuit quantum cost analysis

Single qubit gates and double qubits gates can perform arbitrary operations on
any qubits (E.g, NOT gate and CNOT gate), which are basic quantum logic gates.
So, in this paper, we use the total number of single qubit gates and double
qubits gates (i.e. quantum cost) to evaluate the complexity of quantum
circuits. For example, the quantum cost of NOT gate and CNOT gate are both 1.
The Toffoli gate can be decomposed into 5 double qubits gates, thence, the
quantum cost of Toffoli gate is 5 Li2020 . The circuit quantum cost analysis
of the quantum image segmentation algorithm is based on the circuit in Fig. 9.
Assuming that the size of the quantum image is $2^{n}\times 2^{n}$, and the
gray-scale range is from 0 to $2^{q}$-1. The required basic quantum gates are
calculated as follows. Fig. 4 shows that a quantum comparator requires 3$q$-2
Toffoli gates, $q$-1 CNOT gates and 2$q$-2 reset gates, which contains a total
of 18$q$-13 basic quantum logic gates, and we need two quantum comparators. It
can be seen from Fig. 6-8 that the segmentation operation needs 3$q$+1 Toffoli
gates, 3$q$+2 CNOT gates, and 3$q$+3 reset gates. In addition, 2$q$ NOT gates
and $q$ reset gates are also needed to set the threshold. Typically, the NEQR
quantum image preparation and measurement processes are not considered parts
of quantum image processing. Therefore, the two-threshold quantum image
segmentation algorithm requires a total of 60$q$-6 basic quantum logic gates.
So, the circuit quantum cost is 60$q$-6, and the circuit complexity is O($q$),
which means that the complexity is only related to gray-scale value $q$, and
the circuit complexity will not increase as the size of the quantum image
increases.

Then, the algorithm our proposed is compared with the threshold-based quantum
image segmentation algorithms in references Caraiman2015 ; Xia2019 ; Yuan2020
in terms of the number of threshold, auxiliary qubits and the quantum cost.
For convenience, the segmentation algorithms in Caraiman2015 ; Xia2019 ;
Yuan2020  are abbreviated as IS, NMQCIS, DQIS, respectively. The comparison
results are shown in Tab. 1.

Table 1: Comparison of the different quantum image segmentation algorithms

Algorithms | Threshold numbers | Auxiliary qubits | Quantum cost | Segmentation numbers
---|---|---|---|---
IS Caraiman2015  | 1 | 3$q$-1 | 127$q$-91 | 2
NMQCIS Xia2019  | 1 | 18 | 48$q$-6 | 2
DQIS Yuan2020  | 2 | 5 | 70$q$-14 | 2
Our algorithm | 2 | 4 | 60$q$-6 | 3
|  |  |  |

As shown in Tab. 1, one threshold and two QBSCs are used in the IS algorithm
Caraiman2015  to segment the quantum image into a binary image. Scince the
quantum cost of 1-qubit QBSC is 14, and the number of auxiliary qubits is
3$q$-1, so the whole circuit quantum cost is 127$q$-91. The NMQCIS algorithm
Xia2019  is also used to segment the quantum image into a binary one, where
one threshold, one half-comparator, and 2$q$ swap gates with 3 control qubits
are introduced. The quantum cost of the half-comparator is 14$q$-6, and one
swap gate requires 5 Toffoli gates, so the quantum cost is 48$q$-6. In the
DQIS algorithm Yuan2020 , the author claimed “the number of the required basic
gates or operations is $42q+1$”, In fact, the quantum cost is inaccurate
because the authors omitted a comparator. In this algorithm, two thresholds
and two comparators (the quantum cost of one comparator is 28$q$-15) are used
to segment the quantum image, which require 5 auxiliary qubits. And as shown
in Fig. 12 in Ref. Yuan2020 , two comparators, 2$q$+2 Toffoli gates, 2$q$ CNOT
gates, 4 NOT gates and 2$q$+2 reset gates are used to compose the complete
circuit. So, the quantum cost of DQIS algorithm is
$2(28q-15)+[5(2q+2)]+(2q)+(4)+(2q+2)=70q-14$. In addition, the pixels more
than the high threshold and less than the low threshold are segmented into 0,
and the other pixels remain unchanged, which is inappropriate for complex
images. The above algorithms only perform two segmentations, which will result
in the inability to segment the details of the image. It can be seen from Tab.
1 that our segmentation algorithm is a two-threshold segmentation algorithm,
which has fewer auxiliary qubits and lower quantum cost than the other three
algorithms. Then, the image is segmented into a ternary image by three
segmentations, which can better segment the complex image and preserve the
details in the image. In addition, the circuit quantum cost will not increase
as the image’s size increase, which is very beneficial for image segmentation
with multiple gray-scale levels.

###  4.2 Experiment analysis

Currently, the IBM Quantum Lab provides some tools for running a quantum
algorithm. One is the IBM Q platform, which contains some real quantum
computers and simulators on the cloud, and users can upload their own quantum
algorithm programs to the cloud to run their own programs on the real quantum
computer or simulators. Another method is to use the open-source quantum
computing toolkit Qiskit developed by IBM Research Laboratory to write our own
algorithms with the Python language as the front-end interface, so that we can
realize the simulation of quantum computers on our own computers, but the the
number of qubit is very small. Therefore, we choose a quantum computer
simulator called ’ibmq_qasm_simulator’ to perform simulation experiments
through Qiskit extension Qiskit . This simulator has 32 qubits and can run all
the basic logic gates included in our circuit. So in this paper, all quantum
circuits have been simulated and verified on this simulator.

To verify the feasibility of the algorithm, we use an image with a size of
$4\times 4$ and a gray-scale range of [0,7] as an example. Fig. 10(a) is a
schematic diagram of the original image, and Fig. 10(b) is a schematic diagram
of the segmented image. The NEQR model of the segmented image is shown in
Eq(6).

$\begin{array}[]{l}\lvert{I^{{{}^{\prime}}}}\rangle=\frac{1}{{{2^{2}}}}(\lvert{1000000}\rangle+\lvert{1000001}\rangle+\lvert{1000010}\rangle+\lvert{1000011}\rangle+\\\
\begin{array}[]{*{20}{c}}{\begin{array}[]{*{20}{c}}{}\hfil&{\begin{array}[]{*{20}{c}}{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\end{array}}\end{array}}&{\lvert{1000100}\rangle+}\end{array}\lvert{1000101}\rangle+\lvert{0000110}\rangle+\lvert{0000111}\rangle+\\\
\begin{array}[]{*{20}{c}}{\begin{array}[]{*{20}{c}}{}\hfil&{\begin{array}[]{*{20}{c}}{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\end{array}}\end{array}}&{\lvert{0001000}\rangle+}\end{array}\lvert{1111001}\rangle+\lvert{0001010}\rangle+\lvert{1111011}\rangle+\\\
\begin{array}[]{*{20}{c}}{\begin{array}[]{*{20}{c}}{}\hfil&{\begin{array}[]{*{20}{c}}{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil&{}\hfil\end{array}}\end{array}}&{\lvert{0001100}\rangle+}\end{array}\lvert{1111101}\rangle+\lvert{1001110}\rangle+\lvert{1111111}\rangle)\\\
\end{array}$ $None$

Fig. 11 shows the probability histogram of the segmented image, and the number
of measurements is 1024. It can be seen from the probability histogram that
the probability amplitude of the quantum sequence measured is different, which
further verifies the randomness of the quantum system and the principle of
”uncertainty”. To verify the effect of our algorithm, we compare our algorithm
with the existing single threshold (IS and NMQCIS ) and dual-threshold (DQIS)
quantum segmentation algorithms, as shown in Fig. 12. IS and NMQCIS use two
segmentations to segment the image into binary images, which is only suitable
for simple images and loses a lot of details. Since DQIS also only performs
two segmentations, the pixels between the double thresholds are messy, and the
rest of the pixels are not classified. This leads to unclear segmentation of
the resulting image details. Like the corresponding classical algorithm, our
algorithm converts the image into a ternary image with three segmentations,
which is very clear and retains more details.

Based on the segmentation algorithm in this paper, we also give some schematic
diagrams of the segmentation results with different thresholds, as shown in
Fig. 13. For quantum image segmentation algorithm simulation, the fewer
qubits, basic quantum logic gates, and measurement times are used, the less
time it takes, which can directly improve the efficiency of segmentation. In
the design of quantum image processing algorithms, there are two ways to
directly reduce the quantum cost. One method is to make full use of the
parallelism of quantum, which is also an important reason why quantum image
processing has exponentially accelerated compared to digital image processing.
The other method is to use the reset operation multiple times to reuse the
qubits that have been used. In our quantum image segmentation algorithm, we
make full use of quantum parallelism and reset operations, so that the quantum
cost is very small and it will not increase as the image size increases.

(a) Schematic of the original image (b) Schematic of the segmented image

Figure 10: Schematic of the original image and the segmented image Figure 11:
Probability histogram of $4\times 4$ segmented quantum image

Figure 12: (a) Three original images. (b) The result images of the single
threshold algorithm(IS and NMQCIS). (c) The result images of the double
threshold algorithm (DQIS). (d) The result images of our proposed algorithm.
The threshold of (b) is 011; the thresholds of (c) and (d) are $T_{H}=100$ and
$T_{L}=010$.

(a) $T_{L}$=011,$T_{H}$=101  (b) $T_{L}$=011,$T_{H}$=110 (c)
$T_{L}$=001,$T_{H}$=011 (d) $T_{L}$=010,$T_{H}$=101

Figure 13: Segmentation results under different thresholds

##  5 Conclusion and discussion

In this paper, an improved two-threshold quantum segmentation algorithm for
NEQR image is proposed, which can segment the quantum image into a ternary
image and can be scaled to use $n$ thresholds for $n+1$ segmentations. In
addition, a quantum comparator and a corresponding quantum segmentation
circuit is designed, which can segment the quantum image by using few qubits,
and the quantum cost dose not increase as the image’s size increases. The
quantum circuits analysis and the experiment on IBM Q show that the algorithm
can segment image efficiently. However, our algorithm can only segment static
targets in static images, which is less effective for dynamic target
segmentation. Therefore, our future work is to study the segmentation of
dynamic objects in static images. Besides, we will continue to optimize the
quantum circuit and reduce the qubits consumption to increase the
applicability of the algorithm.

As described in this paper, our algorithm can divide a gray-scale image into a
ternary image, which can clearly distinguish the objects in the image.
However, in some specific cases, it is necessary to obtain an image with more
gray-scale values by image segmentation and segment multiple targets in the
image. We can scale the proposed algorithm to solve this problem. To be
specific, the comparators can be extended to n-qubit comparators by increasing
the number of comparison qubits, and we only need to increase the number of
comparator for multiple thresholds comparisons. For each additional quantum
comparator, we need to add a corresponding segmentation circuit ($S_{3}$) to
segment the pixels between two thresholds. When the previous thresholds
segmentation is over, we reset the comparison result qubits so that each
additional comparator afterward can reuse these auxiliary qubits. Therefore,
we can scale the segmentation algorithm only by adding quantum comparators and
segmentation circuits($S_{3}$). In this way, we can obtained an image with
more gray-scale values. So, our algorithm can use fewer qubits to segment
complex images with different gray-scale levels in various situations, which
is very beneficial for practical applications.

*Acknowledgments This work is supported by the National Natural Science Foundation of China (62071240), and the Priority Academic Program Development of Jiangsu Higher Education Institutions (PAPD).

##  Appendix A The circuit on IBM Q platform

Fig.14 The circuit on IBM Q platform

All data generated or analysed during this study are included in this
published article [and its supplementary information files].

## References

  * (1) Yan, F., Iliyasu, A.M., Le, P.Q.: Quantum image processing: A review of advances in its security technologies. International Journal of Quantum Information 15(3), 1730001 (2017)
  * (2) Cai, Y., Liu, X.W., Jiang, N.: A survey on quantum image processing. Chinese Journal of Electronics 27(4), 56–65 (2018)
  * (3) Venegas-Andraca, S.E., Bose, S.: Storing, processing, and retrieving an image using quantum mechanics. In: Proceeding of the SPIE Conference Quantum Information and Computation, vol. 5105, pp. 137–147 (2003). https://doi.org/10.1117/12.485960
  * (4) Latorre, J.I.: Image compression and entanglement (2005) arXiv:quant- ph/0510031
  * (5) Venegas-Andraca, S.E., Ball, J.L.: Processing images in entangled quan- tum systems. Quantum Information Processing 9(1), 1–11 (2010). https: //doi.org/10.1007/s11128-009-0123-z
  * (6) Le, P.Q., Dong, F., Hirota, K.: A flexible representation of quantum images for polynomial preparation,. Quantum Information Processing 10(1), 63–84 (2011)
  * (7) Sun, A.M. B.and Iliyasu, Yan, F., Dong, F., Hirota, K.: An rgb multi- channel representation for images on quantum computers. Adv. Comput. Intell. inform. 17(3), 404–417 (2013)
  * (8) Yao, X.W., Wang, H., Liao, Z., Chen, M.C.: Quantum image processing and its application to edge detection: Theory and experiment. Physical Review X 7, 031041 (2017)
  * (9) Zhang, Y., Kai, L., Gao, Y., Wang, M.: NEQR: a novel enhanced quantum representation of digital images. Quantum Information Processing 12(8), 2833–2860 (2013). https://doi.org/10.1007/s11128-013-0567-z
  * (10) Jiang, N., Wang, L.: Quantum image scaling using nearest neighbor interpolation. Quantum Information Processing 14(5), 1559–1571 (2015)
  * (11) Zhang, Y., Lu, K., Xu, K., Gao, Y., Wilsion, R.: Local feature point extraction for quantum images. Quantum Information Processing 14(5), 1573–1588 (2015)
  * (12) Sang, J., Wang, S., Li, Q.: A novel quantum representation of color digital images. Quantum Information Processing 16(2), 42 (2017)
  * (13) Zhou, R.G., Tan, C., Lan, H.: Global and local translation designs of quantum image based on frqi. International Journal of Theoretical Physics 56(4), 1–17 (2017). https://doi.org/10.1007/s10773-017-3279-9
  * (14) Zhou, R.G., Wu, Q., Zhang, M.Q., Shen, C.Y.: Quantum image encryption and decryption algorithms based on quantum image geometric transformations. International Journal of Theoretical Physics 52(6), 1802–1817 (2013). https://doi.org/10.1007/s10773-012-1274-8
  * (15) Hancock, E.R.: Local feature point extraction for quantum images. Quantum Information Processing 14(5), 1573–1588 (2015). https://doi.org/10. 1007/s11128-014-0842-7
  * (16) Zhou, R.G.: Quantum image gray-code and bit-plane scrambling. Quantum Information Processing 14(5), 1717–1734 (2015). https://doi.org/10. 1007/s11128-015-0964-6
  * (17) Yuan, S., Mao, X., Li, T., Xue, Y., Chen, L., Xiong, Q.: Quantum morphology operations based on quantum representation model. Quantum Information Processing 14(5), 1625–1645 (2015)
  * (18) Song, X., Wang, S., El-Latif, A.A.A.: Dynamic watermarking scheme for quantum images based on hadamard transform. Multimed. Syst. 20(4), 379–388 (2014)
  * (19) Li, P., Liu, X., Hong, X.: Quantum image weighted average filtering in spatial domain. International Journal of Theoretical Physics 56(11), 1–27 (2017). https://doi.org/10.1007/s10773-017-3533-1
  * (20) Zhao, S., Yan, F., Chen, K., Yang, H.: Interpolation-based high capacity quantum image steganography. International Journal of Theoretical Physics 60(5), 3722–3743 (2021)
  * (21) Yan, F., Iliyasu, A.M., Yang, H., Hirota, K.: Strategy for quantum image stabilization. Science China Information Science 59, 052102 (2016)
  * (22) Yan, F., Zhao, S., Venegas-Andraca, S.E., Hirota, K.: Implementing bilinear interpolation with quantum images. Digital Signal Processing 117(5), 1–31 (2021)
  * (23) Zhou, R.G., Liu, D.Q.: Quantum image edge extraction based on improved sobel operator. International Journal of Theoretical Physics 58(9), 1–17 (2019). https://doi.org/10.1007/s10773-019-04177-6
  * (24) Fan, P., Zhou, R.G., Hu, W.W., Jing, N.: Quantum image edge extraction based on classical sobel operator for NEQR. Quantum Information Processing 18(1), 24 (2019). https://doi.org/10.1007/s11128-018-2131-3
  * (25) Chetia, R., Boruah, S., Sahu, P.P.: Quantum image edge detection using improved sobel mask based on NEQR. Quantum Information Processing 20(1), 21 (2021). https://doi.org/10.1007/s11128-020-02944-7
  * (26) Liu, W., Wang, L.: Quantum image edge detection based on eight-direction Sobel operator for NEQR. Quantum Information Processing 21, 190 (2022)
  * (27) Caraiman, S., Manta, V.I.: Histogram-based segmentation of quantum images. Theoretical Computer Science 529(6), 46–60 (2014)
  * (28) Caraiman, S., Manta, V.I.: Image segmentation on a quantum computer. Quantum Information Processing 14(5), 1693–1715 (2015)
  * (29) Xia, H., Li, H., Zhang, H., Liang, Y., Xin, J.: Novel multi-bit quantum comparators and their application in image binarization. Quantum Information Processing 18(7), 229 (2019)
  * (30) Li, H.S., Zhu, Q.X., Song, L., C.Y., S.: Image storage, retrieval, compression and segmentation in a quantum system. Quantum Information Processing 12(6), 2269–2290 (2013)
  * (31) Yuan, S., Wen, C., Hang, B., Gong, Y.: The dual-threshold quantum image segmentation algorithm and its simulation. Quantum Information Processing 19(12), 425 (2020). https://doi.org/10.1007/ s11128-020-02932-x
  * (32) IBM Quantum Lab: IMB Q. https://www.research.ibm.com/ibm-q/ (Accessed on 30 November 2021)
  * (33) Aleksandrowicz, G., Alexander, T., Barkoutsos, P., Bello, L., Ben-Haim, Y.: Qiskit: an open-source framework for quantum computing (2019)
  * (34) Oliveira, R.V. D.S.and Ramos: Quantum bit string comparator: Circuits and applications. quantum computers and computing 7(1), 17–26 (2007)
  * (35) Shende, V.V., Bullock, S.S., Markov, I.L.: Synthesis of quantum logic circuits. In: Proceedings of the 2005 Asia and South Pacific Design Automation Conference, vol.4, pp. 272–275 (2005). https://doi.org/10. 1145/1120725.1120847
  * (36) Li, H.S., Fan, P., Xia, H.Y., Peng, H.L., Long, G.L.: Efficient quantum arithmetic operation circuits for quantum image processing. Science China Physics, Mechanics & Astronomy 63(8), 280311 (2020). https://doi.org/ 10.1007/s11433-020-1582-8


# Anomaly-free scale symmetry and gravity

Mikhail Shaposhnikov<EMAIL_ADDRESS>Institute of Physics, École
Polytechnique Fédérale de Lausanne (EPFL), CH-1015 Lausanne, Switzerland  Anna
Tokareva<EMAIL_ADDRESS>Department of Physics, University of
Jyväskylä, P.O.Box 35 (YFL), FIN-40014, Finland  Institute for Nuclear
Research of Russian Academy of Sciences, 117312 Moscow, Russia  Helsinki
Institute of Physics (HIP), University of Helsinki, P.O. Box 64, 00014,
Finland

###### Abstract

In this Letter, we address the question of whether the conformal invariance
can be considered as a global symmetry of a theory of fundamental
interactions. To describe Nature, this theory must contain a mechanism of
spontaneous breaking of the scale symmetry. Besides that, the fundamental
theory must include gravity, whereas all known extensions of the conformal
invariance to the curved space-time suffer from the Weyl anomaly. We show that
conformal symmetry can be made free from the quantum anomaly only in the flat
space. The presence of gravity would reduce the global symmetry group of the
fundamental theory to the scale invariance only. We discuss how the effective
Lagrangian respecting the scale symmetry can be used for the description of
particle phenomenology and cosmology.

††preprint: INR-TH-2022-002

Introduction.—What is the global symmetry of Nature? In the absence of gravity
the most obvious answer to this question is given by the special relativity
and is associated with the Poincaré group. The Poincaré transformations – time
and space translations, together with Lorentz boosts and rotations – do not
change the form of Maxwell equations. As was noted a long time ago, the
Maxwell equations without external currents have a wider symmetry group [1, 2]
\- the 15 parameters conformal invariance, containing in addition to ten
Poincaré generators, four special conformal transformations, and dilatations.
Dilatations change the length of the rulers, while special conformal
transformation can bend the lines but do not alter the angles between them.
Could it be that the symmetry of all interactions is conformal?

The answer is certainly “no” if the ground state of the theory respects the
conformal invariance. The theories enjoying the conformal symmetry – CFTs – do
not contain any intrinsic mass scale and do not have well-defined particle
states, in contrast with observations. However, if the conformal invariance
(CI) is spontaneously broken, $\langle O\rangle\neq 0$ (here $O$ is some
operator with non-zero mass dimension), the scale appears, massive particle
excitations show up, and the resulting theory may happen to be relevant for
the description of all particle interactions.

The theories with exact but spontaneously broken conformal invariance are very
interesting from many points of view:
\- The spontaneous breaking of CI leads to the existence of massless Goldstone
particle - dilaton. The degeneracy of the vacuum ensures that the energy of
the ground state is equal to zero [3, 4, 5, 6] \- an intriguing fact given the
astonishing small value of the observed cosmological constant (dark energy).
\- The Poincaré group has much more representations for the massless states
than were never observed in Nature. In particular, particles with continuous
spin can exist (a textbook discussion can be found in [7], see also [8, 9]) if
the Nature is just Poincaré invariant. The puzzling absence of these states
gets explained as the conformal symmetry does not allow for this kind of
irreducible representations [10, 11].
\- If the mass of the Higgs boson in the Lagrangian of the Standard Model is
put to zero, this theory becomes conformally invariant at the classical level.
Perhaps, this is a key for an explanation why the Fermi scale is much smaller
than the Planck scale [12, 13, 14, 15, 16].

The list of known UV complete CFTs is very limited and contains only
supersymmetric theories such as N=4 Yang-Mills or fishnet CFT [17]. The
relevance of these theories for the description of Nature is obscure. Coming
from another end – low energies, it is possible to construct
phenomenologically viable (e.g. containing just the Standard Model) quantum
effective field theories with exact but spontaneously broken conformal
symmetry [18, 6, 19, 20, 21]. These theories are non-renormalizable but weakly
coupled below the energy scale of CI breaking. One may hope that their UV
limit is given by some hypothetical well-defined CFT.

Suppose that indeed such a theory can be constructed in Minkowski space-time.
Will it survive if gravity is added in such a way that the flat space remains
a solution to the Einstein equations? In more formal terms, the question can
be formulated as follows. The spectrum of spontaneously broken conformally
invariant Minkowski theory contains several massive particles and one massless
particle - the dilaton 111The realistic theory would also contain a massless
photon. The addition massless vector field can be made without difficulties
and thus is not considered in what follows.. In the low energy domain, all
massive particles can be integrated out, leading to the most general CI action
for the dilaton. Consider now an arbitrary action containing two massless
particles - a scalar field and graviton, invariant under local coordinate
transformations (Diffs). Can one find the additional symmetry such that if the
general metric is replaced by the non-dynamical Minkowski one, the resulting
scalar action will be the most general conformally invariant one? Note that
this problem is different from that of construction of anomaly free Weyl
invariant theory of gravity, addressed in [22].

It is often stated (see, e.g. [23]) that a natural extension of the conformal
symmetry of flat space-time to curved space-time is the Weyl symmetry,
constituting in replacement $g_{\mu\nu}\rightarrow\Omega^{2}g_{\mu\nu}$, where
$\Omega$ is an arbitrary function of space-time coordinates. Physically, Weyl
invariance is the local freedom of changing the length units. Now, the Weyl
symmetry conflicts with quantum theory because of the Weyl anomaly: the
classical theory invariant with respect to Weyl transformation loses this
property when quantum effects are accounted for (see a review [24] and
references therein) if the requirement of the locality of the effective action
is imposed. Even the approach suggested in [25] and developed in [6] based on
defining the theory as Weyl-invariant in $D=4-2\epsilon$ dimensions by
identifying the mass parameter of dimensional regularisation $\mu$ with the
dilaton field $\phi$ does not help to avoid the Weyl anomaly with $D$ even
(and in particular, in $D=4$) 222However, within this construction the scale
[18] and conformal [19, 26] symmetries can be kept at the quantum level in the
flat space..

This Letter aims to demonstrate that the only finite subgroup of the Weyl
group, which can be made anomaly-free in any curved spacetime corresponds to
the dilatations. The conformal symmetry which was held in the flat space at
the quantum level is lost, once gravity is taken into account. The Weyl
anomaly in the generic spacetime cannot be cancelled by the proper choice of
counterterms and conformal symmetry reduces to the scale symmetry. The latter
can be kept anomaly-free at the quantum level.

General structure of the dilaton effective action in Minkowski space-
time.—Though our interest is in the theory in 4-dimensional space-time it
would be convenient to consider arbitrary $D$ dimensions. The dilaton field is
denoted by $\phi$ and is assumed to have a canonical kinetic term
$\partial_{\mu}\phi\partial^{\mu}\phi$. The mass dimension of $\phi$ is
$\Delta=(D/2-1)$ and is non-zero for $D=4$, allowing for spontaneous breaking
of conformal symmetry by the dilaton vacuum expectation value. The most
general conformally invariant action can be constructed with the use of the
following two ingredients [26]. The first one is the combination

$O_{N}=\phi^{\frac{2(N+1)}{2-D}}\square^{N}\left(\phi^{\frac{D-2N}{D-2}}\right)~{},$
(1)

which changes like $\phi$ under special conformal transformation,
$\phi(x)\to\phi^{\prime}(x^{\prime})=\Omega^{-\Delta}\phi(x)$, where
$\Omega=(1+2a_{\mu}x^{\mu}+a^{2}x^{2})^{-1}$ and $a_{\mu}$ is an arbitrary
$D$-vector. Here $\square$ is the D-dimensional Laplacian and $N$ is an
integer number. The second ingredient is the differential operator

$\hat{O}_{N}=\phi^{\frac{2(N+1)}{2-D}}\,\square^{N}~{},$ (2)

which can be applied to any scalar operator with mass dimension $D/2-N$.

The conformally invariant Lagrangian can be written as a sum of all
combinations of the form

$\phi^{q}\hat{O}_{N_{1}}[\phi^{\alpha_{1}}O_{m_{1}}...O_{m_{k}}]...\hat{O}_{N_{p}}[\phi^{\alpha_{p}}O_{s_{1}}...O_{s_{l}}]~{},$
(3)

where the powers $\alpha_{i}$ are fixed in such a way that the mass dimension
of the operators in square brackets is equal to $D/2-N_{i}$ and the power $q$
is singled out from the requirement that the action is dimensionless. Not all
of these operators are independent, some of them can be related to each other
by integration by parts. The key observation in the procedure of construction
of conformal operators is that the power of the $\square$ operator has to be
properly adjusted to the conformal weight of the operator which is
differentiated.

The conformally invariant operators can be classified by the total number of
derivatives (in what follows we take $D=4$). There is one operator $\phi^{4}$
without derivatives, one operator $\phi\,\square\phi$ (the kinetic term) with
two derivatives, two operators with 4 derivatives (there is one more operator
in scale-invariant but not CI theory,
$O_{3}=\frac{1}{\phi^{4}}(\,\partial_{\mu}\phi)^{4}$),

$Q_{1}=\tau\,\square^{2}\tau,~{}~{}Q_{2}=\frac{1}{\phi^{2}}(\,\square\phi)^{2}~{},$
(4)

(here $\tau=\log(\phi/\mu)$ 333Note that the action does not depend on the
dimensionful parameter $\mu$, as it disappears after integration by parts.),
four operators with 6 derivatives (while there are 7 scale-invariant ones),
etc. Note that the operator $Q_{1}$ (it will play an important role below) can
be derived as the formal limit $Q_{1}=\lim_{D\to
4}\left(\frac{2}{D-4}\,\square\phi^{\frac{D-4}{2}}\right)^{2}$.

Weyl anomaly versus Weyl symmetry.—There is yet another way to construct the
local dilaton effective action which is based on the following observation.
Take an arbitrary Diff-invariant action constructed from the metric only (i.e.
consider pure gravity) and replace the metric $g_{\mu\nu}$ by
$g_{\mu\nu}\phi^{2}/M_{P}^{2}$, where $M_{P}$ is any scale normally taken to
coincide with the Planck mass. One gets in this way a scalar-tensor gravity
which is Weyl-invariant (under transformation
$g_{\mu\nu}\rightarrow\Omega^{2}g_{\mu\nu},~{}\phi\to\Omega^{-1}\phi$) by
construction. Now, it is obvious that a Weyl-invariant theory is automatically
conformal invariant if the metric is taken to be flat. This method has been
used for a construction of the dilaton action in spaces with different
dimensions (see, e.g. [27, 23, 28, 29]).

This procedure leads to an impression that the natural extension of the
conformal invariance to curved space-time is the Weyl symmetry. However, the
Weyl symmetry happened to be anomalous [24]. The reason why this is the case
is based on a simple counting of the available Diff-invariant operators. For
$D=4$, and for four derivatives, these are: $R^{2}$, $R_{\mu\nu}R^{\mu\nu}$,
$W^{2}=W_{\mu\nu\rho\sigma}W^{\mu\nu\rho\sigma}$, and $\,\square R$, where $R$
is the scalar curvature, $R_{\mu\nu}$ and $W_{\mu\nu\rho\sigma}$ are the Ricci
and Weyl tensors respectively. Out of these four operators, $\,\square R$ is a
full derivative and thus it cannot be used for construction of the conformal
action in flat space, $W^{2}$ is Weyl-invariant and thus it does not lead to
any non-trivial scalar action, whereas the combination
$E_{4}=R_{\mu\nu\rho\sigma}R^{\mu\nu\rho\sigma}-4R_{\mu\nu}R^{\mu\nu}+R^{2}$
is the Euler density which is a surface term. In other words, only one
operator, say $R^{2}$, can be used for the generation of the conformally
invariant action, meaning that one out of the two operators defined in (4)
will be missing (it appears to be $Q_{1}$).

In $D=4$ only one conformally invariant operator, containing four derivatives
- $Q_{1}$ \- is failed to be constructed by the procedure outlined above. All
CI operators containing 2 derivatives, as well as 6 and more derivatives can
be found in this way. A similar story happens in higher even dimensions
$D=2k,~{}k\geq 2$, namely the CI operators $\tau\,\square^{k}\tau$ cannot be
derived from local Diff-invariant pure gravity action, because of the
existence of topological Euler densities in $2k$-dimensional space. (However,
non-local operators providing the Weyl invariant action can be constructed
[22, 30].) This makes it clear that the extension of the flat space CI to the
curved space cannot be the Weyl symmetry if the dimension of space-time is
even and the locality of the action is imposed.

How to extend the conformal symmetry to the curved space?—The conformal group
in flat space depends on a finite number of parameters, whereas the Weyl
symmetry is local and thus is controlled by an arbitrary function of space.
This poses the question of whether one can find a finite subgroup of the Weyl
group which is anomaly-free and matches with the flat-space conformal
symmetry.

To analyse this problem we note that the correspondence between the number of
conformal operators with 4 derivatives in flat space and the number of Diff-
invariant operators in curved space is restored if $D\neq 4$. It is customary
to take formally $D\neq 4$, as in dimensional regularisation, and consider
eventually the limit $D\to 4$. Perhaps, the most compact Weyl-invariant
extension of the $Q_{1}$-type flat space dilaton action to curved space is

$\int d^{4}x\left(\tau\,\square^{2}\tau\right)\to S=\lim_{D\to 4}\int
d^{D}x\sqrt{-g}\left[\tau\Delta_{4}\tau+2\tau\left(-\frac{1}{6}\,\square
R+\frac{1}{4}E_{4}\right)+\frac{R^{2}}{36}+L_{anom}\right]~{},$ (5)

where $\Delta_{4}$ is the so-called Riegert operator [31, 32, 33] which is
conformally invariant for a scalar field with mass dimension zero,

$\Delta_{4}=\,\square^{2}+2R^{\mu\nu}\nabla_{\mu}\nabla_{\nu}-\frac{2}{3}R\,\square+\frac{1}{3}(\nabla^{\mu}R)\nabla_{\mu}$

and

$L_{anom}=\frac{E_{4}}{2(D-4)}~{}.$ (6)

The action $S$ can be modified by adding the surface or Weyl-invariant terms
such as $\,\square R$ or $W^{2}$. The appearance of the formally singular at
$D\to 4$ term in (5) is exactly the manifestation of the Weyl anomaly
444Notice that for the field with zero mass dimension the singularity in $D=4$
appears starting from Weyl-invariant extension of $\,\square^{3}$ operator
[34]. There is no way to construct a local operator in $D=4$ with Weyl
transformation properties of $L_{anom}$.

The infinitesimal Weyl transformation $\Omega=1+\omega,~{}\omega\ll 1$ of the
anomaly term is $\delta_{\omega}L_{anom}=\frac{1}{2}E_{4}\omega$. It is finite
and non-zero when $D\to 4$. Our main observation is that $E_{\omega}=\int
d^{4}x\sqrt{-g}E_{4}\omega$ can be rewritten as a surface integral in the
space with arbitrary metric if and only if

$\nabla_{\alpha}\nabla_{\beta}\,\omega=0~{},$ (7)

where $\nabla_{\alpha}$ is a covariant derivative. To see this, we consider
the variation of $E_{\omega}$ with respect to the metric, $g_{\mu\nu}\to
g_{\mu\nu}+h_{\mu\nu}$,

$\delta E_{\omega}=\int
d^{4}x\sqrt{-g}h_{\mu\nu}\Sigma^{\mu\nu\alpha\beta}\nabla_{\alpha}\nabla_{\beta}\,\omega.$
(8)

A tedious but straightforward computation gives

$\Sigma^{\mu\nu\alpha\beta}=2R(g^{\alpha\mu}g^{\beta\sigma}-g^{\alpha\beta}g^{\mu\nu})+4R^{\mu\nu}g^{\alpha\beta}+4g^{\mu\nu}R^{\alpha\beta}-8g^{\mu\beta}R^{\alpha\nu}-4R^{\mu\alpha\nu\beta}~{}.$
(9)

In a general metric, which would appear once gravity is switched on the
integral would be zero only if eq. (7) is satisfied.

The equation (7) can easily be solved in the flat space and the solutions
would correspond to the familiar conformal transformations,
$\omega=c(1+2a_{\mu}x^{\mu})$. This way one can see that in the flat space
conformal symmetry can be made anomaly-free.

Are there any solutions to the equation (7) on top of the generic
gravitational background? Taking the covariant derivative of (7) one obtains a
commutator
$[\nabla_{\gamma}\nabla_{\beta}]\nabla_{\alpha}\omega=R_{\beta\gamma\lambda\alpha}\nabla^{\lambda}\omega=0$.
Thus, all solutions of (7) must satisfy
$R_{\alpha\beta}\nabla^{\beta}\omega=0$. If the metric is not flat this
equation has only the trivial constant solution which corresponds to the
dilatations. Thus, we see that, among all possible Weyl transformations, only
the scale symmetry can be kept non-anomalous in the presence of gravity. This
conclusion holds even if one uses the renormalization procedure which
preserves the scale symmetry. In the flat space, the anomaly-free symmetry
group is larger and corresponds to the full conformal symmetry, however, the
special conformal transformations cannot be matched to some subgroup of Weyl
transformations.

A remark is now in order. There are two other finite subgroups of the Weyl
symmetry which were considered in the literature [35, 34, 36, 37]. A covariant
extension of the conformal transformations in curved space can be defined [35,
34] (see also [38]) via the Killing vector $\xi_{\mu}$ satisfying the equation

$\nabla_{\mu}\xi_{\nu}+\nabla_{\nu}\xi_{\mu}=\frac{2}{D}g_{\mu\nu}\nabla^{\alpha}\xi_{\alpha}~{}.$
(10)

The corresponding infinitesimal Weyl factor is given by
$\omega=\nabla_{\alpha}\xi^{\alpha}$. One can check that for this choice
$\nabla_{\alpha}\nabla_{\beta}\,\omega\neq 0$ for generic non-flat metric
[26], meaning that this symmetry is anomalous.

Another related possibility for the extension of the conformal symmetry named
restricted Weyl transformations was studied in [36, 37]. In these works, it
was shown that in $D=4$ the transformations satisfying $\Box\Omega=0$ form a
subgroup in the group of Weyl transformations. This symmetry is also
anomalous, only a subgroup of it with $\Omega=$const can survive at the
quantum level.

Scale-invariant action.—Here we present the first few operators in the
derivative expansion of the Lagrangian for the dilaton and gravity in $D=4$
scale symmetry. All the terms that could be written at the level of zero and
two derivatives are

$S=\int{d^{4}x\sqrt{-g}\left[-\frac{1}{2}\zeta\phi^{2}R+\frac{1}{2}(\partial_{\mu}\phi)^{2}-\frac{\lambda}{4}\phi^{4}\right]},$
(11)

where $\zeta$ and $\lambda$ are arbitrary constants (note that Weyl invariance
would impose a specific value for the non-minimal coupling $\zeta=-1/6$).

The general Lagrangian invariant under the scale transformations and
respecting parity at the level of four derivatives can be written as

$\begin{split}S=\int
d^{4}x\sqrt{-g}\left[AR\Box\tau+CR(\partial_{\mu}\tau)^{2})+BG^{\mu\nu}\partial_{\mu}\tau\partial_{\nu}\tau+C\tau
E_{4}+ER^{2}+FW_{\mu\nu\lambda\rho}^{2}+G((\partial_{\mu}\tau)^{2})^{2}\right.+\\\
\left.+H(\Box\tau)^{2}+J(\Box\tau+(\partial_{\mu}\tau)^{2})^{2}\right]~{}.\end{split}$
(12)

Here $A,B,C,E,F,G,H$ and $J$ are arbitrary constants, $G_{\mu\nu}$ is the
Einstein tensor, $\tau=\log({\phi/\mu})$ with $\mu$ being an arbitrary scale
555Nothing depends on this scale in perturbative computations as it disappears
after integrating by parts. This may not be the case for non-perturbative
effects associated with configurations with non-zero Euler characteristics
coming from the term containing $G$. The field $\tau$ transforms under the
dilatations as $\tau\rightarrow\tau-\omega$.

The second line of (12) contains only the operators which are allowed by the
conformal symmetry in the flat space limit. Given the fact that the conformal
symmetry is broken by gravity, the operators in the first line are expected to
be suppressed by the Planck scale. This could not be the case for the two
conformal operators since they have an enhanced symmetry in the flat space
limit.

The structure of the action given by (11,12) allows also to clarify the
situation with the energy-momentum tensor. It is well known [39] that in CFT
in flat space it is possible to define an (improved) stress-energy tensor
$T_{\mu\nu}$ with zero trace, $T_{\mu}^{\mu}=0$. If the theory were Weyl
invariant, this relation would remain in force in the gravitational
background. However, when the quantum corrections are incorporated in a Weyl-
invariant way in $D$-dimensions as in [25, 6], and the limit $D\to 4$ is
taken, $T_{\mu}^{\mu}$ receives several contributions containing Diff
invariants $W^{2},~{}E_{4},~{}R^{2}$ and $\,\square R$ [24]. One of them
($E_{4}$, the so-called a-anomaly) cannot be removed by the Weyl-invariant
counter-term, signalling that the Weyl symmetry is anomalous 666Note that the
term $W^{2}$ representing the so-called c-anomaly can be taken away by the
Weyl-invariant counter-term $\phi^{\epsilon}W^{2}/\epsilon$ [25].. The scale
symmetry in curved space does not impose that the trace of stress-energy
tensor is zero, only a weaker condition $\int
d^{4}x\sqrt{-g}T_{\mu}^{\mu}\omega=0$, where $\omega=$const must be satisfied.

Talking about phenomenology and cosmology, the graviton-dilaton action (11)
can be complemented by all the fields of the Standard Model or $\nu$MSM [40,
41] in an SWS invariant way, the explicit equations can be found in [18]. In
this work, only the scale-invariance was imposed. Our findings reveal that
scale invariance implies conformal invariance at the level of the lowest order
action in the flat space, however, when gravity is included, the symmetry of
the Higgs-dilaton action reduces back only to the subgroup of dilatations.
However, the higher-order operators which had conformal symmetry in the flat
space, are expected to be less suppressed than those which have only scale
symmetry. This hierarchy is a key observation that is relevant for
phenomenology since the cutoff scale in the scalar sector in the Higgs-dilaton
model is known to be much less than the Planck scale.

It has been shown that this Higgs-dilaton Lagrangian can solve all the
observational problems of the Standard Model (such as inflation, neutrino
masses, baryon asymmetry of the Universe, and Dark Matter), provided the scale
symmetry is spontaneously broken (for discussion of inflation see [20], and
for review of other problems [42]). It is of crucial importance that the non-
minimal couplings of the Higgs and dilaton fields to the Ricci scalar are not
constrained by any value ($-\frac{1}{6}$ for the Weyl symmetry). We note also
that the massless dilaton does not lead to the fifth force and thus is
harmless from the experimental point of view [43, 44, 18, 45].

Conclusions.—In this Letter, we found that the anomaly-free extension of the
conformal symmetry of flat space-time to curved space-time reduces to the
scale symmetry. If this symmetry is spontaneously broken, it is consistent
with all available experiments and observations and thus may play a role as
the global symmetry of Nature. All other subgroups of Weyl transformations
cannot be made non-anomalous even if the renormalization procedure is
preserving the Weyl symmetry.

Several important and very challenging problems need to be solved to complete
the effective field theory picture discussed in this Letter. One of them is
the reason for the existence of the flat direction along the dilaton field,
required for the very possibility of spontaneous breaking of scale symmetry.
This is related closely to the cosmological constant problem. Yet another
difficult task is building the connection between the low energy effective
theory with spontaneously broken scale symmetry with some theory at high
energy where the scale invariance is restored.

###### Acknowledgements.

We thank Georgios Karananas, Alexander Monin and Arkady Tseytlin for very
useful discussions and comments on the manuscript. We are indebted to Andrei
Mikhailov for pointing out an error in the first version of this paper,
leading to the revision of its part. A.T. thanks EPFL, where a part of this
work was done, for hospitality. This work was supported by ERC-AdG-2015 grant
694896 and by the Swiss National Science Foundation Excellence grant 200020B
182864. The work was also supported by the Academy of Finland grant 318319.
The part of the work of A. T. related to obtaining the conformal operators
with higher derivatives was supported by the Russian Science Foundation grant
19-12-00393.

## References

  * [1] Harry Bateman, Proceedings of the London Mathematical Society, s2-7 (1909) 70-89 doi:10.1112/plms/s2-7.1.70
  * [2] E. Cunningham, Proceedings of the London Mathematical Society, s2-8 (1910) 77-98 doi:10.1112/plms/s2-8.1.77
  * [3] D. J. Amit and E. Rabinovici, Nucl. Phys. B 257 (1985), 371-382 doi:10.1016/0550-3213(85)90351-7
  * [4] M. B. Einhorn, G. Goldberg and E. Rabinovici, Nucl. Phys. B 256 (1985), 499-508 doi:10.1016/0550-3213(85)90405-5
  * [5] E. Rabinovici, B. Saering and W. A. Bardeen, Phys. Rev. D 36 (1987), 562 doi:10.1103/PhysRevD.36.562
  * [6] M. Shaposhnikov and D. Zenhausern, Phys. Lett. B 671 (2009), 162-166 doi:10.1016/j.physletb.2008.11.041 [arXiv:0809.3406 [hep-th]].
  * [7] S. Weinberg,
  * [8] P. Schuster and N. Toro, Phys. Rev. D 91 (2015), 025023 doi:10.1103/PhysRevD.91.025023 [arXiv:1404.0675 [hep-th]].
  * [9] I. L. Buchbinder, V. A. Krykhtin and H. Takata, Phys. Lett. B 785 (2018), 315-319 doi:10.1016/j.physletb.2018.07.070 [arXiv:1806.01640 [hep-th]].
  * [10] G. Mack and I. Todorov, J. Math. Phys. 10 (1969), 2078-2085 doi:10.1063/1.1664804
  * [11] G. Mack and A. Salam, Annals Phys. 53 (1969), 174-202 doi:10.1016/0003-4916(69)90278-4
  * [12] C. Wetterich, Phys. Lett. B 140 (1984), 215-222 doi:10.1016/0370-2693(84)90923-7
  * [13] W. A. Bardeen, FERMILAB-CONF-95-391-T.
  * [14] M. Shaposhnikov and A. Shkerin, Phys. Lett. B 783 (2018), 253-262 doi:10.1016/j.physletb.2018.06.068 [arXiv:1803.08907 [hep-th]].
  * [15] M. Shaposhnikov and A. Shkerin, JHEP 10 (2018), 024 doi:10.1007/JHEP10(2018)024 [arXiv:1804.06376 [hep-th]].
  * [16] M. Shaposhnikov, A. Shkerin and S. Zell, Phys. Rev. D 103 (2021) no.3, 033006 doi:10.1103/PhysRevD.103.033006 [arXiv:2001.09088 [hep-th]].
  * [17] G. K. Karananas, V. Kazakov and M. Shaposhnikov, Phys. Lett. B 811 (2020), 135922 doi:10.1016/j.physletb.2020.135922 [arXiv:1908.04302 [hep-th]].
  * [18] M. Shaposhnikov and D. Zenhausern, Phys. Lett. B 671 (2009), 187-192 doi:10.1016/j.physletb.2008.11.054 [arXiv:0809.3395 [hep-th]].
  * [19] F. Gretsch and A. Monin, Phys. Rev. D 92 (2015) no.4, 045036 doi:10.1103/PhysRevD.92.045036 [arXiv:1308.3863 [hep-th]].
  * [20] J. Garcia-Bellido, J. Rubio, M. Shaposhnikov and D. Zenhausern, Phys. Rev. D 84 (2011), 123504 doi:10.1103/PhysRevD.84.123504 [arXiv:1107.2163 [hep-ph]].
  * [21] F. Bezrukov, G. K. Karananas, J. Rubio and M. Shaposhnikov, Phys. Rev. D 87 (2013) no.9, 096001 doi:10.1103/PhysRevD.87.096001 [arXiv:1212.4148 [hep-ph]].
  * [22] E. S. Fradkin and A. A. Tseytlin, Phys. Lett. B 134 (1984), 187 doi:10.1016/0370-2693(84)90668-3
  * [23] M. A. Luty, J. Polchinski and R. Rattazzi, JHEP 01 (2013), 152 doi:10.1007/JHEP01(2013)152 [arXiv:1204.5221 [hep-th]].
  * [24] M. J. Duff, Class. Quant. Grav. 11 (1994), 1387-1404 doi:10.1088/0264-9381/11/6/004 [arXiv:hep-th/9308075 [hep-th]].
  * [25] F. Englert, C. Truffin and R. Gastmans, Nucl. Phys. B 117 (1976), 407-432 doi:10.1016/0550-3213(76)90406-5
  * [26] Mikhail Shaposhnikov and Anna Tokareva, in preparation, (2022)
  * [27] Z. Komargodski and A. Schwimmer, JHEP 12 (2011), 099 doi:10.1007/JHEP12(2011)099 [arXiv:1107.3987 [hep-th]].
  * [28] F. Baume and B. Keren-Zur, JHEP 11 (2013), 102 doi:10.1007/JHEP11(2013)102 [arXiv:1307.0484 [hep-th]].
  * [29] H. Osborn and A. Stergiou, JHEP 04 (2015), 157 doi:10.1007/JHEP04(2015)157 [arXiv:1501.01308 [hep-th]].
  * [30] I. Antoniadis and E. Mottola, Phys. Rev. D 45 (1992), 2013-2025 doi:10.1103/PhysRevD.45.2013
  * [31] E. S. Fradkin and A. A. Tseytlin, Nucl. Phys. B 203 (1982), 157-178 doi:10.1016/0550-3213(82)90481-3
  * [32] S. Paneitz, MIT preprint, (1983)
  * [33] R. J. Riegert, Phys. Lett. B 134 (1984), 56-60 doi:10.1016/0370-2693(84)90983-3
  * [34] G. K. Karananas and A. Monin, Phys. Lett. B 757 (2016), 257-260 doi:10.1016/j.physletb.2016.04.001 [arXiv:1510.08042 [hep-th]].
  * [35] A. Iorio, L. O’Raifeartaigh, I. Sachs and C. Wiesendanger, Nucl. Phys. B 495 (1997), 433-450 doi:10.1016/S0550-3213(97)00190-9 [arXiv:hep-th/9607110 [hep-th]].
  * [36] A. Edery and Y. Nakayama, Phys. Rev. D 90 (2014), 043007 doi:10.1103/PhysRevD.90.043007 [arXiv:1406.0060 [hep-th]].
  * [37] A. Edery and Y. Nakayama, Mod. Phys. Lett. A 30 (2015) no.30, 1550152 doi:10.1142/S0217732315501527 [arXiv:1502.05932 [hep-th]].
  * [38] S. Rychkov, doi:10.1007/978-3-319-43626-5 [arXiv:1601.05000 [hep-th]].
  * [39] C. G. Callan, Jr., S. R. Coleman and R. Jackiw, Annals Phys. 59 (1970), 42-73 doi:10.1016/0003-4916(70)90394-5
  * [40] T. Asaka, S. Blanchet and M. Shaposhnikov, Phys. Lett. B 631 (2005), 151-156 doi:10.1016/j.physletb.2005.09.070 [arXiv:hep-ph/0503065 [hep-ph]].
  * [41] T. Asaka and M. Shaposhnikov, Phys. Lett. B 620 (2005), 17-26 doi:10.1016/j.physletb.2005.06.020 [arXiv:hep-ph/0505013 [hep-ph]].
  * [42] A. Boyarsky, O. Ruchayskiy and M. Shaposhnikov, Ann. Rev. Nucl. Part. Sci. 59 (2009), 191-214 doi:10.1146/annurev.nucl.010909.083654 [arXiv:0901.0011 [hep-ph]].
  * [43] C. Wetterich, Nucl. Phys. B 302 (1988), 668-696 doi:10.1016/0550-3213(88)90193-9 [arXiv:1711.03844 [hep-th]].
  * [44] C. Wetterich, Nucl. Phys. B 302 (1988), 645-667 doi:10.1016/0550-3213(88)90192-7
  * [45] P. G. Ferreira, C. T. Hill and G. G. Ross, Phys. Rev. D 95 (2017) no.6, 064038 doi:10.1103/PhysRevD.95.064038 [arXiv:1612.03157 [gr-qc]].