text:
Open access peer-reviewed chapter

# Direct Generation of Vortex Laser Beams and Their Non-Linear Wavelength Conversion

Written By

Andrew James Lee and Takashige Omatsu

Submitted: March 23rd, 2016 Reviewed: October 20th, 2016 Published: March 1st, 2017

DOI: 10.5772/66425

From the Edited Volume

## Vortex Dynamics and Optical Vortices

Chapter metrics overview

View Full Metrics

## Abstract

Vortex laser beams are a technology that has revolutionised applications in micro- and nano-manipulation, micro-fabrication and super-resolution microscopy, and is now heralding advances in quantum communication. In order to service these, and emergent applications, the ability to generate powerful vortex laser beams with user-controlled spatial and wavefront properties, and importantly wavelength, is required. In this chapter, we discuss methods of generating vortex laser beams using both external beam conversion methods, and directly from a laser resonator. We then examine the wavelength conversion of vortex laser beams through non-linear processes of stimulated Raman scattering (SRS), sum-frequency generation (SFG), second harmonic generation (SHG) and optical parametric oscillation. We reveal that under different types of non-linear wavelength conversion, the spatial and wavefront properties of the vortex modes change, and in some cases, the spatial profile also evolve under propagation. We present a theoretical model which explains these dynamics, through decomposition of the vortex mode into constituent Hermite-Gaussian modes of the laser resonator.

### Keywords

• vortex laser
• Lagurre-Gaussian modes
• optical non-linear conversion
• stimulated Raman scattering
• sum-frequency generation
• second harmonic generation
• optical parametric oscillation
• topological charge

## 1. Introduction

Vortex laser beams are characterised as having an annular spatial profile (with a central dark spot), and a wavefront which spirals along the direction of propagation of the beam (like a corkscrew). This is in contrast to a conventional Gaussian beam that has a plane wavefront [14]. The spatial, phase and wavefront properties of a Gaussian beam and vortex laser beams are shown in Figure 1.

The topological charge (denoted l) of a vortex beam is equal to the integer number of a 2π phase change of the wavefront on any closed path around the propagation axis. Equivalently, one round trip around the phase surface leads to the next (or prior) coil with a pitch of , where λ is the wavelength of the vortex beam [4]. Due to this spiral wavefront, vortex laser beams inherently carry orbital angular momentum (OAM), with each photon carrying orbital angular momentum of ℓħ (where ħ is the reduced Planck constant). The magnitude of a vortex beam topological charge also impacts the size of the central dark spot relative to the overall size of the annular beam, with higher topological charge resulting in a larger spot. The direction of the wavefront, spiralling clockwise or anti-clockwise along the axis of propagation also indicates the sign of the topological charge, with positive (+) topological charge having a wavefront which spirals clockwise, and a negative (−) topological charge having a wavefront spiralling anti-clockwise [4].

It is not surprising that these unique characteristics of vortex laser beams have resulted in their application in a diverse range of applications. Indeed, vortex beams have revolutionised applications ranging from optical tweezing, in which micro- to nano-scale objects can be trapped and manipulated [3, 5], to fabrication of chiral nano-structures [6, 7], through to quantum communication [8]. Perhaps one of the most significant application of optical vortex beams has been in super resolution microscopy based on stimulated emission depletion (STED), a microscopy technique which has gained recognition with the Nobel Prize in Chemistry (2014). In STED microscopy, the annular profile of a vortex laser beam is used to selectively deplete the outer region of a fluorescing particle being imaged. This effectively allows the resolution of fluorescence microscopy to exceed the diffraction limit [9, 10]. This host of applications therefore not only exploit the orbital angular momentum properties of the vortex beam, but also its annular spatial profile.

With the diversity of applications for vortex laser beams, comes the requirement for beams of the appropriate power and beam quality, topological charge, and importantly wavelength. As with ‘standard’ laser beams, there is continual drive to develop sources which can offer a diverse range of laser powers, beam quality and wavelengths. In this chapter, we detail methods of generating vortex laser beams, with a focus on methods of directly generating vortex beams from solid-state lasers (some of the most robust laser architectures currently available); and methods of wavelength-tuning vortex laser beams using non-linear optical processes. Here, we outline the dynamics of the processes by which these vortex beams can be manipulated, and the diversity of outputs that can be accessed.

## 2. Generation of vortex laser beams

There are a host of methods of generating vortex laser beams, however they can be broadly classified into two groups, those acting as convertors— taking a Gaussian beam laser beam and converting it into a vortex beam; and the direct generation methods whereby a vortex beam is produced directly from a laser resonator. The most commonly applied methods are those of the former group involving conversion of a Gaussian laser beam into a vortex beam.

### 2.1. Mode convertors

Conversion of a Gaussian laser beam into a vortex laser beam involves transformation of a plane wavefront into a spiral wavefront. This can be achieved using a number of methods including:

Phase plates: These are specially fabricated plates where the region through which the Gaussian beam propagates gradually increases in thickness (by stepping) in a spiral fashion. This transforms the plane wavefront of the Gaussian beam into a spiral wavefront by introducing a phase shift [11]. Through appropriate design of the phase plate, it is possible to use it to generate vortex laser beams with a desired topological charge.

Holograms/spatial light modulators (SLM): Much like phase plates, these elements act on the phase of the incident light to generate a spiral wavefront. Spatial light modulators also enable control over the order and sign of topological charge of the beam as they can be readily programmed [12, 13].

Cylindrical lens pairs: These act on higher-order Gaussian beams, typically Hermite-Gaussian beams. The cylindrical lens pair converts Hermite-Gaussian beams of a particular order, to their Laguerre-Gaussian counterparts [14]. As will be examined further in this chapter, Laguerre-Gaussian beams of the form LG 0 1 are vortex beams with topological charge l.

These methods are effective in converting Gaussian laser beams into vortex laser beams, however they are additional components which must be aligned precisely in addition to the actual laser source itself. Phase plates and SLMs, in particular, suffer from relatively low conversion efficiency, and can be easily damaged at high laser powers. This limits their capacity to generate vortex laser beams with high power and high quality.

The ability to also generate vortex laser beams of a desired wavelength using these conversion methods is predicated on the initial Gaussian laser beam undergoing conversion, already being of the desired wavelength. In the following section, we detail methods of directly generating vortex laser beams from all solid-state laser systems, and demonstrate that these systems are capable of producing very high-power beams with excellent beam quality, without the need for additional, bulky and easily damaged beam converting components.

### 2.2. Direct generation methods

Methods of generating vortex laser beam output directly from a laser cavity rely on suppression of the lowest order Gaussian mode (TEM00) and preferential oscillation of Lagurre-Gaussian modes of the form LG0ℓ. These Lagurre-Gaussian modes are vortex modes with topological charge (ℓ) [15, 16]. Suppression of the lowest order Gaussian mode can been achieved in a number of ways, including pumping the laser gain medium with an annular pump spot [17, 18], using intra-cavity defects [1923] and thermal lensing [24, 25].

In this chapter, we focus on the generation of vortex laser beams using two of these methods, using an intra-cavity defect spot and thermal lensing. Intra-cavity defect spots are an effective means of very simply suppressing oscillation of the lowest-order Gaussian mode, to promote oscillation of an LG01 mode, and generate vortex laser output from an end-pumped solid-state laser. In these systems, the intra-cavity field is very intense, and by making use of this, we can readily investigate non-linear conversion of vortex beams. The use of thermal lensing to produce a vortex laser beam is also investigated in the context of a side-pumped slab laser. As will be detailed, this configuration is a very effective way of directly generating very high-power vortex laser beams, something which cannot be readily achieved using extra-cavity conversion components owing to component damage.

#### 2.2.1. Intra-cavity defect spot

The use of an intra-cavity defect to suppress the lowest order oscillating mode (generally TEM00) within a laser cavity has been achieved using a number of different laser systems, including He-Ne lasers [20] and solid-state lasers [19, 2023]. The common feature of each of these systems is that an intra-cavity defect is used; such as engineered damage spots on resonator mirrors. Key to the effectiveness of this method is the ability for the defect to force oscillation of LG modes of the form LG0ℓ. The defect spot in effect breaks the symmetry of the laser resonator to enable oscillation of these LG modes. This requires accurate mode matching between the lowest order Gaussian mode (TEM00) and the defect spot. As reported in the literature, the defect spot to cavity mode ratio is generally within the range ~0.15–0.2 for solid-state lasers [1923]. The operating principle of this technique is shown schematically in Figure 2.

Here, we investigate generation of vortex laser emission from a continuous-wave, diode-end-pumped Nd:GdVO4 laser system. This system not only serves as an effective method for generating vortex laser emission, but also as a laser which can be used to investigate non-linear wavelength conversion of vortex beams via the stimulated Raman scattering (SRS), and second harmonic (SHG) and sum-frequency generation (SFG) processes. There have been rather few studies of intra-cavity non-linear conversion of vortex laser beams, and the underlying dynamics of the transfer of topological charge under these processes have been little studied. The details of these non-linear conversion processes are discussed later in this chapter.

The end-pumped laser system investigated was comprised of an a-cut Nd:GdVO4 crystal (0.3% Nd-doping), 4 × 4 × 20 mm3 with a front surface coated with a high-reflecting coating (R > 99.999% at 1064 nm/R< 0.5% at 880 nm) and an end-mirror with reflectivity R = 99.91% at 1064 nm and radius of curvature, 250 mm. Key here is that the end-mirror had an array of circular damage spots (3 × 3 array of spots with increasing diameter from 40–160 μm with a spacing of 400 μm) laser micro-machined (to the level of the glass substrate) onto its surface which acted as defect spots [21]. The laser cavity was end-pumped with a fibre coupled (100 μm diameter, 0.22 NA) laser diode producing up to 30 W at 879 nm. The experimental layout of the system is shown schematically in Figure 3, along with a schematic of the array of damage spots on the resonator mirror.

Alignment and optimisation of the laser system required accurate positioning of the end-mirror to ensure that the laser cavity mode was aligned with each defect spot. The operation of the system aligned on each defect spot was analysed, and it was found that complete suppression of the TEM00 mode, and oscillation of the LG01 mode could only be achieved with the 40 μm diameter defect spot. Given that the cavity mode had a diameter of ~260 μm, this corresponded to a cavity to defect ratio of 0.15, which was consistent with reports in the literature.

The threshold for oscillation of the LG01 mode from this system was achieved for an incident pump power of 0.1 W; maximum output power at 1064 nm was 0.4 W. The spatial profile of the laser emission was annular with a central dark spot, consistent with an LG01 mode. This spatial profile was retained across the pumping range. Beam quality factor (M 2) measurements of the output were made for incident pump powers of 0.1 W (just above laser threshold) and 2 W, and values of 2.2 and 3.1 were determined, respectively. An M 2 value of 2 is consistent with a vortex laser beam with topological charge of = 1 [19]. The higher M 2 value at higher incident pump power is indicative of the onset of higher-order modes oscillating within the laser cavity, which is a consequence of the high laser gain and high cavity Q-factor.

The wavefront properties of the laser output were examined using an interferometric technique [4]. This technique yields a set of straight fringes, within which the position and order of the vortex beam phase-singularity can be determined through break-down in fringe structure- manifesting in a fork-like pattern. Both linear and spiral fringe patterns may be produced; in the case of a spiral fringe pattern, a spherical wavefront is formed using a short focal length lens [4]. Determination of the sign of the topological charge of the vortex beam using these methods relies on knowledge of the projection of the wavefront in the reference arm relative to the direction of propagation (in the case of straight fringe patterns); or knowledge of the radius of curvature of the reference beam in the case of spiral fringe patterns.

The spatial profile, along with the fork and spiral interferometer patterns for the laser output is shown in Figure 4(a)(c) , respectively.

From Figure 4(a) it can be seen that an annular spatial profile is produced from this laser resonator, and from the interference patterns shown in Figure 4(b) and (c), it can be seen that a single fork/spiral is observed, which is indicative of a phase singularity with a topological charge of 1. As the laser output was power scaled, the order of the topological charge and direction of rotation did not change. It was possible to alter the direction of the wavefront by altering the laser alignment through slight adjustment of the output coupler angle.

This result demonstrates the relative ease with which a vortex laser beam with a well-defined topological charge may be directly generated from an end-pumped solid-state laser system. This is significant as it precludes the requirement for additional vortex beam-shaping/forming components. As will be discussed further in this chapter, this simple resonator design facilitates investigation of intra-cavity non-linear wavelength conversion of vortex laser beams with relatively high efficiency.

#### 2.2.2. Side pumped solid-state vortex laser

In a side-pumped laser resonator, the gain medium is pumped through a side facet as opposed to an end-face as described in the previous section. This has the effect of increasing the overall pump power that can be utilised in the system by distributing the thermal load throughout a larger area of the crystal [26]. In the side-pumped laser discussed in this section, the oscillating laser mode also undergoes reflection (total internal reflection) at the surface through which the pump radiation is delivered [24, 25]. In this configuration, oscillation of the vortex mode (LG01) over the TEM00 (Gaussian mode) is achieved due to the thermal lens induced within the crystal. As the laser power is increased, the induced thermal lens affects the Gaussian mode faster (due to mode overlap considerations) and it is forced to be unstable (effectively being suppressed), while the LG01 vortex mode is still supported within the resonator. Therefore, this system operates with vortex output for a window of input pump powers, that is, enough pump power to induce a thermal lens sufficient to drive the system unstable for the Gaussian mode, while ensuring oscillation of the vortex mode. This allows for significantly high power vortex modes to be generated from this system.

The laser system comprises a laser diode side-pumped a-cut Nd:GdVO4 slab (1% Nd-doping) with dimensions 2 × 5 × 20 mm3, around which a bounce resonator is formed. The yz faces of the slab were wedged and anti-reflection coated for 1063 nm to prevent self-lasing [26]. The laser mode oscillates between two flat mirrors, denoted E.M (high reflecting at 1063 nm) and O.C. (coated R = 40% at 1063 nm). To maintain good spatial overlap between the resonator mode and the pumped volume, two cylindrical lenses were used intra-cavity, denoted CL1,2 both with focal length f = 50 mm. The slab is side pumped by a laser diode bar array producing 55 W into an elliptical pump spot generated with a cylindrical lens (f = 12.7 mm). The system layout is shown in Figure 5.

The threshold for lasing action was ~10 W incident pump power. Above this threshold, the laser oscillates with a Gaussian-like output profile. As the incident pump power is increased, oscillation of an LG01 mode dominates and the TEM00 mode is suppressed. The power transfer curve for this system is shown in Figure 6. Spatial profiles of the output laser mode are shown in Figure 7(a)(c) for a range of incident pump powers.

From this system, a vortex beam with 17.8 W of power at 1064 nm is generated for 55 W incident diode pump power. Figure 7(d) shows the spiral interference pattern of the vortex beam generated at an incident pump power of 55 W.

It was observed that the topological charge of the vortex beam did not change as the system was power scaled, maintaining a value of l = 1.

This work demonstrates that very high-power vortex laser beams can be generated directly from a laser system without the need for additional beam shaping components. By exploiting thermal lensing (a property often considered a problem in laser systems), vortex beams with very high output power can be generated directly from a solid-state laser.

## 3. Non-linear wavelength conversion of vortex laser beams

Non-linear wavelength conversion of laser beams is an efficient and effective method of altering the wavelength of laser beams, and these methods have been employed extensively in the case of Gaussian beams [27, 28]. Non-linear wavelength conversion within a non-linear crystal can generally be achieved through reaching a threshold power/intensity, in the case of χ(3) processes; or phase matching in the case of χ(2) processes. As will be discussed in this section, in these non-linear conversion processes, the conservation of energy and momentum offers a unique, interesting and powerful method of controlling not only the wavelength of the vortex beam, but also to control/manipulate the topological charge and resultant spatial profile of the beam.

In this section, we cover non-linear wavelength conversion of vortex laser beams under the processes of stimulated Raman scattering (SRS); sum-frequency and second-harmonic generation (SFG, SHG); optical-parametric oscillation (OPO), and difference-frequency generation (DFG). Through this analysis, we investigate the dynamics of vortex laser beams and how each of these non-linear optical processes, in conjunction with cavity design, allows us to achieve selective control of the topological charge of the vortex beam.

### 3.1. Stimulated Raman scattering (SRS)

SRS is a third-order non-linear process χ(3) which can be used to convert the wavelength of a laser beam through the Raman scattering process [2931]. It can be performed both for intra-cavity and extra-cavity configurations, and is most commonly achieved with the use of crystalline Raman-active media. In the SRS process, a fundamental laser field excites a Raman-active resonant mode (phonon) of the crystalline material. This leads to a coupling of energy and as a result, a photon with energy difference between the incident photon and the resonant mode is scattered; this is referred to as the Stokes field. In the case of stimulated Raman scattering, a resonant cavity is used to oscillate the Stokes field. In this process, the scattered Stokes photons stimulate the generation of more Stokes photons at the same wavelength/frequency, akin to stimulated gain within a laser medium [26]. This leads to rapid build-up of the Stokes photons from noise, with a well-defined intensity threshold for the process. The wavelength-shifts which can be achieved are therefore dependant on the Raman-active modes which exist within a material. There are a plethora of Raman-active crystalline materials which have been demonstrated effective at wavelength shifting via SRS; some of most commonly applied crystals (and their primary Raman shift) include: GdVO4 (885 cm−1), YVO4 (892 cm−1), KGdWO4 (768 and 901 cm−1) and BaWO4 (926 cm−1) [31].

In the case of conventional laser fields with Gaussian spatial distributions, SRS is a well-studied process both for intra-cavity and extra-cavity configurations. However, relatively few investigations of SRS conversion of vortex laser beams have been undertaken. In this section, we investigate the generation of vortex laser beams within the context of end-pumped solid-state lasers, as a continuation of work presented in the previous section on direct-generation of vortex laser beams using defect spots on end-mirrors.

The SRS process requires the generation of very intense fields to achieve threshold [31]. Therefore, in the case of Gaussian fields, the SRS process is often restricted to the very centre of the oscillating Gaussian mode, where the intensity of the beam is highest. This generally leads to the generation of Stokes beams which are of higher beam quality, owing to the Raman-beam-clean-up effect [32]. This is an important consideration as the spatial profile of the ‘fundamental’ beam has a direct impact on the resultant Stokes beam. In the case where a non-Gaussian field, for example, a vortex field, oscillates within the laser cavity, achieving SRS threshold is more difficult due to the annular spatial profile of the oscillating mode.

We examine here, wavelength-shifting of a fundamental field at 1063–1173 nm via intra-cavity SRS within a self-Raman Nd:GdVO4 laser crystal. The experimental setup is identical to that shown in Figure 3; however, key here is that the mirrors M1 and M2 are coated to oscillate both the fundamental and Stokes fields, M1 with R > 99.999% at 1064 and 1173 nm, and M2 with R = 99.91% at 1064 nm and R = 99.4% at 1173 nm. The same array of damage spots were used as detailed previously [21].

The threshold for oscillation of the vortex Stokes field at 1176 nm was ~ 2 W absorbed diode pump power, and a maximum Stokes power of 380 mW was generated from this laser for an absorbed pump power of 6.8 W. It was found that the Stokes beam retained an annular profile throughout the input pump power range. The spatial profile of the Stokes beam along with both linear and spiral interference patterns are shown in Figure 8(a)(c), respectively.

The annular spatial profile of the Stokes beam is a result of the SRS gain profile being dictated by that of the fundamental field mode. As the fundamental field is an LG01 mode, the SRS gain profile will also be annular in profile. Furthermore, the Stokes field is also affected by the damage spot laser machined onto the output mirror (M2). These two factors ensure that the Stokes field will retain an annular profile similar to that of the fundamental field.

The magnitude and sign of topological charge was always found to be the same for both the Stokes and fundamental fields. Here, it is interesting to consider what also happens to the phonon field which is also excited in the SRS process. Due to conservation of momentum rules, it is also possible for this field to receive topological charge from the fundamental field. To investigate this, we can consider conservation of orbital angular momentum under the process of SRS.

Let us denote the topological charge of the exciting fields as l F , l S and l R for the fundamental, Stokes and material, respectively; and l F ' , l S ' , l R ' as the stimulated fields for the fundamental, Stokes and material, respectively. In a stimulated scattering event, the stimulated field must take on the same energy state as the stimulating field, so in this case, l S = l S . Then in the stimulated scattering process, lF+lS+lR=2lS'+lR'

.

We have observed that l F = l S and so, there is no change in the topological charge state of the medium, that is, l R = l R ' , that is, the material phonon does not receive orbital angular momentum in the SRS process. It is interesting to note that while transfer of topological charge from photons to phonons was not observed in this work under the process of SRS, it has been reported in the literature through non-linear Brillouin interactions [33].

This work demonstrates how readily the wavelength of a vortex laser beam can be converted using the SRS process; in this case, a fundamental wavelength at 1063 nm is converted to 1173 nm in GdVO4. Given the broad range of Raman-active crystalline materials that are available, the ability to generate new vortex laser wavelengths through the SRS process with the retainment of topological charge state is very powerful.

### 3.2. Sum-frequency generation and second harmonic generation

Sum-frequency generation and second harmonic generation (an example of sum-frequency generation where two photons of the same frequency are combined) are effective non-linear methods of decreasing the wavelength of laser fields [28]. It is most commonly used to convert wavelengths in the near-infrared to the visible region. For example, SHG of 1064 nm (Nd:YAG emission) is commonly used to generate green emission (532 nm). This is the non-linear process employed in the now ubiquitous green laser pointer.

SFG is a phase-matched, non-linear process and requires the conservation of both momentum and energy. As already discussed in the context of SRS, it is this conservation of momentum which imparts special relevance to vortex laser fields in that orbital angular momentum (OAM) must be conserved. In the case where two vortex beams with topological charge l ω1 and l ω2 are transformed under SFG, the resultant field must have topological charge which is the sum of the two initial fields, i.e. $l ω 1 + ω 2 = l ω 1 + l ω 2$ .

Through this process, we have a powerful means of manipulating both the wavelength and the topological charge of the vortex laser beam. The process of second harmonic generation of vortex beams has been studied comprehensively in the context of extra-cavity conversion [34, 35], however, this process in an intra-cavity configuration is less well understood. In this work, we investigate this process in the context of an intra-cavity, end-pumped Raman laser, as detailed in the above section for SRS. In this case, the SFG/SHG crystal is incorporated into the laser cavity, and the process of SFG or SHG is achieved through appropriate phase matching. The resonator layout is shown in Figure 9.

The non-linear crystal used for SFG/SHG is a lithium triborate (LBO) crystal, cut for non-critical phase matching (NCPM), with dimensions, 4 × 4 × 10 mm3. The LBO crystal was placed in a copper mount which could be temperature-controlled, to enable selective phase matching via temperature tuning. With the laser generating a fundamental wavelength of 1063 nm and a Stokes wavelength of 1173 nm, phase matching for SHG of the 1173 nm wavelength to 586 nm is achieved with the LBO crystal set to a temperature of 43.5°C, and SFG of the 1063 nm and 1173 nm fields is achieved at 93°C to generate output at 559 nm.

With this system, a maximum power of 727 mW at 586 nm, and 850 mW at 559 nm was achieved [22, 23]. The spatial profile of the SHG and SFG fields were similar to the annular profiles that were produced in the near-field, however these evolved to a spot with a central bright core in the far-field. The spatial profiles of the 586 nm and 559 nm fields in the near- and far-field are shown in Figure 10.

The beam quality-factor of the resultant beams were also measured. In the case of the near-field profiles, beam quality factors of M 2 ~ 3–3.6 were determined in both cases. A beam quality factor of M 2 = 3 is consistent with a vortex beam having topological charge l = 2.

The wavefront properties of the SFG and SHG beams were also analysed using the interferometric setup already described. Observations of the topological charge of the resultant SFG and SHG fields were consistent with conservation of orbital angular momentum, where the topological charge of the resultant field was always the sum of the topological charge of the initial fields, that is, l SFG = l ω1 + l ω2, wherein the degenerate case of SHG, l 2ω = 2l ω. A comparison of the linear and spiral interference patterns of the Stokes (1173 nm) field and its SHG (586 nm) are shown in Figure 11.

The interference patterns clearly show that the Stokes field has a topological charge of l = 1, and the SHG field has a topological charge of l = 2 (three-pronged fork and two spirals). This shows that doubling of the topological charge takes place under SHG, further supporting the near-field spatial profile with a large central dark region as shown in Figure 10(a).

In the case of SFG of the 1063 nm and 1173 nm fields, two different interference patterns were observed, one consistent with the generation of an SFG vortex field with topological charge l = 2, and the other consistent with an SFG field with topological charge of l = 0. It should be noted that in both cases, the same annular, near-field profile is generated. The linear interference patterns showing these two conditions are shown in Figure 12.

The two different topological charge states of the SFG field results from two different topological charge states of the 1063 nm and 1173 nm fields. In the case where the SFG field has a topological charge l = 2, both the 1063 nm and 1173 nm fields have topological charge l = 1. In the case where the SFG field has a topological charge of l = 0, the 1063 nm and 1173 nm fields have opposite sign of topological charge, that is, l = +1 and l = −1 or vice-versa. It is interesting to note that in this resonator configuration, where an LBO crystal is incorporated cf. that where only SRS takes place, it is possible to achieve a situation in which the 1063 nm and 1173 nm fields have opposite topological charge. The ability of the Stokes field to take on opposite topological charge to that of the fundamental field is likely due to the additional non-linear process of SFG competing with the SRS process in depleting the fundamental field. This generates instability within the system which affects mode symmetry, and enables oscillation of opposite topological charge.

What is significant in these results is that an SFG field can be generated with topological charge 0 and yet retain an annular spatial profile in the near-field. By definition, a vortex beam with zero topological charge should have a non-zero central core. Also of significance is that the spatial profile of the SHG and SFG fields is annular in the near-field, and develop a central bright spot in the far-field. This very interesting beam dynamics can be understood through a decomposition of the oscillating LG01 modes at 1063 nm and 1173 nm into their constituent Hermite-Gaussian (HG) modes, and examining how these modes evolve under the process of SFG/SHG and under free-space propagation. This process has been computationally modelled for comparison with experimental results.

In this model we first assume that the LG resonator modes for the fundamental and Stokes fields comprise Hermite-Gaussian (HG) modes, HG1,0 and HG0,1 where,

H G 1,0 = x e ( x 2 + y 2 ) E1
H G 0,1 = y e ( x 2 + y 2 ) E2

The expressions for the Lagurre-Gaussian vortex beams of the fundamental field with frequency (ω 1) and the Stokes field with frequency (ω 2) are given by:

L G 1 ω 1 = x e ( x 2 + y 2 ) + i y e ( x 2 + y 2 ) e i Δ 1 E3
L G ± 1 ω 2 = x e ( x 2 + y 2 ) ± i y e ( x 2 + y 2 ) e i Δ 2 E4

where Δ1 and Δ2 are small phase mismatch terms which can manifest within the resonator [21]. In the expression for the Stokes field, ±1 denotes that the Stokes field can take a topological charge value of +1 or −1.

Now in the case of second harmonic generation, let us simply consider the case of SHG of ω 1. Here, the field strength of the SHG field is given by:

E SHG =L G 1 ω 1 L G 1 ω 1 =( x 2 y 2 e 2i Δ 1 ) e 2( x 2 + y 2 ) +2ixy e i Δ 1 e 2( x 2 + y 2 ) = H G 2,0 H G 0,2 e 2i Δ 1 + 1 2 (1 e 2i Δ 1 )H G 0,0 +2i e i Δ 1 H G 1,1 E5

where H G 2,0 = ( x 2 1 2 ) e 2 ( x 2 + y 2 ) , H G 0,2 = ( y 2 1 2 ) e 2 ( x 2 + y 2 ) , H G 1,1 = x . y . e 2 ( x 2 + y 2 )

Note that in the above equation, the Gaussian term, in the form HG0,0 manifests. This term does not have a central dark core in its spatial profile. Under propagation along an axis z, the contribution of Gouy phase on the modes as they propagate must also be considered. For HG modes, the Gouy phase term is represented as:

δ m,n = ( m + n + 1 ) tan 1 z z R E6

where m and n are the indices of the HG mode with the form HGm,n, z is the propagation distance, and z R is the Rayleigh length. For the HG modes under consideration here,

δ ( z ) = δ 2,0 δ 0,0 = δ 0,2 δ 0,0 = δ 1,1 δ 0,0 = 2tan 1 z z R

The intensity of the SHG field is given by,

I SHG ( z )= | E SHG | 2
I S H G ( z ) = | H G 2 , 0 | 2 + | H G 0 , 2 | 2 + 4 | H G 1 , 1 | 2 + Δ 1 2 | H G 0 , 0 | 2 2 ( 1 2 Δ 1 2 ) H G 2 , 0 H G 0 , 2 + 2 Δ 1 2 cos ( Δ δ ) ( H G 2 , 0 + H G 0 , 2 ) H G 0 , 0 E7

where for small sin Δ 1 0 , cos Δ 1 1 , sin 2 Δ 1 Δ 1 2

δ ( z ) = δ 2,0 δ 0,0 = δ 0,2 δ 0,0 = δ 1,1 δ 0,0 = 2tan 1 z z R

From Eq. (7) we can see that Gouy phase impacts the spatial intensity profile of the SFG field in the far-field as its finite value (as Z increases) means that there is contribution to the overall spatial profile by the HG 0,0 mode. Following this derivation, we can also form expressions for the SFG field under conditions where the fundamental ω 1 and Stokes ω 2 fields have the same and opposite topological charge. The expressions for the intensity of the SFG fields in each case are given by:

I S F G l = 2 ( z ) = | H G 2 , 0 | 2 + | H G 0 , 2 | 2 + ( Δ 1 + Δ 2 ) 2 | H G 0 , 0 | 2 + 4 | H G 1 , 1 | 2 2 H G 2 , 0 H G 0 , 2 + ( Δ 1 + Δ 2 ) 2 2 c o s δ ( H G 2 , 0 + H G 0 , 2 ) H G 0 , 0 E8
I S F G l = 0 ( z ) = | H G 2,0 | 2 + | H G 0,2 | 2 + | H G 0,0 | 2 ( Δ 1 + Δ 2 ) 2 | H G 1, 1 | 2 + 2 H G 2,0 H G 0,2 + 2cos δ ( H G 2,0 + H G 0,2 ) H G 0,0 E9

The spatial profile for the SHG field and the SFG field under the two different conditions where the fundamental and Stokes fields have the same, and opposite topological charge have been simulated, and are shown in Figure 13.

The simulated spatial intensity profiles of the SHG and SFG beams in the near- and far-fields very well replicate the spatial profiles observed experimentally in Figure 10. The interference patterns of the SFG fields under the conditions where the fundamental and Stokes have the same topological charge, and the opposite topological charge were simulated, and these are shown in Figure 14(a) and (b), respectively.

The simulated interference patterns clearly replicate the experimental results and show that while the SFG field can have an annular spatial intensity profile in the near-field, it is also possible that the beam does not have a finite topological charge, and exhibits a topological charge l = 0 (in this case, occurring where fundamental and Stokes beams have opposite topological charge).

This study of vortex beam dynamics under SHG and SFG within a laser cavity has yielded interesting results. Under the process of SHG or SFG, the wavelength of the vortex beam is converted as expected. The spatial intensity profile in the near-field is that of a vortex beam with a central dark spot with a size consistent with a vortex beam with the magnitude of topological charge equal to the sum of the magnitude of topological charge of the initial fields. What was unexpected was the evolution of the spatial intensity profile of the SHG/SFG vortex field as it propagates out of the laser cavity. While in the near-field, a perfect annular spatial intensity profile is produced, as it propagates into the far-field, the profile evolves to resemble that of an annular beam with a central bright spot. Through decomposition of the vortex modes constituting the fundamental and Stokes modes, into HG modes, it is revealed that upon propagation out of the laser resonator, the contribution of Gouy phase shift must also be considered. This Gouy phase directly impacts the spatial profile of the vortex beam in the far field, resulting in the presence of a non-zero central region.

The variation in the spatial profile of the vortex beam in the near- and far-fields is interesting as this adds to the flexibility and range of applications for this type of laser beam. In one instance, the annular profile in the near-field may be re-imaged for applications where a central null is required, however in other applications, the far-field profile can be utilised where a Gaussian-like beam is required. Furthermore, it has been demonstrated that under SFG, it is possible to produce an annular beam without a net topological charge. This may also be of use in certain applications where an annular spatial profile is desired, but orbital angular momentum is not.

### 3.3. Optical parametric oscillation

OPO is an effective means of significantly increasing the wavelength of a laser beam. Using OPOs, laser beam wavelengths can be extended from the visible out to the infra-red [28, 36, 37]. The efficiency with which this can take place is dependent on the effective non-linearity of the non-linear crystal being used for conversion, and its transparency in the wavelength range being generated. In this non-linear process, an initial laser field, designated the ‘pump’ is split into two laser fields of lower energy (longer wavelength). The field with the longer wavelength is designated the ‘idler’, while that of the shorter wavelength, the ‘signal’. The sum of the frequency of the signal and idler equal that of the pump, that is, ω I + ω S = ω P .

The dynamics of vortex laser beam transformation under optical parametric oscillation has been studied in the context of continuous-wave OPOs [38, 39]; however in these studies, the wavelength tuning diversity and power scaling properties of vortex beams produced in this non-linear process has not been examined. In this section, we examine the process of topological charge transfer and wavelength extension of vortex laser beams via the OPO process, with pump beams initially at wavelengths of 1064 and 532 nm. Conventional solid-state lasers producing nanosecond pulsed radiation at these wavelengths are used, along with spiral phase plates (see Section 2.1) to transform these Gaussian laser beams into vortex laser beams with topological charge l = 1. This vortex beam (pump field) is then injected into an optical parametric oscillator and converted to the signal and idler fields. By altering the resonator geometry and the crystal used for the OPO process, the dynamics by which the pump vortex beam is transformed, to generate signal and idler fields with different topological charge can be controlled. By tuning the phase matching conditions within the OPO, significant wavelength tuning of the generated signal and idler fields can be achieved.

Four different OPO setups are discussed here. The general OPO system layout is depicted in Figure 15, and the properties of each element used in the four configurations are summarised in Table 1.

Setup A (plane-plane OPO using KTP) B (concave-concave OPO using KTP) C (concave-plane OPO using cascaded KTP) D (plane-concave OPO using cascaded LBO)
Pump laser 1064 nm, 45 ns, 50 Hz 1064 nm, 25 ns, 50 Hz 1064 nm, 25 ns, 50 Hz 532 nm, 25 ns, 50 Hz
Spiral phase plate Designed to produce  = 1 vortex at 1064 nm Designed to produce  = 1 vortex at 1064 nm Designed to produce  = 1 vortex at 1064 nm Designed to produce  = 1 vortex at 532 nm
Focusing lens/spot diameter on OPO crystal f = 700 mm lens Focal spot = 520 µm diameter Focal spot = 450 µm diameter Focal spot = 750 µm diameter
Input mirror Flat, R = 98% at 2 µm; T = 90% at 1 µm Radius of curvature (ROC) = 2000 mm, R = 98% at 2 µm; T = 90% at 1 µm Radius of curvature (ROC) = 2000 mm, R = 98% at 2 µm; HT at 1 µm Flat, HR at 980 nm, HT at 532 nm
OPO crystal KTP, 5 × 5 × 30 mm3, θ = 51.4° KTP, 5 × 5 × 30 mm3, θ = 51.4° Two cascaded KTP crystals, 12 × 9 × 27 mm3, θ = 53° Two cascaded LBO crystals, 30 × 33 mm3, θ = 90, ϕ = 0
Output mirror Flat, R = 80% at 2 µm; HT at 1 µm ROC = 100 mm, R = 80% at 2 µm; T = 80% at 1 µm Flat, R = 50% at 2 µm; HT at 1 µm Flat folding mirror with HR at < 980 nm and HT at > 1180 nm; combined with either: concave mirror, R = 80% at 980 nm (resonate signal) OR concave mirror, R = 60% at 1180 nm (resonate idler)

### Table 1.

Details of each resonator element used in the different OPO configurations examined in Refs. [4043].

For each of the resonator configurations listed in Table 1, the topological charge transfer process from the pump to the signal and idler fields is different, and this is detailed in the following sections.

#### 3.3.1. Plane-plane OPO resonator using KTP (Setup A)

In this system, a KTP crystal is used to phase match for degenerate OPO operation, in which the wavelength of the signal and idler fields are the same. The incident pump field is a vortex laser beam with topological charge l = 1 at a wavelength of 1064 nm, and the resultant signal and idler fields have the same wavelength of 2128 nm. In this system, the topological charge of the pump beam was observed to evenly split between the signal and idler fields, in this case, they both receive a topological charge of l = 1 2 . Spatial profiles of the pump, signal and idler fields are shown in Figure 16.

It can be clearly seen that the spatial profile of the signal beam (Figure 16(b)) resembles a half-crescent shape, while that of the idler (Figure 16(c)) appears somewhat Gaussian. The topological charge state of the signal and idler fields is determined through frequency doubling of the fields. Here, the spatial profiles of the frequency-doubled signal and idler are shown in Figure 17(a) and (b), respectively; and their corresponding interference patterns in Figure 17(c) and (d), respectively.

The spatial profile and interference pattern (Figure 17(a) and (c)) of the frequency-doubled signal beam resembles that of a vortex beam with a topological charge of 1,confirming that the signal field has a topological charge of ½, knowing that the topological charge of the frequency-doubled field is double that of the original field (see Section 3.2). The spatial profile of the frequency-doubled idler shows an offset null region (Figure 17(b)); this offset is due to the effect of beam-walk-off for the polarisation of the idler beam (o-wave) in this OPO phase matching geometry. From the interference pattern (Figure 17(d)), it is clear that this beam also shows a topological charge of 1, also showing that the idler field also has a topological charge of ½. In this system, isotropic sharing of the topological charge of the incident pump field between the signal and idler takes place.

#### 3.3.2. Concave-concave OPO resonator using KTP (Setup B)

In this system, in contrast to the plane-plane resonator, the resonator mirrors are both concave. The same KTP crystal was used to phase match the OPO process. In this system, wavelength tuning of the signal and idler fields was also investigated by changing the phase matching conditions.

It was found that the signal field could be tuned through a wavelength range of 1953–2158 nm [41]. Interestingly, in this system, isotropic topological charge sharing from the pump to signal and idler fields was not observed. Instead, anisotropic charge transfer occurred between the pump and signal fields. In this case, the signal field always received the topological charge of the pump field, whilst the idler field remained Gaussian with topological charge = 0. Images of the spatial profile of the pump, signal and idler fields are shown in Figure 18(a)(c), respectively. The topological charge state of the signal and idler beams was directly determined (not frequency-doubled as detailed in Section 3.3.1) through the use of a self-referencing interference technique [41]. In this technique, a set of two fork-like patterns are generated instead of one as generated through the Mach-Zehnder interferometer detailed previously. The intereference patterns for the signal and idler fields are shown in Figure 18(d) and (e), respectively. The fork pattern seen in Figure 18(d) shows that the signal field has a topological charge = 1, the same as the input pump beam, and the absence of any fork pattern in Figure 18(e) shows that the idler field has a topological charge = 0.

The anisotropic topological charge transfer which occurs in this system can be understood through examination of how the signal and idler beams are produced within the OPO resonator. In contrast to the plane-plane resonator, the plane-concave resonator has a finite Rayleigh range of Z R = 50mm. Due to this property, the effect of Gouy phase on the signal and idler fields must be considered, similar to that already discussed in the context of intra-cavity SFG/SHG. It is also important to realise that the pump and signal fields have the same polarisation (both e-waves), while the idler has an orthogonal polarisation (o-wave) due to the OPO phase matching condition used in the KTP crystal (type-II phase matching). Due to the finite Rayleigh length, there exists a phase shift between a Gaussian mode and the = 1 vortex mode of ~1.2 rad. This effectively means that the overlap between a Gaussian mode and the vortex mode is reduced. Furthermore, the idler field also exhibits beam walk-off in the KTP crystal due to its polarisation state. The net effect of this walk-off is that the overlap between the idler mode and the vortex pump mode is impacted, significantly reducing the possibility of the idler mode taking on the profile of the vortex pump field. It is these two factors, Gouy phase shift and beam walk-off, within this OPO resonator configuration, which enforces topological charge transfer from the pump field to the signal field, while the idler field remains Gaussian.

With this concave-concave resonator design, the use of two KTP crystals simultaneously in a cascaded configuration was also investigated (Setup C) [42]. This enabled the wavelength tuning of both the signal and idler waves, and compensation of walk-off of the idler beam. Using this configuration, wavelength tuning of the signal beam across the range 1820 - 1954 nm and tuning of the idler beam across the range 2561–2335 nm could be achieved.

#### 3.3.3. Plane-concave resonator using LBO (Setup D)

In this system a plano-concave OPO resonator was used, however, the KTP crystal was replaced for lithium niobate (LBO) cut for non-critical (type I) phase matching. In this phase matching scheme, an e-wave is converted into two o-waves e → o + o. In this setup, two cascaded LBO crystals were used to enable wavelength tuning of both the signal and idler fields. Also, in this system, the pump field was generated at 532 nm instead of 1064 nm as used in the previous setups.

Initially, this system was setup to resonate both the signal and idler fields in a doubly resonant configuration. Due to a lack of walk-off of the signal or idler fields (due to the LBO crystal and phase matching geometry), no preferential topological charge transfer was observed from the pump to either of these fields. As a result, the signal and idler fields were both observed to exit the OPO resonator with mode structure which is an incoherent superposition of both Gaussian and vortex mode profiles. To achieve preferential topological charge transfer from the pump field to either the signal or the idler field, it was necessary to resonate only one of these fields. In the case where only the signal field was oscillated, the topological charge of the pump was transferred to the signal, and similarly if only the idler field was resonated, the topological charge of the pump was transferred to the idler field. Hence, anisotropic topological charge transfer from the pump to the signal or idler fields could be selectively achieved. Wavelength tuning of the signal could be achieved across a range 850–990 nm, and that of the idler from 1130–1300 nm [43].

### 3.4. Difference-frequency generation of vortex beams

In addition to wavelength extension of vortex beams using an OPO, further wavelength extension of these vortex beams was explored by using DFG of the generated signal and idler fields. In this work, the signal and idler output from the plano-concave resonator incorporating cascaded KTP crystals (Setup C) was focussed into a zinc germanium phosphide (ZGP) crystal for DFG conversion under Type-I phase matching. It was found that through tuning of the signal and idler wavelengths, the resultant DFG field could be wavelength tuned through a range 6.3–12 μm, significantly extending the wavelength reach of vortex laser beams into the mid/far infra-red [42].

In this configuration, it was also found that conservation of topological charge was maintained in this process. In the DFG process, the conservation law of topological charge follows the relationship:

l DFG = ω S ω I | ω S ω I | ( l S l I ) E10

where ω S and ω I are the frequencies of the signal and idler fields, respectively, and l DFG, l S , and l I are the topological charge of the DFG, signal and idler fields, respectively. From Eq. (10), it can be seen that the sign of the topological charge of the DFG field is dependent on the frequencies of the signal and idler fields. When the frequency of the signal is greater than that of the idler, a positive topological charge is produced, and when the frequency of the idler is greater than the signal, a negative topological charge is generated. Therefore, by swapping the frequency of the signal and idler fields, it is possible to swap the sign of the topological charge of the resultant DFG field, thereby imparting an additional method of controlling the topological charge state of the generated vortex field.

From these studies, it is clear that OPOs offer an effective method of significantly extending the wavelength diversity of vortex laser beams. Interestingly, the dynamics by which the beams are converted can be readily controlled through careful consideration of the OPO resonator design and the crystals which are used in the OPO process. Here, not only can control of the wavelength of the vortex beam be achieved, but also, the transfer of topological charge of the pump beam to the signal and idler beams can be manipulated. Significantly, the generation of a vortex laser beam with l = 1 2 can be achieved through this non-linear conversion process. In contrast to conventional vortex laser beams with an annular spatial profile, this crescent spatial profile lends itself to numerous new applications including fabrication of novel devices such as meta-materials.

## 4. Summary

In this chapter, we have presented results detailing both the direct generation of vortex laser beams from solid-state laser systems, and their wavelength conversion via non-linear optical methods. The results show the great diversity of vortex outputs that can be generated, both in terms of spatial profile, topological charge and wavelength. It is through this continual examination of the dynamics of vortex laser beams, that the characteristics of these beams can be manipulated, and thus expanding the range of applications to which they can be applied.

## Acknowledgments

The authors would like to acknowledge Prof. Helen Pask (Macquarie University) for her contributions to the work presented in this chapter.

## References

1. 1. Allen A, Barnett SM, Padgett M. Optical Angular Momentum. Bristol, UK: Institute of Physics; 2003.
2. 2. Franke-Arnold S, Allen L, Padgett M. Advances in optical angular momentum. Las. Photon. Rev. 2008;2:299–313.
3. 3. Grier DG. A revolution in optical manipulation. Nature. 2003;424:810–816.
4. 4. Basistiy IV, Soskin MS, Vasnetsov MV. Optical wavefront dislocations and their properties. Opt. Commun. 1995;119:604–612.
5. 5. Jeffries GDM, Edgar JS, Zhao Y, Shelby JP, Fong C, Chiu TD. Using polarization-shaped optical vortex traps for single-cell nanosurgery. Nano Lett. 2007;7:415–420.
6. 6. Toyoda K, Miyamoto K, Aoki N, Morita R, Omatsu T. Using optical vortex to control the chirality of twisted metal nanostructures. Nano Lett. 2012;12:3645–3649.
7. 7. Omatsu T, Chujo K, Miyamoto K, Okida M, Nakamura K, Aoki N, Morita R. Metal microneedle fabrication using twisted light with spin. Opt. Express. 2010;18:17967–17973.
8. 8. Molina-Terriza G, Torres JP, Torner L. Twisted photons. Nat. Phys. 2007;3:305–310.
9. 9. Hell SW, Wichmann J. Breaking the diffraction resolution limit by stimulated emission: stimulated-emission-depletion fluorescence microscopy. Opt. Lett. 1994;19:780–782.
10. 10. Wildanger D, Medda R, Kastrup L, Hell SW. A compact STD microscope providing 3D nanoscale resolution. J. Microsc. 2009;236:35–43.
11. 11. Kotlyar VV, Almazov AA, Khonina SN, Soifer VA, Elfstrom H, Turnen J. Generation of phase singularity through diffracting a plane or Gaussian beam by a spiral phase plate. J. Opt. Soc. A. 2005;22:849–861.
12. 12. Heckenberg NR, McDuff R, Smith CP, White AG. Generation of optical phase singularities by computer generated holograms. Opt. Lett. 1992;17:221–223.
13. 13. Matsumoto N, Ando T, Inoue T, Ohtake Y, Fukuchi N, Hara T. Generation of high-quality higher-order Lagurre-Gaussian beams using liquid-crystal-on-silicon spatial light modulators. J. Opt. Soc. A. 2008;25:1642–1651.
14. 14. Beijersbergen MW, Allen L, van der Veen H, Woerdman JP. Astigmatic laser mode converters and transfer of orbital angular momentum. Opt. Commun. 1993;96:123–132.
15. 15. Allen L, Beijersbergen MW, Spreeuw RJC, Woerdman JP. Orbital angular momentum of light and the transformation of Laguerre-Gaussian laser modes. Phys. Rev. A. 1992;45:8185–8189.
16. 16. Zhan Q. Cylindrical vector beams: from mathematical concepts to applications. Adv. Opt. Photon. 2009;1:1–57.
17. 17. Bisson JF, Senatsky Y, Ueda KI. Generation of Laguerre-Gaussian modes in Nd:YAG laser using diffractive optical pumping. Las. Phys. Lett. 2005;2:327–333.
18. 18. Kim JW, High-power laser operation of the first-order Laguerre-Gaussian (LG01) mode in a diode-laser-pumped Nd: YAG laser. J. Korean Phys. Soc. 2012;61:739–743.
19. 19. Ito A, Kozawa Y, Sato S. Generation of hollow scalar and vector beams using a spot-defect mirror. J. Opt. Soc. A. 2010;27:2072–2077.
20. 20. Kano K, Kozawa Y, Sato S. Generation of purely single transverse mode vortex beam from a He-Ne laser cavity with a spot-defect mirror. Int. J. Opt. 2012;2012:359141.
21. 21. Lee AJ, Omatsu T, Pask HM. Direct generation of a first-Stokes vortex laser beam from a self-Raman laser. Opt. Express. 2013;21:12401–12408.
22. 22. Lee AJ, Zhang C, Omatsu T, Pask HM. An intracavity, frequency-doubled self-Raman vortex laser. Opt. Express. 2014;22:5400–5409.
23. 23. Lee AJ, Pask HM, Omatsu T. A continuous-wave vortex Raman laser with sum frequency generation. Appl. Phys. B. 2016;122:64.
24. 24. Okida M, Omatsu T, Itoh M, Yatagai T. Direct generation of high power Laguerre-Gaussian output from a diode-pumped Nd:YVO4 1.3 µm bounce laser. Opt. Express. 2007;15:7616–7622.
25. 25. Okida M, Hayashi Y, Omatsu T, Hamazaki J, Morita R. Characterisation of 1.06 μm optical vortex laser based on a side-pumped Nd:GdVO4 bounce laser. Appl. Phys. B. 2009;95:69–73.
26. 26. Koechner W, Bass M. Solid-State Lasers. New York: Springer-Verlag; 2003.
27. 27. Shen YR. Principles of Nonlinear Optics. New York, NY, USA: Wiley-Interscience; 1984.
28. 28. Boyd R. Nonlinear Optics. Oxford, UK: Academic Press; 2008.
29. 29. Eckhardt G, Hellwarth RW, McClung FJ, Schwarz SE, Weiner D, Woodbury EJ. Stimulated Raman scattering from organic liquids. Phys. Rev. Lett. 1962;9:455–457.
30. 30. Eckhardt G, Bortfeld DP, Geller M. Stimulated emission of Stokes and anti-Stokes Raman lines from diamond, calcite and alpha-sulfur single crystals. Appl. Phys. Lett. 1963;3:137–138.
31. 31. Piper JA, Pask HM. Crystalline Raman lasers. IEEE J. Sel. Top. Quant. Electron. 2007;13:692–704.
32. 32. Murray JT, Austin WL, Powell RC. Intracavity Raman conversion and Raman beam cleanup. Opt. Mater. 1999;11:353–371.
33. 33. Zhu Z, Gao W, Mu C, Li H. Reversible orbital angular momentum photon-phonon conversion. Optica 2016;3:212–217.
34. 34. Padgett M, Allen L. Light with a twist in its tail. Contemp. Phys. 2000;41:275–285.
35. 35. Dholakia K, Simpson NB, Padgett MJ, Allen L. Second-harmonic generation and the orbital angular momentum of light. Phys. Rev. A. 1996;54:R3742–R3745.
36. 36. Cheng LK, Bosenberg WR, Tang CL. Broadly tunable optical parametric oscillation in β-BaB2O4. Appl. Phys. Lett. 1998;53:175–177.
37. 37. Bayer RL. Optical parametric oscillators. Quant. Electron. A. Treatise. Pt. B. 1975.
38. 38. Smith AV, Armstrong DJ. Generation of vortex beams by an image-rotating optical parametric oscillator. Opt. Express. 2003;11:868–873.
39. 39. Martinelli M, Huguenin JAO, Nussenzveig P, Khoury AZ. Orbital angular momentum exchange in an optical parametric oscillator. Phys. Rev. A. 2004;70:013812.
40. 40. Miyamoto K, Miyagi S, Yamada M, Furuki K, Aoki N, Okida M, Omatsu T. Optical vortex pumped mid-infrared optical parametric oscillator Opt. Express. 2011;19:12220–12226.
41. 41. Yusufu T, Tokizane Y, Yamada M, Miyamoto K, Omatsu T. Tunable 2-μm optical vortex parametric oscillator. Opt. Express. 2012;20:23666–23675.
42. 42. Furuki K, Horikawa MT, Ogawa A, Miyamoto K, Omatsu T. Tunable mid-infrared (6.3–12 μm) optical vortex pulse generation. Opt. Express. 2014;21:26351–26357.
43. 43. Abulikemu A, Yusufu T, Mamuti R, Miyamoto K, Omatsu T. Widely-tunable vortex output from a singly resonant optical parametric oscillator. Opt. Express. 2015;23:18338–18344.

Written By

Andrew James Lee and Takashige Omatsu

Submitted: March 23rd, 2016 Reviewed: October 20th, 2016 Published: March 1st, 2017

format: plain


text:
2018
Том 70
№ 6

Metric properties of functions defined by partial automata

Abstract

We characterize natural categories in which morphisms are defined by partial automata of the following three types: asynchronous automata, window automata, and automata synchronous over finite alphabets. We distinguish subcategories whose morphisms are defined by finite automata.

English version (Springer): Ukrainian Mathematical Journal 62 (2010), no. 11, pp 1741-1751.

Citation Example: Nekrashevich V. V., Oliinyk A. S., Sushchanskii V. I. Metric properties of functions defined by partial automata // Ukr. Mat. Zh. - 2010. - 62, № 11. - pp. 1500–1510.

Full text


text:
File: d3SimpleNetwork.Rd

package info (click to toggle)
r-cran-d3network 0.5.2.1-3
 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 % Generated by roxygen2 (4.0.1): do not edit by hand \name{d3SimpleNetwork} \alias{d3SimpleNetwork} \title{Function for creating simple D3 JavaScript force directed network graphs.} \source{ D3.js was created by Michael Bostock. See \url{http://d3js.org/} and, more specifically for directed networks \url{https://github.com/mbostock/d3/wiki/Force-Layout} } \usage{ d3SimpleNetwork(Data, Source = NULL, Target = NULL, height = 600, width = 900, fontsize = 7, linkDistance = 50, charge = -200, linkColour = "#666", nodeColour = "#3182bd", nodeClickColour = "#E34A33", textColour = "#3182bd", opacity = 0.6, parentElement = "body", standAlone = TRUE, file = NULL, iframe = FALSE, d3Script = "http://d3js.org/d3.v3.min.js") } \arguments{ \item{Data}{a data frame object with three columns. The first two are the names of the linked units. The third records an edge value. (Currently the third column doesn't affect the graph.)} \item{Source}{character string naming the network source variable in the data frame. If \code{Source = NULL} then the first column of the data frame is treated as the source.} \item{Target}{character string naming the network target variable in the data frame. If \code{Target = NULL} then the second column of the data frame is treated as the target.} \item{height}{numeric height for the network graph's frame area in pixels.} \item{width}{numeric width for the network graph's frame area in pixels.} \item{fontsize}{numeric font size in pixels for the node text labels.} \item{linkDistance}{numeric distance between the links in pixels (actually arbitrary relative to the diagram's size).} \item{charge}{numeric value indicating either the strength of the node repulsion (negative value) or attraction (positive value).} \item{linkColour}{character string specifying the colour you want the link lines to be. Multiple formats supported (e.g. hexadecimal).} \item{nodeColour}{character string specifying the colour you want the node circles to be. Multiple formats supported (e.g. hexadecimal).} \item{nodeClickColour}{character string specifying the colour you want the node circles to be when they are clicked. Also changes the colour of the text. Multiple formats supported (e.g. hexadecimal).} \item{textColour}{character string specifying the colour you want the text to be before they are clicked. Multiple formats supported (e.g. hexadecimal).} \item{opacity}{numeric value of the proportion opaque you would like the graph elements to be.} \item{parentElement}{character string specifying the parent element for the resulting svg network graph. This effectively allows the user to specify where on the html page the graph will be placed. By default the parent element is \code{body}.} \item{standAlone}{logical, whether or not to return a complete HTML document (with head and foot) or just the script.} \item{file}{a character string of the file name to save the resulting graph. If a file name is given a standalone webpage is created, i.e. with a header and footer. If \code{file = NULL} then result is returned to the console.} \item{iframe}{logical. If \code{iframe = TRUE} then the graph is saved to an external file in the working directory and an HTML \code{iframe} linking to the file is printed to the console. This is useful if you are using Slidify and many other HTML slideshow framworks and want to include the graph in the resulting page. If you set the knitr code chunk \code{results='asis'} then the graph will be rendered in the output. Usually, you can use \code{iframe = FALSE} if you are creating simple knitr Markdown or HTML pages. Note: you do not need to specify the file name if \code{iframe = TRUE}, however if you do, do not include the file path.} \item{d3Script}{a character string that allows you to specify the location of the d3.js script you would like to use. The default is \url{http://d3js.org/d3.v3.min.js}.} } \description{ \code{d3SimpleNetwork} creates simple D3 JavaScript force directed network graphs. } \examples{ # Fake data Source <- c("A", "A", "A", "A", "B", "B", "C", "C", "D") Target <- c("B", "C", "D", "J", "E", "F", "G", "H", "I") NetworkData <- data.frame(Source, Target) # Create graph d3SimpleNetwork(NetworkData, height = 300, width = 700, fontsize = 15) }


text:
Before we begin

Now that the design of the site is finished, I can finally focus on the essentials.

I’ve decided that this year I will be writing a bit more, here, and elsewhere. To that end, when it comes to this site, I’ve had to perform a simple but challenging task: lowering my standards.

Last year, I did not publish anything because I had absurd standards for content. In my mind, every blog post had to be a thoroughly researched and carefully argued piece, capable of standing the test of time.

This was a monumental mistake.

Researching something thoroughly requires an extraordinary amount of time, and writing opinionated articles that can stand the test of time requires an extraordinary amount of foresight — neither of which I yet have. I have already managed to delete one post which contained opinions I no longer agreed with. I thought its content was rubbish and I was a moron for publishing it, so my only recourse was to delete it, instead of learning from it.

My desire for more content stems from the process of gradual improvement: the more you write the better you get. I cannot do this unless I start from the very basics. I could, of course, simply write guides on how to do XYZ with $THING, but I want to tell stories, not write recipes. This doesn’t mean there won’t be any guides, however! Another reason for wanting to write more stems from the simple funny fact that somebody reads this. Besides Google Analytics telling me so, a few weeks ago I even received a pull request for typo fixes. So I know there’s at least one guy who actually reads every word. Disclosure: according to GA, most of the visits are “accidental redirects” (huh?), and that actual, longer visits aren’t common, but there were enough for me to extrapolate that there were, at the very least, two readers. So, that was the background. And now comes the disclaimer, of sorts. This site is a blog. As this site is a blog, the writings are, first and foremost, opinion pieces, not research articles, and opinions change. You may find me advocating for stricter type systems one day, and for looser the next. I will only guarantee that, at the time of writing, I will argue my points to the best of my abilities. Longer, more in-depth stories, if ever completed, will be available under the articles category. This is to mark a distinction. To qualify as an article, the writing will a) contain properly researched writing and references b) be reviewed by somebody else. I’m currently working on something that may one day be considered something like that. You’re welcome to snoop into the drafts folder of the GitHub repository of the site, but be warned, that stuff is obviously incomplete. To be continued. Start-once software Software development tools are in a state of flux. There are two competing directions towards which static analysis tools—like linters and type checkers—are heading. The traditional direction is to operate in a batch model. Fire up, perform analysis, report results, and die. This is a proven method. Batch-oriented software has been around for ages, and it works really well if the data you’re working with isn’t large. The new direction is an online model: an analysis tool starts, calculates its data, reports results, and then stays on, monitoring for changes. When changes occur, the program analyzes the changes, and recomputes the effects. This execution model is efficient: incremental updates are easier to calculate than starting from scratch. This approach is arguably more modern1, since we’re leveraging the full potential of a client-server model. The obvious caveat is such a process will eat up memory. These days this is becoming less and less of a problem, since a gigabyte of desktop-quality DDR3 memory costs about US$5.

However, if the workload is large, say 100k-1M lines, it actually makes more sense to compute an initial “model” of the system, and then incrementally update the model when the system changes.

My line of reasoning was inspired by this comment on Hacker News:

Over and over I see reports of iteration speed being critical to real-world projects, and that’s certainly my experience.

But it’s something I rarely see featured in tool design. So many of our tools are still batch oriented: they start from scratch, read everything, process everything, and then exit. That made sense in an era where RAM and CPU were expensive. But now that they’re cheap, I want tools that I start when I arrive in the morning and kill when I go home. In between, they should work hard to make my life easy.

If I’m going to use a type checker, I want it to load the AST once, continuously monitor for changes, and be optimized for incremental changes. Ditto compilers, syntax checkers, linters, test runners, debugging tools. Everything that matters to me in my core feedback loop of writing a bit of code and seeing that it works.

For 4% of my annual salary, I can get a machine with 128GB of RAM and 8 3.1 GHz cores. Please god somebody build tools that take advantage of that.

Arguably, the batch mode made sense in the past, when resources weren’t as plentiful as they are now. Now, we can afford a type checker that sits in the background, eating up half a gigabyte memory, and most of us won’t even blink at that, as long as it helps us write better code—and runs quickly.

To this end, one could call such software start-once software2, which

1. Is launched once, via some mechanism and given a target, e.g. a codebase, to monitor for changes
2. Computes an initial model, the analysis, of the target
3. Whenever changes occur it instantly recomputes a new model and informs the user of the effects of the changes.

In this case, the target could be a collection of source files (a “project”), the model the compilation errors present in the source files, and the relevance is a way of communicating those errors to the user.

The basic idea can be taken from Facebook’s Flow which does exactly this when you launch it initially, it boots up a server that keeps the state of the AST in memory. The server runs the analysis and the client reports the results. There’s an initial up-front cost to all of this from starting the server but subsequent calls are fast.

There are some pseudo-implementations of this paradigm: you can have a batch process that is run every time the target changes, and then do effectively what is done in step three above. This is kind of what I described above, but the difference is that any model is lost inbetween batch runs.

In fact, file system notification based batch processes remind3 me of the the Chinese room experiment: such tools don’t really have an understanding of the model that is persistent, but due to a simultaneously crude and brilliant approach, we get the subtle impression that such a persistent, evolving understanding actually exists.

In start-once software, the goal is to always keep the model in working memory and update it incrementally. Such a program can react quickly to massive codebase changes. Naturally, speed comes at the cost of memory, but as mentioned in the quote, if it makes development faster, I think this is a perfectly justifiable cost.

This line of thinking doesn’t apply only to static analysis tools. It can work with any streaming data. Memory is cheap, but speed always isn’t. A good example is a log processor that computes the state of some system based on the content of some logs. A start-once processor would continuously monitor the log inputs and update its model of the system. If it has to churn through a lot of logs at the start, it may have an initial delay but because the model is persistent, any changes to the model can be computed quickly.

Storing the model can be done in two ways. If RAM becomes a limitation (will it?), a fast database should be used. AFter all, databases solely exist because of the prohibitively high cost of ephemeral memory compared to the cost of non-volatile memory. Traditionally!

Previously, because of the cost of ephemeral memory, we had to invent a cheaper form of storage. Now that memory is cheap, this isn’t so much of a threat anymore.

When it comes to fault-tolerance, precautions can be taken. The model could be stored as a persistent image—yes, raw memory or an accurate representation thereof, or a database. Once the program recovers, it restores the model immediately, reducing the boot time.

This model also be extended to web servers: instead of recompiling everything at every request (hello PHP), one could compile once and then compile changes incrementally. This idea isn’t new: hot swapping has been around for decades, and its advantages are obvious. Heavy-duty services that take a while to reload and restore benefit massively of hot swapping. This is routine in the JVM, Erlang and Lisp worlds.

Extending this to static analysis tools isn’t a massive step. If the philosophy works with server programs I see no reason why it couldn’t work with data analysis tools. At the cost of ephemeral resources like memory, I want static analysis tools that can handle large codebases and compute any change big or small in a fraction of a section.

I hope more tools will adopt this model. We certainly do have the resources now.

Addendum: examples of start-once static analysis tools

Flow

A static analysis tool for JavaScript by Facebook, written in OCaml. Upon launch, it starts a server that runs initial analysis and monitors for changes.

Hack

A PHP-inspired gradually typed programming language for the HHVM virtual machine. It runs a type checker in the background in the same way as Flow does. Also in OCaml!

gocode

Auto-completion service for Go. It uses a client-server model where completion requests are sent to the completion server via a JSON-based RPC. Conversely, every other Go-related static analysis tool (there are lots) is using the batch approach. That’s fine, since Go seems to be vehemently opposed to anything modern and advanced, and sometimes justifiably so. In this regard Gocode is a rare gem among the Go tooling ecosystem.

1. Yes, I know REPLs have been around since the eighties, but this isn’t exactly the same thing.

2. Facebook uses the term “online” when describing Flow

3. They aren’t exactly the same thing. Since I’m talking about computer programs performing some kind of data analysis, and mentioning the Chinese room experiment, I realize that I’m opening a massive can of worms; the comparison is a mere simile here. The users of continuous (i.e. inotify-based) batch analysis tools are on the observing end of the Chinese room experiment.


text:
# Tangential complex reference manual¶

class gudhi.TangentialComplex

Bases: object

The class Tangential_complex represents a tangential complex. After the computation of the complex, an optional post-processing called perturbation can be run to attempt to remove inconsistencies.

__init__()

TangentialComplex constructor.

Parameters: points (list of list of double) – A list of points in d-Dimension.

Or

Parameters: off_file (string) – An OFF file style name.
create_simplex_tree()

Exports the complex into a simplex tree.

Returns: A simplex tree created from the complex. SimplexTree
fix_inconsistencies_using_perturbation()

Attempts to fix inconsistencies by perturbing the point positions.

Parameters: max_perturb (double) – Maximum length of the translations used by the perturbation. time_limit (double) – Time limit in seconds. If -1, no time limit is set.
get_point()

This function returns the point corresponding to a given vertex.

Parameters: vertex (int.) – The vertex. The point. list of float
num_inconsistent_simplices()
Returns: The number of inconsistent simplices. unsigned
num_inconsistent_stars()
Returns: The number of stars containing at least one inconsistent simplex. unsigned
num_simplices()
Returns: Total number of simplices in stars (including duplicates that appear in several stars). unsigned
num_vertices()
Returns: The number of vertices. unsigned


text:
# The arithmetic of the Deutsch algorithm

The Deutsch algorithm (named after its originator David Deutsch) is a vivid and simple illustration of the power of quantum computing. Beyond achieving this admirable goal, it has no practical purpose, though it does seem to have inspired more useful algorithms. This blog post works through the arithmetic to show that the algorithm works (I did the sums to convince myself as I couldn’t grasp what was going on in Dirac notation). I don’t attempt to explain why it works.

### The problem

Here’s the problem the Deutsch algorithm solves.

Suppose you are presented with a function $$f : \{0, 1\} \rightarrow \{0, 1\}$$. You don’t know how $$f$$ is defined, but you can call it with a $$0$$ or a $$1$$ and see what result it gives. The result will always be a $$0$$ or a $$1$$.

Your task is to decide whether or not $$f$$ is constant, that is, $$f(0) = f(1)$$. If $$f$$ isn’t constant, it is said to be balanced since for one input the answer is $$0$$ and for the other it is $$1$$.

There are four possible functions, $$f_i$$, as follows:

Function $$f_i(0)$$ $$f_i(1)$$ Type
$$f_0$$ 0 0 Constant
$$f_1$$ 0 1 Balanced
$$f_2$$ 1 0 Balanced
$$f_3$$ 1 1 Constant

Classically, to distinguish between the constant and balanced functions we would simply call $$f(0)$$ and $$f(1)$$, look at the results, and see which function it is. The Deutsch quantum algorithm can distinguish between a constant and balanced function by calling the function only once. It can’t tell us which function it is, just whether it is constant or balanced.

### The circuit

Here is the circuit that solves it (diagram mildly simplified from Alice Flarend and Bob Hilborn, 2022, Fig 11.3, p. 163):

The gate $$U_f$$ is a representation of the unknown function, $$H$$ is the Hadamard gate (named after Jacques Hadamard), and $$M$$ is measurement. Let’s work through the arithmetic. I’ll start with the easy bits at the input and output before tackling $$U_f$$ in the middle.

### The inputs

To get it going, first we need to apply $$H$$ to the basis state $$|1\rangle$$.

$$\displaystyle H = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}$$,

$$\displaystyle |1\rangle = \begin{bmatrix} 0 \\ 1 \end{bmatrix}$$, so

$$\displaystyle H|1\rangle = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 \\ -1 \end{bmatrix}$$.

Next, since the circuit starts with two qubits both in the state $$H|1\rangle$$, we need to calculate the tensor product $$H|1\rangle \otimes H|1\rangle$$:

$$\displaystyle H|1\rangle \otimes H|1\rangle = \frac{1}{2} \begin{bmatrix} 1 \\ -1 \\ -1 \\ 1 \end{bmatrix}$$.

In ket notation, and reading top to the bottom of the column matrix, this is equivalent to:

$$\displaystyle \frac{1}{2}|00\rangle-\frac{1}{2}|01\rangle-\frac{1}{2}|10\rangle+\frac{1}{2}|11\rangle$$.

$$|00\rangle$$ means the inputs (reading the circuit top to bottom) were $$0$$ and $$0$$, $$|01\rangle$$ means $$0$$ and $$1$$, and so on.

This pair of qubits is in superposition. If we measured after this step, then each of the four input possibilities would be observed with equal probability. (Use Born’s rule to square the state magnitudes; each is $$1/4$$.)

### The output

After the $$U_f$$ magic happens (next section), we undo the Hadamard on the top path (register) of the circuit. Another tensor product gives us the appropriate matrix, this time of Hadamard and the identity matrix, $$I$$, defined:

$$\displaystyle I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$$.

So, $$\displaystyle H \otimes I = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 \\ 1 & 0 & -1 & 0 \\ 0 & 1 & 0 & -1 \end{bmatrix}$$.

### The middle

Now we are left with the four implementations of $$U_f$$, the overall structure of which is as follows (Mermin, 2007, p. 42):

Note that the first input, $$|x\rangle$$ to the gate remains unchanged by the output and the second out is the exclusive-OR (XOR) of $$y$$ and $$f(x)$$. (In a future blog post I explain why this helps.) Here are the sums for each $$U_f$$ (the pictures are from Mermin, 2007, p. 42; I did the ‘rithmetic):

$$U_{f_0}$$:

This is the easiest – it’s just the identity matrix. In the spirit of how we typically create a product of inputs, this is the following tensor product:

$$\displaystyle U_{f_0} = I \otimes I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \otimes \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}$$,

the structure of which pleases me for some reason (how the $$4 \times 4$$ identity matrix has a couple of $$2 \times 2$$ identity matrices in top-left and bottom-right corners, and how $$\otimes$$ makes it happen!).

$$U_{f_1}$$:

This is the controlled NOT gate:

$$U_{f_1} = \mbox{CNOT} = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix}$$.

$$U_{f_2}$$:

This takes the NOT (a.k.a. $$X$$) of the second input and then applies CNOT to both inputs. Let’s take the first step first:

$$I \otimes X = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \otimes \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix}$$.

(This is mildly pleasing: note the $$2 \times 2$$ NOT gate at the top left and bottom right.)

Now multiply CNOT by it:

$$U_{f_2} = \mbox{CNOT} (I \otimes X) = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}$$

$$U_{f_3}$$:

Another easier one: just NOT the second input, so we need $$I \otimes X$$ and we already calculated it above:

$$U_{f_3} = I \otimes X = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \otimes \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix}$$.

### Gluing it all together

Now the fun bit in a big table. Let

$$\mbox{Inp} = H|1\rangle \otimes H|1\rangle$$ and
$$\mbox{Undo} = H \otimes I$$.

That is, $$\mbox{Inp}$$ is the input and $$\mbox{Undo}$$ is the step in the Deutsch circuit before measurement which applies the Hadamard gate.

Function $$\mbox{Inp}\ U_{f_i}$$ $$\mbox{Inp}\ U_{f_i}\ \mbox{Undo}$$
$$f_0$$
(constant)
$$\displaystyle \frac{1}{2} \begin{bmatrix} 1 \\ -1 \\ -1 \\ 1 \end{bmatrix}$$ $$\displaystyle \frac{1}{\sqrt{2}} \begin{bmatrix} 0 \\ 0 \\ 1 \\ -1 \end{bmatrix}$$
$$f_1$$
(balanced)
$$\displaystyle \frac{1}{2} \begin{bmatrix} 1 \\ -1 \\ 1 \\ -1 \end{bmatrix}$$ $$\displaystyle \frac{1}{\sqrt{2}} \begin{bmatrix} 1 \\ -1 \\ 0 \\ 0 \end{bmatrix}$$
$$f_2$$
(balanced)
$$\displaystyle \frac{1}{2} \begin{bmatrix} -1 \\ 1 \\ -1 \\ 1 \end{bmatrix}$$ $$\displaystyle \frac{1}{\sqrt{2}} \begin{bmatrix} -1 \\ 1 \\ 0 \\ 0 \end{bmatrix}$$
$$f_3$$
(constant)
$$\displaystyle \frac{1}{2} \begin{bmatrix} -1 \\ 1 \\ 1 \\ -1 \end{bmatrix}$$ $$\displaystyle \frac{1}{\sqrt{2}} \begin{bmatrix} 0 \\ 0 \\ -1 \\ 1 \end{bmatrix}$$

To see what we would measure, use Born’s rule and square the amplitudes. This gives the following probabilities for each qubit pair:

$$P(|00\rangle)$$ $$P(|01\rangle)$$ $$P(|10\rangle)$$ $$P(|11\rangle)$$
$$f_0$$
(constant)
$$0$$ $$0$$ $$\frac{1}{2}$$ $$\frac{1}{2}$$
$$f_1$$
(balanced)
$$\frac{1}{2}$$ $$\frac{1}{2}$$ $$0$$ $$0$$
$$f_2$$
(balanced)
$$\frac{1}{2}$$ $$\frac{1}{2}$$ $$0$$ $$0$$
$$f_3$$
(constant)
$$0$$ $$0$$ $$\frac{1}{2}$$ $$\frac{1}{2}$$

If the function is constant, the probability that the first qubit is a $$1$$, which I’ll write $$P(|1\_\rangle)$$, is:

$$\displaystyle P(|1\_\rangle) = P(|10\rangle) + P(|11\rangle) = \frac{1}{2} + \frac{1}{2} = 1$$.

We observe either $$|10\rangle$$ or $$|11\rangle$$ with equal probability but the first qubit is always $$1$$.

If the function is balanced, the probability that the first qubit is a $$0$$ is:

$$\displaystyle P(|0\_\rangle) = P(|00\rangle) + P(|01\rangle) = \frac{1}{2} + \frac{1}{2} = 1$$.

For this possibility, we observe either $$|00\rangle$$ or $$|01\rangle$$ with equal probability but the first qubit is always a $$0$$.

It worked! Looking at this first qubit tells us whether the function was constant or balanced. The second qubit has a 50-50 chance of being a $$1$$ or $$0$$ so doesn’t tell us anything helpful.

See this post for the output when I ran the algorithm on an actual quantum computer, ibmq_quito.

### But why does it work?!

As I mentioned at the outset, I am not going to attempt to explain why it works, but Mermin’s (2007, p. 41) potted history of the algorithm may be of interest:

“Deutsch’s problem is the simplest example of a quantum tradeoff that sacrifices particular information to acquire relational information. A crude version of it appeared in a 1985 paper by David Deutsch that, together with a 1982 paper by Richard Feynman, launched the whole field. In that early version the trick could be executed successfully only half the time. It took a while for people to realize that the trick could be accomplished every single time.”

### References

Flarend, A., & Hilborn, B. (2022). Quantum computing: from Alice to Bob. Oxford University Press.

Mermin, N. D. (2007). Quantum computer science: an introduction. Cambridge University Press.