in

Dot Net Mafia

Group site for developer blogs dealing with (usually) Ionic, .NET, SharePoint, Office 365, Mobile Development, and other Microsoft products, as well as some discussion of general programming related concepts.

This Blog

Syndication

Archives

Corey Roth [MVP]

A SharePoint MVP bringing you the latest time saving tips for Ionic, SharePoint, and Office 365.
  • How to: Default a date field to today's date in PowerApps

    When you add a date field in PowerApps, I find that the current default date of 12/31/2001 is not very useful for me.

    PowerAppsDefaultDate

    Changing the default date is not hard but you have to know where to look.  First, you have to realize a date field is actually three different controls DateValue, HourValue, and MinuteValue.  The default has to be set on each one. 

    Start by clicking on the Date Value where is says 12/31/2001.  In the properties, go to the Advanced Tab and click the Unlock button. Now, iIn the property selector, look for DefaultDate and change the value to Now().

    PowerAppsDefaultDateSelected

    You'll notice the date changes to today's date now.  You can also use date manipulation functions if you want to choose another date.  Now, if you don't like the time defaulting to midnight, we can change that too.  Click on the HourValue and choose Default in the property selector.  Notice the formula it has.

    PowerAppsDefaultDateHourBeforeChange

    Let's change that to use today's date and time to get the default value with the following formula.

    Text(Hour(Now()), "00")

    You'll notice the hour has now updated.  PowerApps may apply a region identifier to your string when you update it.  That won't mess anything up.

    PowerAppsDefaultDateHourBeforeChange

    Now repeat the process for the MinuteValue with the following formula

    Text(Minute(Now()), "00")

    PowerAppsDefaultDateMinuteValueChanged

    That's all there is to it.  It may take a few extra steps than you expected but the process is pretty easy to follow.

  • Getting started with the new Microsoft Teams & Skype for Business Admin Center

    The new Microsoft Teams & Skype for Business Admin Center is starting to roll out to first release.  This post will show you some of the highlights and how to get started.  First, you have to know where to find it.  Currently, the Microsoft Teams & Skype for Business Admin Center does not show up in the list of Admin Centers on your Tenant.  To find it in your Admin Center, go to Settings -> Services & add-ins and then Microsoft Teams

    TeamsAdminCenterSettingsLink

    If the new admin center has been provisioned on your tenant, you will see a message at the top warning you that some settings are only available in the new admin center.

    TeamsAdminSettingsMigrated

    Click on the link to take you to the new admin center.  It will take you to the URL below.

    https://admin.teams.microsoft.com/

    The will take you a dashboard that looks a bit incomplete for the moment.  It lets you quickly get to your users as well as some help videos.

    TeamsAdminCenterDashboard

    On the Users page, you can see a dashboard of users, phone numbers (if any) and that one policy has been defined.  It looks like the RestrictedAnonymousAccess policy is assigned to everyone by default.

    TeamsAdminCenterUsers

    When you click on a user, you see a screen with some general information including the conference bridge and phone number (if assigned).  Here you can reset the conference ID or PIIN, set policies, and set defaults.

    TeamsAdminCenterUser

    If you click Edit next to Assigned policies, it will let you change the Teams Messaging policy but you cannot change the Teams Meeting Policy yet.  The option simply isn't present when you click on it.  I suspect that will come later in the future.

    TeamsAdminCenterUserPolicy

    If you click Edit next to Microsoft Teams, you can set the Default calling app and the Default chat appEach one has a value of Teams, Skype for Business, or Default.  However, when you try to change the Default calling app, you get an error:

    This combination of preferred applications isn't allowed.

    TeamsAdminCenterUserDefaults

    I suspect this will be resolved in the future as more of the Interop features on the roadmap are launched.

    Under Meetings, you can now manage your conference bridge phone numbers.  This is a welcome change from the old Skype for Business audio conference settings.

    TeamsAdminCenterMeetings

    Clicking Settings takes you to bridge settings include entry and exit notifications and PIN length.

    TeamsAdminCenterMeetingsSettings

    In reality, not that many settings have been migrated to the new admin center yet.  The most noticeable move will be the Messaging settings.

    TeamsAdminMessagingMoved

    Here you will see the new expanded Teams messaging policy with the ability to set more than one policy now.

    TeamsAdminCenterMessagingPolicies

    You can control External Access under Org-wide settings.  This is where you can turn off communication to external Skype (consumer) users.  By the way, Secure Score actually recommends you turn off communication to Skype users now.

    TeamsAdminCenterExternalAccess

    Under Guest Access you can control all of the settings that you allow guests of your Teams to do.

    TeamsAdminCenterGuestAccess

    That's all of the new settings for now.  Like the new SharePoint Admin Center, many of the legacy settings will take some time to migrate over to this new experience.  If you can't find the setting you are looking for, go back to the Skype for Business admin center or the Teams Settings menu.

  • Using Cloud Storage to create virtual folder hierarchies in Microsoft Teams

    One particular feature in Microsoft Teams that has been a success in my organization is the use of Cloud Storage to provide a hierarchy in Microsoft Teams. If you are not familiar with what I am talking about, I am referring to the Add cloud storage link you see in the Files tab of a Team.  You might have glossed over this link since you may be fully on Office 365, but this particular link has a lot of power.

    TeamsAddCloudStorage2

    Clicking that button will take you to a screen asking you which cloud storage provider you want to use.  In our case, we want to use SharePoint.

    TeamsAddCloudStorageChooseProvider

    However, you may have different options.  That's because they can be configured in the Office 365 Admin center under Settings -> Services & Add-ins -> Microsoft Teams -> Custom cloud storage.

    TeamsCustomCloudStorageAdmin

    Note, how most of mine are turned off.  Google Drive is about to join the off-club as well for us.  Having just migrated my organization off of G Suite this cloud storage provider approach has acted as a good transition since Google makes use of the virtual folders concept quite a bit.

    Now back when the user chooses SharePoint, it will present you a list of sites that it thinks might be relevant to you.  However, you can also paste in a link from any SharePoint site you have.  Don't worry about trimming the link or getting it exact either.  You can paste the URL of the site root, a document library, whatever.  Teams will figure out the site you want.

    TeamsAddSharePointLink

    Paste your URL,  select the site, and then click Next.  Now pick the document library you want to link in.

    TeamsCloudStorageDocumentLibrary

    Finally click Add Folder.

    You will be returned to the Files tab.  This part is a bit buggy because while the tab does refresh, it doesn't show you your new link.  Just switch off the tab and click back on the Files tab and you will then see your new link.

    TeamsWithVirtualLink

    It will create a link to the child site with a special SharePoint folder icon.  It names your folder based off of the site name and document library name.  Unfortunately, you don't have any control of that name and you can't rename it.

    When you click on the link, it will let you drill down into the document library of that site you linked in.  Notice it even maintains the bread crumbs from the Team you came from.

    TeamsChildSiite

    This is a great way to bring links to content from all over your organization into one central location.  It's pretty useful I think.

    What's the downside?

    I think the only other downside is that you can only see these links from the Teams client.  If you go into SharePoint directly, you won't see those links in your document libraries.  It's still pretty useful though.  Give it a try!

  • Understanding Site Collection creation with Microsoft Teams

    When you create a new site Microsoft Team, it creates a site collection for you rather quickly.  In general, it's ok to start working with this site collection right away.  You can upload files or do whatever you need.  However, you might have noticed before that certain menus are not available in Site Settings right away. and you can't do other administrative actions such as "Change the Look".  I started looking into this after I created a new Team and then started using Sharegate to move files there right away.  Sharegate gives me an error message that I don't have the necessary permissions to use Insane Mode.  This is no fault of Sharegate, something clearly wasn't ready yet in Office 365.

    Screen Shot 2018-03-15 at 10.02.07 AM

    I created the Team so shouldn't I be a site collection administrator?  I was confused because this was right after I successfully migrated files to a different Team that I had created last week.  It turns out even though I created the Team, I am not a Site Collection owner…yet.  The administration options are simply not there. That's because you don't have access yet. 

    I don't fully understand it, but after digging around in PowerShell, I do understand it a bit more now.  I went into SharePoint Online Management Shell and used Get-SPOUser on the site. 

    Get-SPOUser -site https://tenant.sharepoint.com/sites/teamname | Select LoginName, IsSiteAdmin

    Looking at the results, you can see that no one is a site collection admin.

    Screen Shot 2018-03-15 at 10.01.40 AM

    I suspected, I needed to wait and see what happens.  I knew my other Teams worked fine, so hopefully this one will work soon as well.  I came back about 40 minutes later, just shortly past the hour.  I then ran the same PowerShell command.  This time, the results were different.

    Screen Shot 2018-03-15 at 10.02.42 AM

    Notice how the GUID named account, ce738800-2aff-4c9f-b2cd-2b0521aa8a77_o, now is listed as a site admin?  Interesting.  After comparing the results of another Team, my account wasn't listed there as a Site Collection admin but everything there worked fine.  I decided to go back and try my migration.  Sure enough it worked.  I could use Change the Look now to change my site theme and all of my links were available on the Site Settings page now too. 

    I'm pretty sure what happens is that there is a job that runs once an hour at the top of the hour (although I am not really sure) that goes and sets permissions after the fact whenever you create a Team.  If you run into this issue, just be patient and everything should work shortly.

  • How to: Use QnA Maker with Azure Function Bots

    I have been working with bots a bit lately and wanted to share some of my experiences.  QnA Maker makes it really easy to built a bot to serve up a knowledge base based on simple question and answer pairs that you populate it with.  After you publish your knowledgebase with QnA Maker, it's a bit tricky to figure out what to do next.  When you click Publish, you get a screen like this.

    Screen Shot 2018-03-09 at 10.19.30 AM

    While this is useful information if you were going to interact with your bot directly via REST.  It doesn't tell you how to turn this into a bot.  In fact if you look for information on how to do this with an Azure Functions Bot, you'll find very little on it.  That's because all of the documentation and examples out there tell you how to do it with Bot Framework / Bot Service which is deprecated in lieu of the new Azure Functions Bot or Web App Bot. That's why I created this post to walk you through it.

    Start by creating a new Functions Bot or Web App Bot.  The difference really just depends on how you want to pay for your consumption.  If you are just experimenting, I would probably go with a Functions Bot.  You can find both under AI + Cognitive Services.

    Screen Shot 2018-03-09 at 10.37.34 AM

    You'll need to give your bot a unique name.  You'll select the typical things like the Location, Azure Storage account, and Resource Group.  The key things you want to set are the Pricing tier and the Bot template.  For Pricing tier use F0 which includes 10K Premium Messages

    Screen Shot 2018-03-09 at 10.40.47 AM

    For the Bot template, click on it choose either C# or Node.js and be sure and choose Question and Answer.

    Screen Shot 2018-03-09 at 10.40.13 AM

    You also want to set your Hosting Plan.  I am going with Consumption Plan but this is really up to you.

    Once your bot is provisioned, we now need to adjust a few settings.  This part used to be clearer with the old Bot Service stuff.  Click on Application Settings.

    Screen Shot 2018-03-09 at 10.46.35 AM

    Now we need a few values from QnA Maker.  Remember the publish screen?  It has the values we need.  We need the values for QnAKnowledgebaseId and QnASubscriptionKey.

    Screen Shot 2018-03-09 at 10.19.30 AM

    You can find QnAKnowledgebaseId in the GUID of the first line of the POST statement.  So in this case, mine is 73d71520-4c66-45ee-8fbf-acfeef3d1b05.

    You can find QnASubscriptionKey in the third line Ocp-Apim-Subscription-Key.  In this case, mine is 9343c969f7ab4ac28b559c87ae6eb3d0.

    Now we need to set these values in our Application Settings at the very bottom of the list.

    Screen Shot 2018-03-09 at 10.53.32 AM

    That's all you need to do.  Once you have configured those settings, your QnA bot is ready to go.  Try it out for yourself!

    Posted Mar 09 2018, 10:55 AM by CoreyRoth with no comments
    Filed under: ,
  • How to survive partnership renewal in the new Microsoft Partner Center

    If you managed the Microsoft partner relationship for your company, you know what the old Microsoft Partner Portal was like.  Every time I had to use it, I cried.  Microsoft recognized the problem and has come out with a brand new Partner Center.  While ultimately, the transition is a good thing, making the transition can be a bit bumpy.  Our partnership was up for renewal on 2/28/2018, so I had the distinct pleasure of requalifying our competencies on the new system

    Shift from Microsoft Account to Azure Active Directory

    In the old partner center, you logged in with your personal Microsoft Account.  This made sense to a degree because these are the same accounts that your consultants are using for Microsoft Learning and to take their exams.  Now everything is tied to your Azure Active Directory.  When you log into the old partner portal, you will be notified of the transition to the new partner center and it will tell you everything you need to make the transition.  It might be a bit more than you expected.

    Global Administrator Credentials Required

    That's right.  To make the change you need to be a global administrator of your Azure Active Directory.  For a small company like mine, that's no problem.  For a company with 5000 consultants, this is going to be an issue for you.  You are going to have to track that person down and convince he or she that you need to go through this process.  Good luck with all of that.

    Where did all of my competencies and benefits go?

    That's right they are gone in the new Partner Center.  When you click on Partnership -> Benefits, you will get a message that says:

    Benefits are not available yet.

    Awesome.  Will they be available soon?  Do I come back later?  No you have no benefits, because you lost all of your competencies in this process.  Why did you lose all of your competencies?  That's because of the change to Azure Active Directory.

    Importing Users

    When you click on View Users, you won't see the people in your org that have passed exams and associated themselves with your organization.  instead, you will see everything in your Azure Active Directory. 

    Now, if you weren't on Azure Active Directory yet, this makes things even more interesting.  We were actually in the process of moving from G Suite to Office 365.  We had an Azure Active Directory because of some Azure subscriptions, but none of our users were there yet.   Well, the Partner Center has created a process to create new accounts for any of your users associated in the old partner portal.  You just have to know where to find it.  On the User Management page, look for the link Add users using PMC data.  That's obvious right?

    Screen Shot 2018-03-07 at 8.18.33 AM

    On the next screen, it will show you what the account conversion process looks like and you have the opportunity to update account names.  When you continue, each user will get an e-mail with their account information just like the one from Office 365 when a new account is created.

    Screen Shot 2018-03-07 at 8.31.40 AM

    Action Required - Link your Microsoft Learning Account

    Your competencies are gone because there is no association between the old Microsoft Accounts of your consultants and their Azure Active Directory accounts.  Each user must log into the Partner Center URL below and then click on My Profile.  Then they have to click Associate next to Your Microsoft Learning account.

    Screen Shot 2018-03-07 at 8.44.12 AM

    https://partnercenter.microsoft.com/

    After they do that, any exams they have completed will start counting for your competencies.  However, it may take up to 24 hours for them to show up.  For a small organization, this might not be a big deal.  For a large organization, you may have to have hundreds (or even thousands) of people complete this process.  Good luck with that!

    Completing Your Competencies

    The Partner Center will automatically assign users to the relevant competencies. 

    Screen Shot 2018-03-07 at 8.49.54 AM

    However, if you are in the middle of qualifying for a particular competency, it's not obvious that people with their certifications are counting towards the competency until you have completed it.  Take a look at the example below.  We're in the middle of qualifying for Gold, but it doesn't show it.

    Screen Shot 2018-03-07 at 8.47.54 AM

    In fact, it will only show it once you achieve it.  What's even more confusing is that on the main page, it will list it as "Not Started".  The only way to see what exams are actually counting for what is to click on the Download Skills Report link at the top.  This will give you a CSV file that has the name of each MCP in your org, what exam they have passes, and what competency it counts for.

    Screen Shot 2018-03-07 at 8.51.29 AM

    Old SharePoint Exams still count

    Even though they aren't on the list, my SharePoint 2013 exams have qualified our org for the Cloud Productivity competency. 

    Screen Shot 2018-03-07 at 9.17.24 AM

    No Customer References Required

    Missing in the new Partner Center is the process that tracks customer references.  You no longer appear to need this to get your partnership.  I can't say I am missing this one bit.

    Getting your benefits

    Again, to access your benefits in the new portal, you have to requalify all of your competencies.  Otherwise, you have to access your benefits using the old portal.  Once you do qualify and you pay your fees for whatever partner levels you are purchasing, you can access your benefits from this portal.  It comes with benefits for Software, Cloud, Visual Studio Subscriptions, and Technical Benefits (Support).  You get licenses for a variety of software that you likely don't need any more with the shift to the cloud.  However, it does cover your Windows 10 licenses. For Silver, you get 10 Visual Studio Enterprise subscriptions.  Here is what the cloud benefits look like.

    Screen Shot 2018-03-07 at 8.53.41 AM

    Although we ran into a few snags along the way, I do think the new Partner Center is a good thing.  It's way easier to use and the change to Azure Active Directory makes a lot of sense.

  • Using Microsoft Flow to save copies of E-mail receipts

    If you are like me, you get a lot of receipts via e-mail for things like Internet, electricity, phone, flights, and more.  These things are usually business related, but they don't always get sent to the business account.  Before Flow, I used to go through my e-mail, save each one off as a PDF and drag it to a document library.  It was very time consuming.  Now I have automated all of this with Flow.

    In my example, I am setting up a Flow to capture receipts from my Internet provider.  First, you'll need to set up connections to wherever your e-mail is coming from.  This could be Outlook (consumer), Gmail, or Office 365 Outlook.  In this example, I set up a connection to Outlook.  Then I used the trigger "When a new e-mail arrives".  After you have added the trigger, click on Show advanced options to create a filter.  You can filter by To address, From address, or the subject.  In this case, I am looking for the Subject Filter of "Your AT&T online bill is ready to be viewed".  This will trigger the flow whenever an e-mail is received with the matching conditions.

    Screen Shot 2018-01-18 at 1.01.08 PM

    My goal is to save the contents of the E-mail as a PDF into a document library.  There is an action that lets you convert HTML files to PDF but it only works on files stored in OneDrive for Business.  As a result, I create the HTML file first in OneDrive for Business with the Create File action.  Use the Body field from the E-mail step as the File content.

    Screen Shot 2018-01-18 at 1.05.14 PM

    Now use the Convert file using path (preview) action to convert the file to a PDF.  Use the Name from the Create File action as the File Path.  Make sure Target type is set to PDF (currently the only valid value).

    Screen Shot 2018-01-18 at 1.07.16 PM

    Finally, we want to save the file into a document library where I keep receipts.  Use the SharePoint Create File action.  Specify the URL to your site first.  Then you can specify a Folder Path.  In this case I am telling Flow to save my file in the Company Documents document library and in the Receipts subfolder.  For the File Content parameter pass the File Content output from the Convert file using path activity. 

    Screen Shot 2018-01-18 at 1.13.45 PM

    You want the name of the file to be unique when it gets written to the document library.  Therefore, I use concat to create a filename with the vendor in the receipt along with the date for the File Name parameter.  Here's what mine looks like.

    Screen Shot 2018-01-18 at 1.15.31 PM

    That's it.  At this point, your Flow is ready to go.  When the flow runs, you'll see the file in your target document library if everything is correct.  Here is what the information looks like on the file.

    Screen Shot 2018-01-18 at 1.17.33 PM

    Viewing the file, you will see the PDF it created.  While the conversion process picks up the HTML formatting, tables, and CSS, it doesn't pick up the images unfortunately.  However, this is good enough for me for now. 

    Screen Shot 2018-01-18 at 1.18.32 PM

    I thought I would share this Flow today because I found it useful.  If you found some actions that you think might work better, leave a comment.

  • Create an Office AddIn with Ionic Framework

    If you want to build an Office AddIn for Word, Excel, or PowerPoint, all you really need to know is a little HTML and JavaScript.  Since Ionic Framework is built with HTML and JavaScript, it actually makes a great fit for hosting an Office AddIn.  In fact, task pane apps have a very similar shape to your mobile phone (long and narrow) so the UX elements that Ionic provides work pretty well there.  Here's an example of my Word AddIn, BrewZap menus.  It creates paper menus for subscribing breweries using the menus they manage directly from their mobile app on the BrewZap platform.

    Screen Shot 2018-01-16 at 12.19.37 PM

    Getting started with the manfiest

    An Office AddIn is essentially just a manifest XML file that tells Office the location of your web application.  You'll want to start with one of the existing manifest examples otherwise you may be missing components required to get your AddIn published in the Office Store.  You will need to provide a link to your web application as well as icons in the size of 12x12, 32x32, and 80x80.  Look through the example manifests and you should have what you need to get started.  I recommend creating two manifests: one for debugging locally and one for production use.  When you debug locally, you can simply run ionic serve and load the AddIn from the AddIns menu in Word (or whatever app you are targeting).

    Creating your Ionic app

    Create an Ionic app using ionic start and selecting the appropriate options.  I used the tab template and it works pretty well.  Once you project is created, you can start adding your code.  First, we add the reference to the office.js library to your index.html.  The Office Store requires you serve it from the CDN.

    <script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js" type="text/javascript"></script>

    Depending on what you are doing, you may actually have to load jQuery as well.  I know that seems odd in an Ionic app.  Once you have your scripts registered, you are ready to start writing some content into your Word document.  The Word AddIn example has some easy snippets you can leverage

    function insertHtml() {
         Word.run(function (context) {

            // Create a proxy object for the document.
             var thisDocument = context.document;

            // Queue a command to get the current selection.
             // Create a proxy range object for the selection.
             var range = thisDocument.getSelection();

            // Queue a command to replace the selected text.
             range.insertText('"<b>Hello World!</b>."\n', Word.InsertLocation.replace);

            // Synchronize the document state by executing the queued commands,
             // and return a promise to indicate task completion.
             return context.sync().then(function () {
                 console.log('Added html.');
             });
         })
             .catch(function (error) {
                 console.log('Error: ' + JSON.stringify(error));
                 if (error instanceof OfficeExtension.Error) {
                     console.log('Debug info: ' + JSON.stringify(error.debugInfo));
                 }
             });
    }

    I find the easiest way to apply formatting in your word document is to use HTML.  Word will interpret it appropriately and format your content.

    Testing your app

    You can develop Office AddIns in Windows, OS X, an iPad, or in the browser with Word Online.  The same API works for all hosts of your application.  However, you need to pay attention to which API you use because some are supported in different versions of the Office client (2013 vs. 2016).  You need to test them your AddIn on all platforms to verify that it works correctly.  Windows of all platforms gave me the most trouble because Internet Explorer gets used as the backend for Office AddIns.  I also had some issue with the formatting on some inputs and they didn't render correctly in Word 2016.

    Deploying your app

    You'll need to deploy the code for your app somewhere so that you can publish your app to the store.  This entails adding the browser platform to cordova and then doing a production build.  You can read my steps on how to run an Ionic PWA using Azure Web Sites for more details.  If you aren't hosting in Azure, the steps are pretty familiar still.  To do your final build for production, you will run the following command.

    ionic cordova build browser --prod --release

    You'll then copy the contents of your platform/browser/www/build folder to your production server.  Now update your manifest to point to that new server location and you're ready to go.  Once you validate it works, you can begin the Office Store submission process to get your app in the store.

    Here is what my app looks like after it has inserted a table listing the beer menu at a restaurant.

    Screen Shot 2018-01-16 at 12.30.24 PM

    Sorry for the lack of code formatting today.  I don't have a working solution to post code effectively currently.  Once I scrub some of the code, I'll post a repo with the complete solution as well.

  • Thoughts on the post-quantum computing era

    With IBM, Google, and Microsoft pouring funding into the research of quantum computing, it's really starting to look like we are going to see the benefits in the next 5 - 10 years.  Google may be just weeks from announcing they reached the quantum supremacy milestone and IBM may not be far behind either.  Today, I wanted to share my thoughts on how quantum computing may affect cryptography as we know it.

    Effects on cryptography

    When we talk about the basic cryptography used for things like TLS when you access your bank's website, the premise behind securing your data is surprisingly simple.  The certificate uses a public key which is really just a large number that's the result of multiplying two prime numbers together.  This key has a size typically between 256 bits and 2048 bits.  It's quite a large number.  To find the two factors via brute force, in today's classical computers, it would take a billion years to solve (give or take a year or two).  In computational complexity theory, they refer to these problems as intractable.  They just can't be solved with the computers we have today. 

    However, once we have quantum computers, by the nature of entanglement and superposition, it can brute force all of the possibilities using an algorithm such as Shor's algorithm in a couple of minutes.  Quantum Computers will ultimately break RSA encryption as we know it.  It will take a significant number of qubits though before this can happen.  The largest number factored to date is 56163, far smaller than a number that is 256 digits long.  This means your bank login is safe from quantum computing for a little bit longer.

    Prediction - the media will cause mass hysteria about quantum computers and cryptography

    Here is what I think is going to happen.  Some journalist looking for the next click-bait is going to stumble upon this following an upcoming advancement in the field of quantum computing.  With half the facts the journalist, will write an article with a headline such as "Quantum Computers are breaking into your bank account right now."  This will cause other media outlets to spread the word and amplify the message and people will go into a 1999 Y2K style frenzy.  Consumers will freak out.  Some will stop using the Internet for a while. 

    The thing is there are already smart people thinking about this and working on algorithms for Post-quantum cryptography.  That doesn't mean a system for post-quantum cryptography will be available at the same time we get a quantum computer that can break RSA.  We might, but I doubt it.  Assuming post-quantum cryptography for the we is still certificate based, vendors will have to start creating those certificates.  Then the web platforms like Apache and IIS will have to support it (not to mention the OS itself).  Then the browsers will have to be updated as well.  That's a lot of moving parts.

    Companies will be scrambling to figure out what to do.  I am predicting another gold rush for consulting firms (like Y2K) to help companies come up with a post-quantum strategy.  Keep in mind it's not just the ecommerce site we are securing.  It's the servers, the network communication, the connections to the cloud, etc.  Some new people are going to get rich off of this.

    I think the hysteria will happen whether it is warranted or not.  Even when we start seeing quantum computers, not everyone is going to have access to them at the scale required to break the RSA.  Even with Microsoft and IBM putting quantum compute in the cloud, most people will only have access to a small number of qubits.  To get enough quantum computer power, it's absolutely going to cost you.  That's not to say that some researcher with early access to quantum hardware couldn't "turn to the dark side and cause some mischief."  It sounds like the making of a science fiction film, right?

    Effects on cryptocurrency

    Now I am hoping the bubble of cryptocurrencies like Bitcoin pops long before we reach post-quantum computing.  I think it's going to be around for a while though.  We may be out of Bitcoins by then but one of the other networks will rise up to take its place.  I don't think a lot of thought has gone into the effects of quantum computing on cryptocurrencies yet, but I think the threat is real.  Cryptocurrencies like Bitcoin are based on SHA-256.  New blocks of bitcoins are generated basically by brute force by trying to mine a nonce to go along with the hash value.   This sounds like something a quantum computer could do quite well.  If someone were able to mine say all the remaining blocks in a cryptocurrency in a few days instead of years, that could be bad for the cryptocurrency economy. 

    This is all speculation of course, but I wouldn't be surprised if some we hear a story of some PHD university researcher who took off with a ton of cryptocurrency and disappeared off the grid in Fiji.  Sounds like another science fiction film, right?  Maybe I need to go into screenwriting.  The implications are easy to exaggerate I know.  It doesn't take much to spook and investor though.  One new story goes viral, and a bubble could pop.

    Conclusion

    I think a lot of what happens in post-quantum computing and cryptography will happen to some degree.  However, you will have to be able to discern perception and reality.  Keep an eye on the state of the industry so you know what's going on.  Then make smart informed decisions instead of knee-jerk reactions.

    If you want to start learning more about quantum computing, check out my guide on How to start learning about Quantum Computing.

  • How to start learning about Quantum Computing

    Quantum Computing is becoming quite the hot topic lately.  With research being done by Google, IBM, Microsoft, universities, and a number of other players, it’s looking this is really going to happen.  In fact, Google may just be weeks away from announcing the Quantum Supremacy milestone.  If you aren’t familiar with the concept of Quantum Supremacy yet, it’s basically the point where a quantum computer can complete a computation in a short time where a classical computer can’t complete it at all.  This is a big deal.  While there are some simple quantum computers out there right now (you can try out IBM’s via the Q Experience), this will be a big deal.

    Now, quantum computing isn't for everyone.  I'm pretty sure it's not even for myself, but I am interested in the technology so I am intrigued to learn more.  The point of this post isn't to teach you all of the details about quantum computing (because I am far from qualified to do that).  It's to teach you some of the basic concepts you should go learn about and point you to resources on where to learn more.  For my current limited quantum computing knowledge, I have learned from resources from Wikipedia, IBM, and Microsoft.  Google has some resources too, but I think most of them assume you already have a PHD in Physics or Computer Science.  I found that some of the resources do a better job at explaining concepts than others.  Since this is a complex topic, you can learn something from reading each of them.  I will warn you, that this stuff is complicated.  It's got to be if quantum computing is going to be as revolutionary as predicted.  With a Computer Science degree, I learned about a lot of these concepts while at University, but I have long forgotten these things.  Let's face it, you don't use things like Linear Algebra much when you are creating an Intranet in Office 365.

    What follows below is some of the key areas of quantum computing that I think you will want to learn more about.  There's a lot to learn about quantum computing, but this should give you some good building blocks.

    What is Quantum Computing?

    The promise of quantum computing is that they will be able to solve computational problems in minutes or hours versus years on classical computer.  It all starts with qubits and how they interact with each other.   To understand more, start by reading an Introduction in the Beginner's Guide of the IBM Q Experience.  Then go read Microsoft's take on it.  They also have a short video about it.  Finally, if you want to go deep, read up on Wikipedia.

    Who are the players?

    IBM, Google, and Microsoft have all been in the media a lot lately with announcements.  If we were to compare this to the space race, IBM has someone in orbit, Google is about to plant a flag on the moon, and Microsoft just decided what type of rocket fuel to use.  I think Microsoft picked a compelling type of rocket fuel though, topological quantum computing.  They have a world-class team working on it too.  D-Wave Systems was the first company to have a commercially viable quantum device but it's limited to specific scenarios.  This is not to discount the teams of university researchers that these companies have partnered with throughout the world as well. 

    One company you may notice that is sitting on buckets of cash but is remarkably missing is Apple.  Apple has not announced any research in quantum computing at this point.  There are a lot of theories on this, but since Apple can't make a quantum computer "pretty" and overcharge for it, I don't think it's ever going to happen.

    Greek Letters

    If it's been a while since you've looked at the Greek Alphabet, you better go do so now.  Due to the amount of linear algebra involved, there are Greek letters everywhere, and while you might remember Alpha or Beta, remembering Psi, Phi, and Theta might be a bit harder.  When you are reading through the documentation, pull up the article on Greek Letters on Wikipedia and keep it handy as a reference.

    Linear Algebra

    To understand the world of quantum computing, you need to understand several linear algebra concepts.  Specifically, you need to understand the concept of vectors and matrices.  You'll want to understand their notation and the operations on them.  For example, you'll need to understand how to add and multiply matrices together and the tensor product.  The Vectors and Matrices article in Microsoft's quantum computing concepts section is quite good.  The following section on Eigenvalues and Eigenvectors is important as well.  They also recommend the book Linear Algebra (additional materials) Third Edition by Jim Hefferon (available for free at the links).  If you've never studied linear algebra (or it's been a while), it might be worth reviewing that book as you get into things.

    Qubits

    Whereas bits are the basic object of classical computing, qubits are the fundamental object of information in the quantum computing world.  However, they are significantly complex.  Like a bit, they can have a value of 0 or 1, but both at once through a process called superposition.   We can visually represent a single qubit with something called a Bloch Sphere.  This sphere has a radius of one with an X, Y, and Z axis.  This may not make sense yet, but it actually helps us later when we are trying to understand how gates transform a qubit later.  IBM has a pretty good description of Qubits and the Bloch Sphere.  However, it made more sense to me, when I read through Microsoft's description.

    Column vectors are the basis of representing qubits.  When we perform operations on the qubit, we are effectively transforming those vectors (or matrices when there are multiple qubits).  However, column vector notation can be a bit cumbersome at times.  That's where Dirac notation comes in.  In the Q Experience getting started guide, they talked about the 0 and 1 states being represented as |0> and |1>, but I didn't really pick up why there.  Microsoft has a page on Dirac Notation that explains it quite well.   When you start representing multiple qubits in Dirac notation, they will look something like |01> or |00>.  However, it wasn't clear to me until I read the IBM documentation that the qubits should be read from right to left.  That means the qubit on the right is the first qubit.

    Operations / Gates

    In a classical computer, there are only four functions (AND, OR, NOT, NAND) that map bits.  In quantum computing, there are an infinite number of possible transformations on a single qubit.  However, in reality, there are only a few that you deal with in these early examples.  The gates are all named after mathematicians and theoretical physicists that have long past.  Remember, we have known about quantum computing for some time.  We just didn't know how to get there.  When looking at the gates it may be easier to think of what the gate does when represented on the Bloch Sphere.  There are gates known as the X, Y, and Z gates.  They correspond to operations on the accesses of the sphere.  For example, the X gate is thought of as a "bit-flip" where it is effectively flipping 0s and 1s in the matrix representation of the qubit.  The Q Experience Beginner's Guide explains this gate fairly well.  Throughout their guide, you can also click on a link to open the composer where you can actually try out these operations on a simulator and even their working quantum computers.  The Y and Z gates do similar operations around their axis.  If you want to get more into the math behind all of these operations, the Microsoft page has quite a bit of detail.

    To put our qubits in a state of superposition, you use the Hadamard gate, often labeled as an H gate.  To learn about the H gate, check out the Creating Superposition page on the Q Experience first.  You'll use this gate a lot as you're starting to experiment.

    Entanglement

    When using the Controlled NOT (CNOT) gate, we can put multiple qubits into an entangled stage.  What happens here is that when two qubits are entangled, when you measure one qubit it affects the other.  This concept is a bit harder to grasp, so I've got a number of references.  First, look at Microsoft's page on Multiple Qubits  You can  read a bit more from IBM.  However, once I tried it out in a simulator (step 6), I think it made the most sense.

    Experimenting with the IBM Q Experience

    The best way to understand some of this is to try some experiments.  I started with using the IBM Q Experience.  It's been out for some time so I looked at it before Microsoft's Quantum Development Kit Preview came out this week.  The Q Experience has a Composer, where you can visually drag and drop your gates onto qubits to run an experiment.  There, it will show you which quantum computers are available and interesting facts should as what temperature the dilution refrigerator is running at.

    QExperienceQuantumComposer

    You can drag and drop gates anywhere you like and then choose to Run or Simulate your results.  This provides a visual representation of the underlying code going into the quantum computer.  You can click on Switch to QASM Editor and you will see the code.  If it looks like classical assembly language to you, that's because it's very similar.  Remember, we're just dealing with qubits and gates here.

    You can sign up for an account with the Q Experience and it will give you a fixed number of executions each day on an actual quantum computer.  IBM current has 5 qubit and 16 qubit quantum computers in the Q Experience.  Right now, it looks like the 16 qubit machine is offline because it's not showing any longer.  Sometimes the Run button won't be available at all though.  This all depends on the availability of the quantum computers as they take them down for maintenance regularly. 

    Just launching the composer is a bit daunting though.  Instead it's easier to start with existing experiments throughout the Beginner's Guide.  For example, on the CNOT page, you can run a variety of pre-configured examples in the Composer.  This is a great way to learn quickly and actually try your results on a real quantum computer. 

    Experimenting with the Microsoft Quantum Development Kit Preview

    This week, Microsoft released the Quantum Development Kit Preview.  Microsoft doesn't have a quantum computer yet, but they have quite the development stack already.  Using your own computer (and later Azure), you can simulate a quantum computer in Visual Studio 2017.  Installation isn't too hard but you need to do it on actual hardware (not a VM).  I think some Virtual Machine hosts do support the necessary CPU features if enabled though.  Let's be clear though, simulating a quantum computer is CPU intensive and can be slow depending on the complexity of your algorithm. 

    I'll be posting a detailed walk through of the development kit pretty soon so I won't go into a lot of detail here today.  Once you have the kit installed, go through the Quickstart.  It walks you through a program from the ground up.  To date, this has helped me learn some of the most about quantum computing yet.

    When will quantum machines be commercially available?

    We are starting to see a number of successful prototypes in the works now.  From last I read, IBM is targeting 2021 and Microsoft says around "five years", so 2022.  I suspect Google may be closer than that.  That may seem pretty far off but it's really not in the scheme of things.  The field of quantum computing actually started in the 1980s and it has taken us this long just to get where we are. 

    Why should you care?

    Quantum computing isn't for everyone.  That's true.  However, once we enter a post-quantum computing era (and we will), the benefits will eventually affect you.  I'm picturing a Y2K style gold-rush caused by quantum computing in the next ten years. I absolutely believe in quantum computing and while I'll never be capable of contributing directly to the research, I think I can help evangelize it.

    I also recommend watching this keynote from the Microsoft Quantum team at Future Decoded.  It has some great visual representations of quantum computing as well as what industries it may make an impact in.

    Summary

    When it comes to quantum computing, there is a lot to learn.  You are not going to learn it all in a day.  When you are reading about quantum computing, it's easy to get lost.  That's ok though.  I've read several of these pages multiple times, and I pick up a little more each time.  I'll keep this post updated as I find other good resources.

    Finally my usual disclaimer.  I'm far from an expert in the field of quantum computing.  If I got something wrong here, kindly correct me in the comments as opposed to trolling me.

  • How to: delete a SharePoint List Form customized with PowerApps

    Building SharePoint List Forms with PowerApps is starting to roll out.  As you customize your forms, you may get to a point where you want to delete one of them.  When you customize a SharePoint List Form in this manner, the PowerApp itself doesn’t show up in your list of apps so you might be wondering how to delete the form itself.  It’s not too had, once you know where to look.

    Before you go an delete your form, keep in mind that you can roll back to any previously saved version using the version history.  Just click on File, Save, and then See All Versions.

    Screen Shot 2017-11-16 at 3.13.18 PM

    Just click the Restore button if you need to go back a version.  If you have the PowerApp open in an editor in another browser tab, you’ll need to close that first.

    If you really need to do delete the PowerApp though, you can do that from the List Settings on the SharePoint list itself.  Click on the Form Settings link.  This is where you used to go to turn on and off InfoPath back in the day.  First, select Use the default SharePoint form.

    Screen Shot 2017-11-16 at 3.16.12 PM

    Next, select Delete the custom form.

    Screen Shot 2017-11-16 at 3.16.25 PM

    Click OK on the confirmation and the custom PowerApps form for your SharePoint list will be gone.  You can now choose PowerApps –> Customize forms again to start over with a new form in PowerApps.

  • How to: Hide fields in SharePoint list forms using PowerApps

    I’ve been building forms for a number of business processes lately using PowerApps and some of my tenants recently received the ability to customize forms in SharePoint lists using PowerApps.  One common scenario is that you might want to show or hide different fields depending on whether the user is creating a new item or editing an existing one.  I tried a number of approaches while experimenting with the visible field.  It wasn’t quite obvious to me at first, so after watching the following video that Chris Webb sent me a link for, I figured it out.

    For our scenario, we have a simple travel request form. The requester will fill out fields on where they are going.  The approver will edit the form and fill in comments and mark it as approved.  The requester shouldn’t see these fields.  In this example, we could actually use Approval Flows and what not, but for this example we are keeping it simple.  Let’s start by looking at our default form.

    Screen Shot 2017-11-16 at 10.25.25 AM

    Start by selecting the field you want to hide and then click on the Visible property. 

    Screen Shot 2017-11-16 at 10.26.42 AM

    Now, set the value equal to the following formula.

    If(SharePointForm1.Mode = FormMode.New, false, true)

    Screen Shot 2017-11-16 at 10.29.06 AM

    This hides the field when the form is in new item mode and shows it for view and edit.  You can customize this to your needs for other views as well.  You can preview what the form looks like in different modes now by clicking on SharePointForm1 and then changing the Default mode property between New and Edit.  For example, here is what my New form looks like now.

    Screen Shot 2017-11-16 at 10.33.43 AM

    Save and Publish your form and then you can try it from within SharePoint.  Now, when I click on the New button, the other fields are hidden.

    Screen Shot 2017-11-16 at 10.35.46 AM

    When I edit an existing item, we see the fields that we hid on the new form.

    Screen Shot 2017-11-16 at 10.37.19 AM

    Like many things in PowerApps, hiding fields is pretty simple once you know the right formula.  It took me a bit to figure this out because I think I was approaching this more from my developer background.  When I start to think about the old Excel formulas I used to use, it actually makes a lot of sense.

  • What you need to know about the SharePoint Migration Tool

    In case you missed it at Ignite, Microsoft announced the new SharePoint Migration Tool that lets you move files to SharePoint or OneDrive in Office 365.  I’ve noticed every time this tool comes up there is a lot of confusion and the conversation often ends up in the weeds.  I am hoping this post clears things up a bit.

    What does the tool move?

    Files and only files.  What about list items and workflows?  Not supported and likely never will be.  If you want to move that kind of stuff, go find a migration tool vendor.

    What destinations are supported?

    The only supported destination is SharePoint Online and OneDrive in Office 365.  Want to move between SharePoint 2010 and SharePoint 2016?  Great!  Go find a migration tool vendor.  This tool is not for you.

    What sources does it support?

    It supports moving files only from SharePoint 2013 and file shares.  That is it.  Still running SharePoint 2010?  Sorry. You’re out of luck.

    How does it work?

    It more or less uses the same migration API that all of the other ISVs use by uploading your content into Azure BLOB storage and then bulk migrating your files.

    Is it secure?

    You can decide for yourself, but here is the gist of it.  It’s probably more secure than handing over your credentials to a migration tool that doesn’t use OAuth (I’m looking at you Sharegate).  Your data is encrypted and uploaded to a dedicated Azure storage account.  The tool does this for you and the key is only valid for three days.  The Azure blob will be kept for 30 to 90 days and then it is deleted.  The files are encrypted at rest with AES 256 and are stored in the same region.  If you don’t want to use the storage account the tool creates itself, you can specify your own account and key but you will be responsible for cleaning it up.  You can read more on the How it works page. 

    Will it migrate my permissions?

    It will migrate basic Read and Write permissions to SharePoint Online if you have Directory Synchronization configured (which you should).

    Does it support bulk migration?

    Yes, you can configure bulk migration settings using a CSV file.

    Does it support incremental migration?

    Yes, it will migrate only the changes if you set the Enable incremental migration setting when you first run the job.

    What if my migration job is interrupted?  Does it support resume?

    Yes, the migration tool will resume any job that has been running for at least 5 minutes.

    I don’t want to migrate everything.  Are there any filters?

    Yes, there are a variety of filters such as dates, extensions, hidden files, etc.

    How fast is the migration?

    This is largely a factor on the size of your files.  Basically having more smaller files is slower than having more larger files even if the total volume is the same.  For large files, Microsoft quotes the average customer experience at 2 TB / day.  For smaller files, the experience is more like 250 GB / day.  That’s a big difference I know and every migration is different.  If you are planning a large migration, I recommend you do several tests to get a feel for how fast your migration will be. You can read more about maximizing migration speed. 

    Will the SharePoint Migration Tool ever support feature X?

    I wouldn’t hold my breathe. 

    But Sharegate supports feature X!

    Great.  Use Sharegate!  It’s a great tool which has also been in development for a lot longer than this one.  That comes with a price of course compared to the free tool from Microsoft but it’s a very reasonable one.

    What is the SharePoint Migration Tool good for then?

    It should excel at file share to OneDrive migration.  If you have been looking to get off file shares for a while this might be your free ticket.  While this tool isn’t perfect for every migration scenario (and isn’t meant to be), it does have its niches.  If you have some files in SharePoint or on a file share that you want to quickly get to SharePoint Online, this isn’t a bad option.

  • How to: Use PowerShell to customize the theme of a SharePoint Modern Site

    At Microsoft Ignite, they announced new capabilities for working with themes on modern sites.  Although, the new theme picker they have shown has not rolled out, you can still make use of the new theming capabilities right now.

    Here is what the old theme picker looks like.  When we are done, we’ll have our own themes in there and the stock themes will be gone.  No longer will your users pick some awful theme for your sites!

    Screen Shot 2017-10-17 at 2.58.01 PM

    The easiest way to build your new theme is to go to the Theme Generator page on the Office Fabric site.  Here you can set a color and it will automatically choose a palette for you.  You can override the colors in the palette based upon your own company’s brand standard.  Just pick a Primary theme color or enter in the hex or RGB codes.

    Screen Shot 2017-10-17 at 3.04.36 PM

    When you scroll down, you will find the code you need, but scroll even further and you will see a preview of what the Fabric Palette looks like.

    Screen Shot 2017-10-17 at 3.06.35 PM

    Once you are happy, we’ll cut and paste the theme definition into our PowerShell script.  However, before we do that, we have to install the SharePoint Online Management Shell (if you don’t have it already) and connect to SharePoint Online.  You’ll need version 16.0.6906.1200 or newer.  If you haven’t updated in a while, download it again.

    One you have it installed, you need to connect to SharePoint Online.  You’ll need to use an account with the SharePoint administrator or Global Administrator roles.  The process involves specifying the URL for your SharePoint Online tenant and the credentials.

    $adminUPN="admin@mydomain.onmicrosoft.com"

    $orgName="mydomain"

    $userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."

    Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential

    If you have trouble connecting, you can find more details on Microsoft Docs.  If you use multi-factor authentication, leave off the credential parameter and it will prompt you with an OAuth login prompt.  I’ll usually save this snipped in a PowerShell script so I don’t have to look it up every time.

    Now that you are connected, we can add a theme. Create a new PowerShell script using PowerShell ISE, Visual Studio Code, or whatever editor you like.  Add the following to the script.

    function HashToDictionary {
       Param ([Hashtable]$ht)
       $dictionary = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]"
       foreach ($entry in $ht.GetEnumerator()) {
         $dictionary.Add($entry.Name, $entry.Value)
       }
       return $dictionary
    }

    $themepallette = HashToDictionary(

    )

    Add-SPOTheme -Name "New Company Theme" -Palette $themepallette -IsInverted $false -Overwrite

    PowerShell expects the theme in the format of a dictionary object.  That is what the helper method HashToDictionary does.  Now we paste in our color palette from the Theme Generator into the call to the HashToDictionary method.  Be sure to incldue the @ symbol.  Here is what the palette looks like on the theme generator.

    Screen Shot 2017-10-17 at 3.27.10 PM

    Cut and paste that into the script.  The completed script will now look like the following:

    function HashToDictionary {
       Param ([Hashtable]$ht)
       $dictionary = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]"
       foreach ($entry in $ht.GetEnumerator()) {
         $dictionary.Add($entry.Name, $entry.Value)
       }
       return $dictionary
    }

    $themepallette = HashToDictionary(
    @{
    "themePrimary" = "#4ea3e9";
    "themeLighterAlt" = "#f6fafe";
    "themeLighter" = "#edf6fd";
    "themeLight" = "#dbecfa";
    "themeTertiary" = "#b4d8f5";
    "themeSecondary" = "#5eabea";
    "themeDarkAlt" = "#3194e5";
    "themeDark" = "#1974bf";
    "themeDarker" = "#135b96";
    "neutralLighterAlt" = "#f8f8f8";
    "neutralLighter" = "#f4f4f4";
    "neutralLight" = "#eaeaea";
    "neutralQuaternaryAlt" = "#dadada";
    "neutralQuaternary" = "#d0d0d0";
    "neutralTertiaryAlt" = "#c8c8c8";
    "neutralTertiary" = "#b5b5b5";
    "neutralSecondary" = "#868686";
    "neutralPrimaryAlt" = "#6e6e6e";
    "neutralPrimary" = "#252525";
    "neutralDark" = "#565656";
    "black" = "#3e3e3e";
    "white" = "#ffffff";
    "primaryBackground" = "#ffffff";
    "primaryText" = "#252525";
    "bodyBackground" = "#ffffff";
    "bodyText" = "#252525";
    "disabledBackground" = "#f4f4f4";
    "disabledText" = "#c8c8c8";
    }
    )

    Add-SPOTheme -Name "New Company Theme" -Palette $themepallette -IsInverted $false -Overwrite

    The Add-SPOTheme Cmdlet has a few parameters.  Name should be fairly self explanatory.  Set IsInverted to true if you are using an inverted theme (ie high contract / black background).  Add the Overwrite to allow you to update the theme after it has been created.  Run the PowerShell script to see your new theme.  Running it will not yield any output if it is successful.

    Refresh your SharePoint site and click on Change the Look underneath the Cog Wheel.  You should see your new theme.

    Screen Shot 2017-10-17 at 3.32.49 PM

    Select the theme to apply it to preview it on your site.

    Screen Shot 2017-10-17 at 3.34.41 PM

    Pretty simple right?  Now, if you want to remove the out-of-the-box themes.  That’s easy too.  Go back to PowerShell and issue the following command.

    Set-HideDefaultThemes $true

    Refresh your site and you will see that the out-of-the-box themes are now gone.

    Screen Shot 2017-10-17 at 3.37.09 PM

    That’s all there is to it.  There are a few more commands if you want to inspect what themes are installed or you want to remove one.  You can read more about them on Microsoft Docs.  Give it a try today!

  • Why Microsoft’s Investment in Quantum Computing Matters

    Updated: 10/2/2017

    When the Ignite keynote shifted to the topic of quantum computing, my inner geek came out.  As they brought out on stage some of the smartest minds Microsoft has to offer, some of the audience glazed over.  Many people come to Ignite to find out what they can use to do their jobs better in the next few months.  However, with quantum computing, some of the reality of what we see is a litter farther out but not as far as you might think.  Not all of us will use quantum computing.  In reality, most of us will never use it directly. After all, your phone is likely never to be powered by a quantum computer.  Especially since it has to be cooled to 0.01 K.  That’s –459 F or –271 C.   You’ll be affected by this technology though. 

    20170925_180232659_iOS

    If you look at the major technological advancements of the human races over the years, you think of things like electricity, semi-conductors, nuclear fission, and space travel.  When we figure out how to make a sustainable, scalable, quantum computer, that will be something that goes on that list.  It’s significance is somewhere up there with things like nuclear fusion and travel to Mars.  Maybe you don’t agree with me there, but it is a significant achievement none-the-less.

    What is Quantum Computing?

    Like many attendees at Ignite, I have a degree in computer science, but I would hardly call myself a computer scientist.  I reserve that term for the professors and PHDs that are doing real research to advance the field.  As you know, traditional computing uses bits which can have a value of 0 or 1.  Quantum computing uses qubits (or quantum bits).  A qubit can have a value of 0 or 1, but it can also have a value of 0 and 1 simultaneously though a phenomenon called superposition. 

    20170925_175503370_iOS

    While I don’t fully understand why this allows us to make computations faster, it effectively lets us compute more with less by being able to check multiple states at once. 

    What can Quantum Computing do?

    Quantum computing is really good at finding a needle in a haystack.  A lot of this is centered around the concept of quantum parallelism which allows a quantum computer to do multiple calculations simultaneously and examine the results.  You might have heard that quantum computing will have an effect on traditional cryptography.  This is partially true because many algorithms are based upon the calculation of two prime numbers together to generate a key.  Since quantum computing can do many of these calculations simultaneously, it can effectively brute force an attack on a key to decrypt the information.  However, only some algorithms are susceptible to this and there are new algorithms and key sizes that can work around this so don’t get too worried about using your credit card number online just yet. 

    20170928_134600081_iOS

    Outside of cryptography, quantum computing will have benefits for chemistry, health care, material science, and more.  While you personally may not be using a quantum computer, you will realize its benefits indirectly through the advances it makes possible.  From Microsoft’s Quantum Computing site, “Quantum computing could solve problems that would take today's computers eons in the time it takes to grab a cup of coffee.” 

    A new approach

    Microsoft’s approach is based on topological quantum computing.  With this approach they are seeing some early success with better error rates.  Error rates are common in early quantum computing because of the concept of quantum decoherence, one of the main obstacles of making a quantum computer.  Microsoft is also focused on building a scalable (think Azure) end-to-end solution.  Microsoft is working on the hardware, software, and tools that will work together to hopefully one-day make a usable solution.

    20170928_144916550_iOS

    Shown above, the plaque outside of the hydrogen isotope dilution refrigerator.  Explains the reason why quantum computing requires such extremely cold temperatures as well as some of the issues that quantum computing might solve.

    Microsoft isn’t the first to the table in quantum computing and they admit that.  Google, IBM, and many universities have already been working on quantum computing for some time.  This isn’t really a space race though.  I think this is something that benefits from more companies and teams working on it.  With that Microsoft is bringing their own approach.

    Quantum Computer Simulator

    With qubits, you really can do more with less.  To give you an idea of scale.  Where as typically do operations 64 bits at a time, today’s quantum computers only 5 and 16 qubits.  Microsoft has said that the simulators that you can run on your Windows PC will let you emulate up to around 30 qubits and you will be able to get around 40 qubits if you push the workload to Azure.  That might not seem like much but each time you add a qubit, you double the computational power.  For example 30 qubits, would be 2^30 while 31 qubits would be 2^31.  Microsoft wants to get to the point where they have computers with hundreds or even thousands of qubits.

    Quantum Computing in Azure?

    That’s what Microsoft want to do.  Just like you can buy a D series or M series virtual machine.  Microsoft wants to do this at scale so it would just be an add-on to its virtual machine offerings.  Whereas getting access to the power of today’s super computers isn’t really feasible for most of us, for businesses that need quantum computing power, you’ll be able to effectively lease time on one without having to invest in having one on-premises.

    20170925_175952697_iOS

    A programming language built for Quantum Computing

    I never imagined people writing programs for a quantum computer using Visual Studio, but that’s exactly what is coming.  At Ignite, they demoed the “Hello World” of quantum computing.  It doesn’t simply display text on the screen.  It actually transmits data from one qubit to another.  At least that's how I understood it.  The syntax reminds me of assembly language programming more than something like C#.  You’ll be able to run these examples on the simulator as well as others when they release the tooling later.

    20170925_180728904_iOS

    Conclusion

    If you have ever watched Big Bang Theory and you start reading up on quantum computing, you’ll start seeing some familiar names and concepts from the show.  Schrodinger’s Cat, Schor’s Algorithm, and Dr. Feynman.  The writers of that show actually do a pretty good job at making sure the show is scientifically accurate.  If you want to learn more about quantum computing, check out Microsoft’s site.  You can also read more on Wikipedia.

    Quantum computing isn’t going to help you sell more widgets today, but it will have an impact on your life sometime in the future.  Again I am no expert on this topic, so if you are a scientist and think I got something wrong, don’t flame me, kindly correct me in the comments and I’ll make updates.

    Posted Sep 27 2017, 10:29 AM by CoreyRoth with no comments
    Filed under:
More Posts Next page »
2018 dotnetmafia.
Powered by Community Server (Non-Commercial Edition), by Telligent Systems